Skip to content
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

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

Closed
DanTup opened this issue Feb 10, 2021 · 1 comment
Labels
in commands Relates to commands (usually invoked from the command Palette) is bug
Milestone

Comments

@DanTup
Copy link
Member

DanTup commented Feb 10, 2021

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.

@DanTup DanTup added is bug in commands Relates to commands (usually invoked from the command Palette) labels Feb 10, 2021
@DanTup DanTup added this to the v3.20.0 milestone Feb 10, 2021
@DanTup DanTup closed this as completed in 7f411e3 Feb 10, 2021
@DanTup
Copy link
Member Author

DanTup commented Feb 10, 2021

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
Labels
in commands Relates to commands (usually invoked from the command Palette) is bug
Projects
None yet
Development

No branches or pull requests

1 participant