-
-
Notifications
You must be signed in to change notification settings - Fork 757
fix: should not panic when access slate stats for Rspack 1.x #12853
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
Conversation
Deploying rspack with
|
| Latest commit: |
9fa2a8f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6025f579.rspack-v2.pages.dev |
| Branch Preview URL: | https://fix-access-outdate-stats-v1.rspack-v2.pages.dev |
c38ec30 to
9fa2a8f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
📦 Binary Size-limit
🎉 Size decreased by 336.25KB from 48.34MB to 48.01MB (⬇️0.68%) |
Merging this PR will not alter performance
Comparing Footnotes
|
Summary
This PR ensures that accessing
Statsinstances from stale compilations in watch mode no longer causes panics, while still returning a valid stats JSON shape.Changes:
StatsJSON generation against stale compilations by returning safe, emptyJsStatsCompilationobjects instead of calling into freed Rust-side structures._lastCompilation, returning empty collections for stale compilations.watchCases/compilation/access-stale-statstest to verify thatstats.toJson()andstats.toJson({ all: true })on stale stats remain shape-compatible and do not crash.Related links
Checklist