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
ResolveExport's exportStarSet argument disallows cycles that don't seem problematic #708
Comments
Recapping my understanding of a whiteboard discussion with @dherman: Dave's guess is that the export star set was meant to disallow circularities entirely within a graph of "export *" declarations, and that this failure just falls out of that. It might suffice to make export star detection a separate phase of checking in ModuleDeclarationInstantiation, and to throw away the exportStarSet once that phase is complete. |
@caridy ping? I think you said you were going to take a look at this one. |
Yes, will try to have something for next week. |
…lowing circular valid dependencies
The
exportStarSet
passed toResolveExport
is used to cause an error in cases like the following:A: import {x} from "B";
B: export * from "C";
C: export var y; export {y as x} from "B";
The sequence of ResolveExport calls here is:
where step (3) fails when hitting step 7 of ResolveExport (since B is already in the exportStarSet).
But that would have been perfectly legal without the
export *
:A: import {x} from "B";
B: export {x, y} from "C";
C: export var y; export {y as x} from "B";
where the sequence is instead:
and step (4) results in a a valid resolution.
What's the rationale for the former being an error?
@GeorgNeis who pointed out this oddity, and @allenwb for any history here.
The text was updated successfully, but these errors were encountered: