Skip to content

Invalidate & regenerate script snapshots for globally installed dart apps #21904

Description

@mkustermann

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.

Activity

  1. mkustermann commented on Dec 17, 2014

    @mkustermann
    MemberAuthor

    Added Area-Pub label.

  2. mkustermann commented on Dec 17, 2014

    @mkustermann
    MemberAuthor

    For completeness:

    $ which dartformat
    /usr/.../kustermann/.pub-cache/bin/dartformat
    $ cat $(which dartformat)

    #!/usr/bin/env sh

    This file was created by pub v1.9.0-dev.0.0.

    Package: dart_style

    Version: 0.1.0-dev

    Executable: dartformat

    Script: format

    dart "/usr/local/google/home/kustermann/.pub-cache/global_packages/dart_style/bin/format.dart.snapshot" "$@"

  3. munificent commented on Dec 17, 2014

    @munificent
    Member

    Removed Priority-Unassigned label.
    Added Priority-High label.

  4. nex3 commented on Dec 17, 2014

    @nex3
    Member

    Try upgrading pub to the latest bleeding edge and running "pub cache repair". This should have been fixed in r42055.

  5. mkustermann commented on Dec 18, 2014

    @mkustermann
    MemberAuthor

    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.

  6. nex3 commented on Dec 18, 2014

    @nex3
    Member

    I agree. I filed issue #20802 and issue #20784 when we first started supporting snapshots, but nothing has happened there.


    Added Fixed label.

  7. added
    P1A high priority bug; for example, a single project is unusable or has many test failures
    on Dec 18, 2014
  8. DartBot commented on Jun 5, 2015

    @DartBot

    This issue has been moved to dart-lang/pub#1217.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1A high priority bug; for example, a single project is unusable or has many test failures

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions