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: Failed to precompile build script .dart_tool/build/entrypoint/build.dart. #3412
Comments
It looks like you are on a beta build, so maybe there was a recent bug or something in the SDK? Or possibly a change to type inference that is unexpectedly breaking? cc @stereotype441 |
I think the problem is that the packages uses |
That looks like a good sdk constraint to me, the SDK isn't supposed to break you until major versions, generally (although sometimes it is done after some careful examination of the tradeoffs). |
Fwiw most everybody on the team will be out until next monday, starting shortly, so I wouldn't expect movement here until then. Given this is only broken on a beta build, I don't think we need to be concerned about fixing it immediately in this package, and should instead wait until we can understand the underlying cause (likely in the SDK, from the looks of it). |
I wrote the below message before I found a Dart SDK issue for this underlying issue: dart-lang/sdk#51128 ...but I thought I'd post it here anyways for posterity. I'm going to also post in that thread the bit about the SDK constraint in build_modules. I also ran into the same issue, but with build_modules 4.0.4 (that's the just newest version I can get to without upgrading analyzer). Link to build: https://github.com/Workiva/over_react/actions/runs/4066018292/jobs/7001513513#logs. It looks like the issue only occurs in both Dart 2.19.0, 2.19.1, and 3.0.0-187.0.dev, but not on Dart 2.18.7. Also, the issue seems to occur with build_modules 4.0.4/4.0.6 but not 4.0.7. To reproduce, create a pubspec.yaml with: name: build_issue_3412
environment:
sdk: '>=2.18.0 <3.0.0'
dependencies:
build_modules: 4.0.6 # Or 4.0.7, which does not exhibit the issue
build_runner: and run dart run build_runner build I wonder if it has to do with raising the SDK constraint in build_modules from 2.14 to 2.18 to opt into the new enhanced generics inference language feature? |
Right, thanks for pinging this issue :). I am going to close this as the package is fixed in the latest version. |
Dart SDK version: 2.19.0-374.1.beta (beta) (Tue Nov 15 07:44:30 2022 -0800) on "windows_x64"
After adding generic types here, the errors have been fixed:
pubspec.lock
The text was updated successfully, but these errors were encountered: