Skip to content
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

Fix dependency retargeting with ambiguous reexports #9380

Merged
merged 3 commits into from Nov 14, 2023

Conversation

mischnic
Copy link
Member

Fix a regression of #9331 that broke the REPL

For the usual problem of ambiguous reexport-all, the first reexport would simply win (but in reality this should be determined at runtime) and sets itself in the importer asset's symbols. (lib-a.js is empty, the other two branches contain pure ESM exports of b and c respectively)

Bildschirm­foto 2023-11-13 um 15 54 41

If the exports aren't renamed (from == as) then we can just add a * -> * reexport-all dependency. This doesn't require changing the importers symbols (which can only list a single, therefore unambiguous, resolution). All ambiguous situation should fall in this non-renaming case

At some point, we should really rethink how we want to support reexporting from non-statically analyzable CJS...

@mischnic mischnic merged commit c72c336 into v2 Nov 14, 2023
12 of 15 checks passed
@mischnic mischnic deleted the 9331-dep-rewriting-fixup branch November 14, 2023 21:11
@alshdavid alshdavid mentioned this pull request Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants