Skip to content

(1.24.3) pub get spins forever on a mix of dart_style, http, and test #1825

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

Closed
jakobr-google opened this issue Mar 14, 2018 · 1 comment
Closed

Comments

@jakobr-google
Copy link

Steps to reproduce:

  1. Create pubspec.yaml with these contents:
name: publoop

dependencies:
  dart_style: '>=1.0.7 <2.0.0'
  http: '>=0.11.1 <0.12.0'

dev_dependencies:
  test: '^0.12.0'
  1. Run pub get.

Expected result: Success, dependencies resolved.

Actual result:

jakobr@jakobr-goobuntu:~/tmp/publoop$ pub --version
Pub 1.24.3
jakobr@jakobr-goobuntu:~/tmp/publoop$ pub get
Resolving dependencies... (1:03.7s)^C
jakobr@jakobr-goobuntu:~/tmp/publoop$ 

(yeah, I have tried letting it run longer than 1 minute. Travis killed it after waiting for about 50 minutes in dart-archive/discoveryapis_generator#185).

Workaround:

Change the dart_style dependency to >=1.0.7 <=1.0.9+1. The issue seems to be caused by dart_style 1.0.10 depending on analyzer 0.31.2-alpha.0, which requires SDK >=2.0.0-dev. Which 1.24.3 isn't, but for some reason, pub still tries to go with it.

Removing any one of the dependencies in pubspec.yaml also makes the bug disappear. All 3 are needed to cause the loop.

@nex3
Copy link
Member

nex3 commented Mar 14, 2018

Duplicate of #912. This isn't actually spinning forever, it's just going exponential due to flaws in pub's old algorithm. The new version solver will fix cases like this (although note that it won't be in 1.24, since there are no new 1.x releases being cut).

@nex3 nex3 closed this as completed Mar 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants