fix(dev): Reports what is happening when SSR dirty tasks in taskStaging.
Overview
What is it?
- [ ] Feature / enhancement
- [ ] Bug
- [x] Docs / tests / types / typos
Description
When I have been developing Qwik app, the line came out in stderr.
task Nav_component_useTask_9gk0OXCxvU0
It was very hard to know what was happening and which module printed out it from where.
You know, the dev tool of the browser kindly adds the call stack to the console.error but at the server side, it's wild :)
Use cases and why
Finally I found the console.error that printed out, then I have added more information about what is happening.
Checklist:
- [x] My code follows the developer guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have made corresponding changes to the documentation
- [ ] Added new tests to cover the fix / functionality
Deploy request for qwik-insights rejected.
| Name | Link |
|---|---|
| Latest commit | e38abdb77028ef9eef4f831e23f4118dcc25c621 |
Run & review this pull request in StackBlitz Codeflow.
commit: 50bf471
@builder.io/qwik
npm i https://pkg.pr.new/@builder.io/qwik@6642
@builder.io/qwik-city
npm i https://pkg.pr.new/@builder.io/qwik-city@6642
eslint-plugin-qwik
npm i https://pkg.pr.new/eslint-plugin-qwik@6642
create-qwik
npm i https://pkg.pr.new/create-qwik@6642
BTW, this console.error is really needed?
My app seemed work without problem even if this error has reported.
I felt the line below handles the task
https://github.com/QwikDev/qwik/blob/e38abdb77028ef9eef4f831e23f4118dcc25c621/packages/qwik/src/core/render/dom/notify-render.ts#L315
I have digged about this issue, and found https://github.com/QwikDev/qwik/pull/5741 has been already solved the problem about the SSR dirty tasks.
@wmertens Why you left the console.error?
Can you also run api.update so those api changes are gone?
I don't think I added those logs but they do show something that should not happen I guess.
In any case in V2 this code is completely different so it doesn't matter much.
@wmertens I'm a bit confusing. I tried the api.update but it didn't change anything.
I meant the L313 of this patch "packages/qwik/src/core/render/dom/notify-render.ts" you wrote.
I wanted know why you added this console.error, for ex, because of something are not solved yet so there had been needed to show caution?
If not so, can I simply remove this console.error instead of fixing its message richer.
@wmertens I realized I had mistakenly run pnpm run api.update --api.
I have fixed it.
Right that looks like I added it as a debug tool and I didn't see it because it was .error instead of .log. You can simply remove the line in this PR.
I did it :)