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

"pub global activate" should more flexibly choose a package version to activate #20287

Closed
sethladd opened this issue Jul 30, 2014 · 15 comments
Closed
Assignees
Labels
type-enhancement A request for a change that isn't a bug

Comments

@sethladd
Copy link
Contributor

sethladd:~$ pub --version
Pub 1.6.0-dev.4.0

sethladd:~$ pub global activate polymer
Downloading polymer 0.12.0+1...
Resolving dependencies...
Incompatible version constraints on barback:

  • polymer 0.12.0+1 depends on version >=0.14.2 <0.15.0
  • pub itself depends on version >=0.13.0 <0.14.2

use case: just trying to install polymer so I can test building the docs.

@sethladd
Copy link
Contributor Author

Looks like this is also blocking our docs build: https://code.google.com/p/dart/issues/detail?id=20285


cc @sigmundch.

@sethladd
Copy link
Contributor Author

Issue #20285 has been merged into this issue.

@sigmundch
Copy link
Member

cc @nex3.

@sigmundch
Copy link
Member

Just spoke with Natalie - I think you can do pub global active polymer 0.12.0 and it should work for you.

Starting with polymer 0.12.0+1 we need barback 0.14.2, which will be supported by the next dev channel release of pub

@nex3
Copy link
Member

nex3 commented Jul 31, 2014

I'm re-targeting this to be a feature request for "pub global activate" doing some version resolution on the package in question.

The reason this is failing for you is, as Siggi mentioned, that Polymer 0.12.0+1 depends on barback 0.14.2, which is incompatible with pub 1.6.0-dev.4.0. That said, "pub global activate" should probably be smart enough to realize that Polymer 0.12.0 doesn't have this dependency, and install that instead.


cc @munificent.
Removed Type-Defect, Area-Pkg, Pkg-Polymer labels.
Added Type-Enhancement, Area-Pub labels.
Changed the title to: ""pub global activate" should more flexibly choose a package version to activate".

@sethladd
Copy link
Contributor Author

Thanks for the analysis!

The 'pub global activate' thing is part of the issue, for sure.

Did you happen to also take a look at https://code.google.com/p/dart/issues/detail?id=20285 ? The dartdoc build for this polymer package broke, and it reported the same kind of barback version issue.

@munificent
Copy link
Member

Issue #20285 has been merged into this issue.

@DartBot
Copy link

DartBot commented Aug 4, 2014

This comment was originally written by kurotensh...@autistici.org


Arg this damned Barback !!!!

It's not the first time I have this reflective dependency error !

Why can't we override dependencies of "pub itself" to be able to use packages that trigger this error ? Polymer is not the only one in this case.

@nex3
Copy link
Member

nex3 commented Aug 4, 2014

Why can't we override dependencies of "pub itself" to be able to use packages that trigger this error ? Polymer is not the only one in this case.

Pub's dependency on barback isn't spurious; it really does only work with that range of barback versions. If you were to override the dependency, "pub serve", "pub build", and "pub run" would break in confusing and painful ways.

@DartBot
Copy link

DartBot commented Aug 4, 2014

This comment was originally written by kurotensh...@autistici.org


So, why publish a 0.12.0+7 version of polymer in pub if it's impossible to use it ?

@nex3
Copy link
Member

nex3 commented Aug 4, 2014

So, why publish a 0.12.0+7 version of polymer in pub if it's impossible to use it ?

The short answer is that it will be possible to use it eventually.

The long answer has to do with how we develop packages in the Dart repo. Due to the way our test infrastructure is set up, each package in the repo need to be compatible with the latest version of each other package. This means that in order to fully extract the source_span package from the source_maps package, we needed to make each other package that uses its functionality—including Polymer—use the latest version of barback in order to use its source_span functionality.

In addition, we have a policy of immediately releasing any version of a package that just increments its build identifier, so this new Polymer version was released.

@sethladd
Copy link
Contributor Author

sethladd commented Aug 5, 2014

Immediately releasing a polymer pkg that doesn't work with a published dev channel of the SDK means we can't build the docs for it :( That's what https://code.google.com/p/dart/issues/detail?id=20285 was all about.

@nex3
Copy link
Member

nex3 commented Aug 20, 2014

Set owner to @nex3.
Added Started label.

@nex3
Copy link
Member

nex3 commented Aug 20, 2014

Fixed in r39429.


Added Fixed label.

@DartBot
Copy link

DartBot commented Jun 5, 2015

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

@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

6 participants