fix(rolldown): Fix Non-deterministic / changing debug IDs with Rolldown/Vite 8 - #23665
Open
chen-anders wants to merge 3 commits into
Open
fix(rolldown): Fix Non-deterministic / changing debug IDs with Rolldown/Vite 8#23665chen-anders wants to merge 3 commits into
chen-anders wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
yarn lint) & (yarn test).Closes #23448
Summary
This change fixes nondeterministic Sentry debug-ID injection when using Rolldown.
Rolldown computes output filenames and content hashes before all generated chunk content has stabilized. Sentry’s debug-ID injection was being incorporated into that process with a value derived from transient Rolldown output, causing unchanged assets to receive different content hashes across otherwise identical builds.
The fix:
generateBundle, after Rolldown has resolved output filenames and hashes.Motivation
Our Vite production builds can be run with cache-busting enabled, but unchanged static assets should still produce identical content hashes.
AI Usage Disclaimer: Written with GPT 5.6 Sol ; tested on our own internal codebase and verified that the output JS assets are deterministic
Testing
1.1.21.2.5webComponentsasset was byte-identical between builds.Method used for testing on our internal codebase:
With this fix, the file names and SHA256 values were identical.