Skip to content

New pub packages that are not compatible with the current Dart SDK result in "Failed to install" messages #3138

Closed

Description

@DanTup

When checking Global Pub package versions, we do this:

  • Check the latest version mentioned in the Pub API results
  • If it's below the installed version, run pub global activate
  • Check the newly-installed version and if there's a mismatch, assume installation failed

However right now there are a lot of published packages with null-safety that have a version constraint that makes them incompatible with the current Dart SDK. This means the last step fails. This breaks some integration tests, but could also show up for users if any of the packages we actually use (outside of tests) like DevTools or Stagehand published an update that didn't work on the current SDK either.

Activity

  1. added
    in commandsRelates to commands (usually invoked from the command Palette)
    on Feb 10, 2021
  2. added this to the v3.20.0 milestone on Feb 10, 2021
  3. DanTup commented on Feb 10, 2021

    @DanTup
    MemberAuthor

    Made a simple fix for this, to not consider UpdateAvailable an error after updating. It still means we could prompt to update when there isn't really an update, but this situation is probably an edge case and unlikely to apply to any actual packages we use (it happens in the tests a lot because we just activate some "random" packages for testing).

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

    in commandsRelates to commands (usually invoked from the command Palette)is bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions