-
Notifications
You must be signed in to change notification settings - Fork 204
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
[build_web_compilers] Crashes due to wrongly analyzed libraries. #3666
Comments
Yes, this happens because of the import to This means any time you have a You can switch to using the "fine" module strategy, where we don't do this grouping, but it will result in slower builds and a LOT more JavaScript files. In your build.yaml file, something like this (not tested): targets:
$default:
builders:
build_web_compilers:ddc_modules:
options:
strategy: fine The better option though, would be to make a public entrypoint ( |
Interesting. Thanks for your detailed response. Can you point me to somewhere where this is documented? I discovered this while building a jaspr integration, so I cannot fix this problem myself but would need to communicate this to the developers using the framework. |
We should probably add a section to https://github.com/dart-lang/build/blob/master/docs/faq.md#how-can-i-resolve-skipped-compiling-warnings - I am surprised it doesn't already talk about this |
That would be great 😄 |
I came across a super weird bug that causes this error:
Which is wrong since the file in question definitely does not import any unsupported libraries. It is caused by some other file in the package that imports some unsupported libs, but that is not anywhere in the transitive imports of the entrypoint file.
> dart info
I found the following reproducible setup:
dart create -t web myapp
lib/src/web.dart
with the contentlib/server.dart
with the contentweb/main.dart
contents todart run build_runner serve web:8080
You should see the skipped compilation warning for
web/main.dart
although it has no transitive dependency ondart:io
.The bug seems to be somehow related to the
src
directory:lib/src/web.dart
tolib/web.dart
solves the problem.lib/src/web.dart
tolib/other/web.dart
solves the problem.The text was updated successfully, but these errors were encountered: