-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Invalidate & regenerate script snapshots for globally installed dart apps #21904
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
Added Area-Pub label. |
For completeness: $ which dartformat #!/usr/bin/env sh This file was created by pub v1.9.0-dev.0.0.Package: dart_styleVersion: 0.1.0-devExecutable: dartformatScript: formatdart "/usr/local/google/home/kustermann/.pub-cache/global_packages/dart_style/bin/format.dart.snapshot" "$@" |
Removed Priority-Unassigned label. |
Try upgrading pub to the latest bleeding edge and running "pub cache repair". This should have been fixed in r42055. |
It works, but the fact that it prints "Wrong script snapshot version, expected 'f6711525cff9f7d0d08595166664b767' found 'a3a313ea90040f8a3aaa5f443ecbb3db'" is not nice at all. One way of avoiding this would be to add something like "dart --test-snapshot-compatibility file.snapshot", so one can ask the VM whether it can read the snapshot, instead of just trying to run it and see what happens :-/ If one would implement this, you could also use "exec dart ..." instead. |
This issue has been moved to dart-lang/pub#1217. |
Reproduction on my machine:
$ pub global activate -sgit https://github.com/dart-lang/dart_style
$ dartformat
Wrong script snapshot version, expected 'f6711525cff9f7d0d08595166664b767' found '74629058babcf012a75ec8e5b364e464'
Pub should make sure to invalidate script snapshots and re-generate them (on demand) when the dart binary changed.
The text was updated successfully, but these errors were encountered: