Conversation
A bundle name flattens '/' to '-', so './zz/child' and './zz-child' both become 'lib-zz-child'. The bundler input map is keyed by that name, so the second entry point silently overwrote the first: the build exited 0, one entry point's code was missing, and both 'exports' keys resolved to the surviving file. Fixes angular#34128
There was a problem hiding this comment.
Code Review
This pull request introduces a check to prevent entry point subpaths from producing colliding bundle names when '/' is flattened to '-', throwing an error if a collision is detected, and adds corresponding unit tests. The review feedback suggests making this collision check case-insensitive to ensure cross-platform safety on case-insensitive filesystems (such as macOS and Windows).
Collaborator
|
Thanks for this, but this has been address via #34218 |
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.
PR Checklist
PR Type
What is the current behavior?
Issue Number: #34128
getEntryPointBundleNameflattens/to-, so./zz/childand./zz-childboth producelib-zz-child. The duplicate guard innormalizeEntryPointskeys onentryPoint.name, which still differs, so both survive.resolveEntryInputMapthen writesinput[bundleName]into a plain object and the second entry point silently overwrites the first, so Rolldown is handed one entry and cannot warn. The build exits 0, one entry point's code is missing, and bothexportskeys resolve to the surviving file.What is the new behavior?
Normalization rejects the collision with an error naming both keys and the bundle name they share.
Two tests: a nested entry point beside a similarly named flat one still builds and emits both bundles, and the colliding pair fails. There was no test with a nested entry point before, so the
/to-flattening itself was unpinned.Does this PR introduce a breaking change?
Other information
I could not run the builder tests locally, so CI is the first run of them.