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: need "dependency overrides" for development #8566

Closed
jmesserly opened this issue Feb 15, 2013 · 20 comments
Closed

pub: need "dependency overrides" for development #8566

jmesserly opened this issue Feb 15, 2013 · 20 comments
Assignees
Labels
type-enhancement A request for a change that isn't a bug

Comments

@jmesserly
Copy link

If I want to hack on a library package that is used by a few other packages in my dependency graph, I need to clone all of them locally, edit their pubspecs and use path dependencies.

It would be great if I could instruct Pub to use my version of the library package for all transitive dependencies.

@jmesserly
Copy link
Author

Issue #8553 has been merged into this issue.

@munificent
Copy link
Member

I'd like this too.


Set owner to @munificent.

@munificent
Copy link
Member

Marking as "later" to just mean "haven't bucketed in a milestone yet" not "definitely after M6".


Added this to the Later milestone.

@munificent
Copy link
Member

Issue #12395 has been merged into this issue.


cc @sethladd.
cc @dgrove.
cc @sigmundch.

@munificent
Copy link
Member

Issue #12250 has been merged into this issue.

1 similar comment
@sethladd
Copy link
Contributor

Issue #12250 has been merged into this issue.

@sethladd
Copy link
Contributor

Added C4 label.

@munificent
Copy link
Member

Added Started label.

@munificent
Copy link
Member

@danschultz
Copy link

Are dependencies overridden through a command line option, or specifying which ones in the pubspec?

@munificent
Copy link
Member

I still need to write docs for this, but there is a separate section in your pubspec:

name: myapp
dependency_overrides:
  ...

The contents of that look just like a regular dependencies section, except that these ones will completely override any other constraint on a dependency with the same name.

@danschultz
Copy link

Ok, thank you. Can't wait to use this!

@DartBot
Copy link

DartBot commented Dec 18, 2013

This comment was originally written by @danschultz


Is this in DartEditor 30798? It's not working for me.

@munificent
Copy link
Member

Yes, it should be. It was checked in r30376. What does your pubspec look like?

@DartBot
Copy link

DartBot commented Dec 18, 2013

This comment was originally written by @danschultz


name: taco_client
dependencies:
  ...
  my_dep: any
  ...
dependency_overrides:
  my_dep:
    path: ../my_dep.dart
dev_dependencies:
  unittest: any
  
Here's my version of Pub that I'm running: Pub 1.0.0+10.r30798

@munificent
Copy link
Member

That seems to work fine for me. What output are you getting and what are you expecting to get?

@DartBot
Copy link

DartBot commented Dec 18, 2013

This comment was originally written by @danschultz


When I run pub get, I expect my lock file to be updated to use the path dependency. But no joy.

@munificent
Copy link
Member

I'm still not able to repro this. Can you run pub get --verbose and include the output here? Also, the contents of your lockfile may help.

@danschultz
Copy link

Zip is attached with the yaml file and pub get output. You can find the generated lock content in the output.


Attachment:
pub_dep_overrides.zip (12.33 KB)

@DartBot
Copy link

DartBot commented Jun 5, 2015

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

@kevmoo kevmoo added the type-enhancement A request for a change that isn't a bug label 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