-
Notifications
You must be signed in to change notification settings - Fork 1.7k
NoSuchMethodError from package:build_runner_core/src/package_graph/package_graph.dart 74:15 PackageGraph.forPath #41913
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
This is when running |
cc @jakemac53 |
This reproduces at flutter master, but not on the flutter from this morning. |
It looks like it was this engine roll to flutter: flutter/flutter@3a67a8b . |
We were on
|
This looks like something internal failing when we call |
Possibly related to this CL: https://dart-review.googlesource.com/c/sdk/+/145402 |
For completeness, let me repost what I just posted on the email thread: Yes, this is likely due to the sync* transform in 145402. The issue is mixing versions, so ultimately I don't think this is a Dart issue. As an aside, this error is a bit less informative because the change landed without bumping the ABI version. |
@jonahwilliams - for the cache that flutter uses (in .dart_tool/flutter_build ?), does it use the sdk version as a signal to flush the cache? It sounds like the kernel artifacts aren't guaranteed to be compatible between VM versions. |
I'm not too familiar with Flutter and Engine's rolls, but it might be worth trying a new roll to include 1ef444139c4ce8a69b9772a600be1794b86d5c9a. |
In build_runner it looks like we rely on getting an So if that failed to happen as we expected then that is likely what is causing this issue? |
Given that this was just at flutter master and not a dev/stable release I think we just wait for the next roll and assume that will fix it? |
The flutter tool doesn't manage |
@cskau-g – should there be an issue in the SDK repo for this? |
It looks like the latest dev sdk does include 1ef4441 but this issue just came up again with that release :(. |
I'm not sure I'm the best person to say. But I suppose if this issue persists and we suspect it isn't simply a matter of updating some build scripts or pre-built files somewhere, then it should probably be tracked up-stream. I'm surprised though that you keep seeing the same error even after 1ef4441 has rolled, since I'd expect that to trigger a different error if versions were being mixed. |
Moved to dart-lang/sdk. If we continue to see this we should investigate. It sounds like we may need to:
|
We see this on the stagehand CI as well: https://travis-ci.org/github/dart-lang/stagehand/jobs/687544226 |
@johnniwinther suggested this may be a VM issue, w.r.t. the version skew of package_config. |
@devoncarew do you have reproduction instructions for the above? the link you have doesn't seem to show any errors. |
No repro instructions, but we have seen this on three separate CIs now. The link in the 1st comment does still show the issue. |
The first link shows the "Closure call with mismatched arguments" error which @cskau-g says was expected because of mismatched kernel files being used. |
@jakemac53 @natebosch Does
That link points to a green build.
See #41802 . @cskau-g is drafting a design for this atm. We maintain currently no compatibility between SDK versions. The kernel binary version is just a version for the AST encoding. Though the VM does requires stronger guarantees than to just be able to parse the files, it also expects e.g. certain transformers to be run, etc. |
|
This is exactly what build_runner does as well. We rely on the IsolateSpawnException. |
That is unsafe atm. If we do lock-step changes to VM and kernel transformers they have to match. This is not validated at runtime until #41802 is addressed. (/cc @mraleph Proofs the point we should really embed the SDK hash in the kernel files.) |
If running a snapshot from a different sdk version has potentially undefined semantics then I would argue that it should detect this itself and throw before attempting to run? This has been the behavior for many years, and existing tools do rely on it. |
I think we should bump the priorities of those other issues, given that we've seen more problems related to this recently. Sounds like those two issues are the best way to make progress here; I'll bump them to P1s. |
We're seeing this failure on the DevTools bots:
NoSuchMethodError from package:build_runner_core/src/package_graph/package_graph.dart 74:15 PackageGraph.forPath
With the possible root cause being in
package:package_config
?https://travis-ci.org/github/flutter/devtools/jobs/684021378#L591
The text was updated successfully, but these errors were encountered: