qwik icon indicating copy to clipboard operation
qwik copied to clipboard

fix(dev): Reports what is happening when SSR dirty tasks in taskStaging.

Open genki opened this issue 1 year ago • 5 comments

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

genki avatar Jul 04 '24 08:07 genki

Deploy request for qwik-insights rejected.

Name Link
Latest commit e38abdb77028ef9eef4f831e23f4118dcc25c621

netlify[bot] avatar Jul 04 '24 08:07 netlify[bot]

Review PR in StackBlitz Codeflow 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

templates

pkg-pr-new[bot] avatar Jul 04 '24 08:07 pkg-pr-new[bot]

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

genki avatar Jul 04 '24 08:07 genki

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?

genki avatar Jul 04 '24 10:07 genki

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 avatar Jul 04 '24 12:07 wmertens

@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.

genki avatar Jul 04 '24 17:07 genki

@wmertens I realized I had mistakenly run pnpm run api.update --api. I have fixed it.

genki avatar Jul 04 '24 21:07 genki

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.

wmertens avatar Jul 09 '24 15:07 wmertens

I did it :)

genki avatar Jul 09 '24 16:07 genki