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
When dart2js reports a duplicate library it should say where it's referenced from #7133
Comments
One could argue that we might want to do a second path on the library graph just to give better error messages. As Alan suggests, any library that transitively has a reference to the duplicated library might be the one that needs fixing, and the longer (measured in import statements) this file is from the duplicated library the worse. Also, our users might benefit from a way to diagnose that a file URI is being used to reference a library that would be accessible through a package:-import. I think this can be done relatively easily by traversing the package root once a duplicated library has been found. |
Set owner to @johnniwinther. |
And by "second path" I meant "second pass". |
Added TriageForM5 label. |
Removed TriageForM5 label. |
Any updates? We're using Web UI on our project, and its compiler rewrites a lot of the imports to use relative paths. It makes it hard to discern what is important and what is not when compiling to dart2js. |
Added Started label. |
Removed this from the Later milestone. |
Removed Oldschool-Milestone-Later label. |
it seems this was fixed in r33476 Added Fixed label. |
Issue #13295 has been merged into this issue. |
It's possible to create duplicates of the same library by referring to it by two different paths. In particular, if you reference it via package: from one place and via a direct path reference from another. This can lead to very confusing symptoms.
dart2js can report these if the --verbose flag is specified. However, the warning that you get tells you that there is a duplicated library definition and gives the point where the library is declared. It would be much more useful if it also told you where the library is referenced from, possibly transitively.
The text was updated successfully, but these errors were encountered: