fix persisted bun lockfile recovery#6660
Conversation
Greptile SummaryThis PR changes
Confidence Score: 4/5Safe to merge with one fix: the recovery show_status call needs suppress_errors=True or the actionable error message will never reach the user when recovery fails. The retry logic is correct and the happy path works. When recovery fails, show_status raises SystemExit(1) internally before the custom error block runs, so the user-facing directory-deletion hint is never shown. reflex/utils/js_runtimes.py — the show_status call in the recovery block (line 518) and the corresponding test mock in test_prerequisites.py Important Files Changed
Reviews (3): Last reviewed commit: "Merge branch 'reflex-dev:main' into fix/..." | Re-trigger Greptile |
|
hey @masenf can you look into this? |
What changed
bun install --frozen-lockfilefails because the recoveredpackage.jsonand persistedbun.lockareout of sync.
--frozen-lockfileso Bun can reconcile the files.Why
A persisted
bun.lockcould contain updated dependencies while the persistedpackage.jsonremained stale. Thiscaused
reflex runto fail and required users to manually deletereflex.lock.The new recovery flow regenerates the mismatched lockfile automatically, allowing the application to start normally.
Fixes #6657
Validation
uv run pytest tests/units/test_prerequisites.py -quv run ruff check reflex/utils/js_runtimes.py tests/units/test_prerequisites.pygit diff --check