[🐞] Out-of-sync Stale Code running on server after code edits & auto-recompile / Stop and Restart required after each edit
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
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.
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.
Gonna look into it this week!
Looking into it now! hope it's not a hard fix... wish me luck
Doing a rain dance and a twirling dervish for good luck!
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