Skip to content
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

[🐞] Out-of-sync Stale Code running on server after code edits & auto-recompile / Stop and Restart required after each edit #3342

Closed
n8sabes opened this issue Mar 12, 2023 · 6 comments · Fixed by #4385
Assignees
Labels
P4: urgent If Bug - it makes Qwik unstable and affects the majority of users STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working
Milestone

Comments

@n8sabes
Copy link
Contributor

n8sabes commented Mar 12, 2023

Which component is affected?

Qwik Rollup / Vite plugin -- Qwik Runtime HMR

Describe the bug

The server not reloading recompiled utility function used by server$. Maybe this is a vite, HMR, or my misunderstanding in how to properly write server$ code.

I am also seeing a similar issue with styles not updating.

See project and loom video: HERE

Reproduction

https://github.com/n8sabes/qwik-ssr-reload-issue.git

Steps to reproduce

Clone https://github.com/n8sabes/qwik-ssr-reload-issue.git run and click.

System Info

System:
    OS: macOS 13.1
    CPU: (8) arm64 Apple M1
    Memory: 87.09 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 19.4.0 - ~/.nvm/versions/node/v19.4.0/bin/node
    npm: 9.2.0 - ~/.nvm/versions/node/v19.4.0/bin/npm
  Browsers:
    Chrome: 110.0.5481.177
    Firefox Developer Edition: 110.0
    Safari: 16.2
  npmPackages:
    @builder.io/qwik: 0.21.0 => 0.21.0
    @builder.io/qwik-city: 0.5.3 => 0.5.3
    undici: 5.20.0 => 5.20.0
    vite: 4.1.4 => 4.1.4

Additional Information

No response

@n8sabes n8sabes added TYPE: bug Something isn't working STATUS-1: needs triage New issue which needs to be triaged labels Mar 12, 2023
@manucorporat manucorporat added this to the priority milestone Mar 13, 2023
@n8sabes
Copy link
Contributor Author

n8sabes commented Apr 21, 2023

Bump! Want to put this on the radar as it's a pretty serious DX gotcha that still bites me when I am pondering why the edits are not taking, even though the console shows recompile.

SEE THE ISSUE IN THIS LOOM

@n8sabes n8sabes changed the title [🐞] Server not reloading recompiled code used by server$ [🐞] Out-of-sync Stale Code running on server after code edits & auto-recompile / Stop and Restart required after each edit Apr 27, 2023
@n8sabes
Copy link
Contributor Author

n8sabes commented Apr 27, 2023

This seems to be true of any nested code file edits that run on the server. Despite the auto-recompile, the server continues to run stale code.

@manucorporat manucorporat self-assigned this May 28, 2023
@manucorporat manucorporat added the P4: urgent If Bug - it makes Qwik unstable and affects the majority of users label May 28, 2023
@manucorporat
Copy link
Contributor

Gonna look into it this week!

@manucorporat
Copy link
Contributor

Looking into it now! hope it's not a hard fix... wish me luck

@n8sabes
Copy link
Contributor Author

n8sabes commented May 30, 2023

Doing a rain dance and a twirling dervish for good luck!

@jerimiahwelch
Copy link

jerimiahwelch commented May 31, 2023

The issue is not limited to server$.

We are seeing it in our qwik-city test app when importing css or when a component is nested inside another component that decides which scheduling component to display

Here is a simple example where vitest framework is seeing stale content

video of issue:
https://www.loom.com/share/8ea4df56ed5c4ac1948b19190c20b003

Repository to reproduce:
https://github.com/jerimiahwelch/stale-qwik-test

Thank you for prioritizing this!

System info
Model Name: MacBook Pro
Model Identifier: Mac14,10
Model Number: MNW83LL/A
Chip: Apple M2 Pro
Total Number of Cores: 12 (8 performance and 4 efficiency)
Memory: 16 GB
System Firmware Version: 8422.121.1
OS Loader Version: 8422.121.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P4: urgent If Bug - it makes Qwik unstable and affects the majority of users STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants