Skip to content

chore: better materialization error and dev location fix #7551

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: build/v2
Choose a base branch
from

Conversation

Varixo
Copy link
Member

@Varixo Varixo commented Apr 28, 2025

Throw an error with better description what is failing
example:

Error: Code(Q44): Materialization error: Expected a text or element after
1 + 2 = 3
at location /some/file/location.tsx:123:1
   metadata: {B`6=5|q:type|S}D{B`7=16|q:type|S}D{B`8=11|q:type|S}2,
   value: 50,
   next id: 52

This also fixes dev location for CSR rendering

@Varixo Varixo self-assigned this Apr 28, 2025
@Varixo Varixo requested a review from a team as a code owner April 28, 2025 19:41
Copy link

changeset-bot bot commented Apr 28, 2025

⚠️ No Changeset found

Latest commit: 7d38de6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Varixo Varixo moved this from Backlog to In progress in Qwik Development Apr 28, 2025
Copy link

pkg-pr-new bot commented Apr 28, 2025

Open in StackBlitz

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/core@7551
npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/router@7551
npm i https://pkg.pr.new/QwikDev/qwik/eslint-plugin-qwik@7551
npm i https://pkg.pr.new/QwikDev/qwik/create-qwik@7551

commit: 50b11b7

Copy link
Contributor

github-actions bot commented Apr 28, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview ee2f893

@Varixo Varixo marked this pull request as draft April 28, 2025 19:54
@wmertens
Copy link
Member

Great, but actually the location is unreadable without training. Since it's dev mode, can't we log the actual element so that when you hover it in the console you can see it highlighted on the page?

@Varixo
Copy link
Member Author

Varixo commented Apr 28, 2025

Great, but actually the location is unreadable without training. Since it's dev mode, can't we log the actual element so that when you hover it in the console you can see it highlighted on the page?

The problem is qerrors supports only strings. I am thinking if it should be a QError at all, maybe not

@shairez
Copy link
Contributor

shairez commented Apr 29, 2025

Thanks Michal!
What about changing "materialization" to "Resuming" or "Resumability" ?

reason: we teach about resumability but nobody knows yet what materialization means (and it's yet another term we need to teach about). So I think this will help keeping it simpler for us and for Qwik devs.

Plus adding a link to a doc that explains this error in more depth with possible fixes would be nice.

@Varixo Varixo force-pushed the v2-better-materialize-error branch 2 times, most recently from ee2f893 to 50b11b7 Compare April 30, 2025 20:04
@Varixo Varixo force-pushed the v2-better-materialize-error branch from 50b11b7 to 7d38de6 Compare May 1, 2025 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

3 participants