Skip to content

Fix dependency retargeting with ambiguous reexports#9380

Merged
mischnic merged 3 commits into
v2from
9331-dep-rewriting-fixup
Nov 14, 2023
Merged

Fix dependency retargeting with ambiguous reexports#9380
mischnic merged 3 commits into
v2from
9331-dep-rewriting-fixup

Conversation

@mischnic

Copy link
Copy Markdown
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
@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.

2 participants