Skip to content
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_runner crashes when using pub workspaces feature #3726

Closed
pattobrien opened this issue Jul 24, 2024 · 3 comments · Fixed by #3728
Closed

build_runner crashes when using pub workspaces feature #3726

pattobrien opened this issue Jul 24, 2024 · 3 comments · Fixed by #3728

Comments

@pattobrien
Copy link

pattobrien commented Jul 24, 2024

Reproducible repo here: https://github.com/pattobrien/build_runner_workspaces_bug

Tested with the latest build_runner version (see info below)

build_runner workspaces bug

steps to reproduce

  1. in directory /nested_a, run the following command:
dart run build_runner watch -d

build_runner crashes with the following output

Building package executable... 
Built build_runner:build_runner.
[INFO] Generating build script completed, took 482ms
[INFO] Precompiling build script... completed, took 3.8s
[INFO] Setting up file watchers completed, took 19ms
[INFO] Waiting for all file watchers to be ready completed, took 198ms


You have hit a bug in build_runner
Please file an issue with reproduction steps at https://github.com/dart-lang/build/issues


AssetNotFoundException: nested_a|.dart_tool/package_config.json
package:build_runner_core/src/asset/file_based.dart 135:18  _fileForOrThrow.<fn>
dart:async                                                  _CustomZone.runUnary
package:build_runner_core/src/asset/file_based.dart 35:13   FileBasedAssetReader.readAsBytes.<fn>
package:build_runner/src/generate/watch_impl.dart 336:11    WatchImpl._run.<fn>

additional info

  • Dart SDK version: 3.5.0-311.0.dev (dev) (Thu Jun 27 13:01:59 2024 -0700) on "macos_x64"
  • tested with build_runner v2.4.11 (latest release)
@jakemac53
Copy link
Contributor

@pattobrien Are you for sure on the latest build_runner_core as well? You will need version 7.3.1

@jakemac53
Copy link
Contributor

Oh, it looks like another fix landed after that which hasn't yet been published, I can work on a release today

@pattobrien
Copy link
Author

Oh, it looks like another fix landed after that which hasn't yet been published, I can work on a release today

Thanks so much @jakemac53 ! I can confirm the fix using the release branch.

jakemac53 added a commit that referenced this issue Jul 30, 2024
Closes #3726

These have some additional fixes that are needed for workspace repos to function.
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 a pull request may close this issue.

2 participants