-
Notifications
You must be signed in to change notification settings - Fork 229
It seems that build_runner crashes while using "flutter_localizations". #3946
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
Comments
Thanks for reporting! So the crash in pub as reported here is a bug in pub, The other side of the issue seems to be dart-lang/build#2835 where build_runner tries to follow the dependency graph by finding the pubspec.yaml of each package. But Here is an issue about fixing this situation: flutter/flutter#102983 |
@sigurdm Thanks for your rapid feedback. We're longing to see this error is fixed soon. |
@sigurdm Your comment was a great hint for us. We investigated the error situation again and changed our pubspec.yml
environment:
sdk: ^3.0.5
flutter: ^3.10.5
dev_dependencies:
build_runner: ^2.4.5 and did these things:
Thanks for your support. Hope this comment helps to other flutter devs. |
For my case - simple solution #The following section is specific to Flutter packages. |
I'm not sure why this phenomenon occurs, but I have identified the following reproduction conditions and a solution. Reproduction conditions:If you run pub get even once in a Flutter package that depends on both l10n and build_runner, errors will occur in all subsequent "dart run build_runner build" operations. Solution:Delete the pubspec.lock file right before each "dart run build_runner build". I hope my case will be helpful. |
It seems that
build_runner
crashes while using flutter_localizations.Thanks for reading and we hope to see this error is fixed soon.
Environment
dart --version
): 3.0.5 (stable)Linux 5.19.0-43-generic on x86_64
Problem
Error happens like below if we apply Internationalizing Flutter apps in our project.
$ flutter pub run build_runner build --delete-conflicting-outputs Deprecated. Use `dart run` instead. Null check operator used on a null value package:pub/src/entrypoint.dart 562:48 Entrypoint.resolveExecutable package:pub/src/executable.dart 79:35 runExecutable package:pub/src/command/run.dart 100:26 RunCommand.runProtected This is an unexpected error. The full log and other details are collected in: /home/USER/.pub-cache/log/pub_log.txt Consider creating an issue on https://github.com/dart-lang/pub/issues/new and attaching the relevant parts of that log file.
Expected behavior
Build should be successful and various files dependes on
builld_runner
are created.Actual behavior
Cannot continue build unless we comment out
build_runner
.--trace output
The pub_log.txt file:
flutter doctor
results:The text was updated successfully, but these errors were encountered: