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

Manual versions or any version in dependencies #151

Closed
serates opened this issue Oct 31, 2013 · 4 comments
Closed

Manual versions or any version in dependencies #151

serates opened this issue Oct 31, 2013 · 4 comments
Milestone

Comments

@serates
Copy link

serates commented Oct 31, 2013

The problem I am running into using dub is with subpackages and versions. I use the top project to build my main executable and use subpackages to define my child libraries. So my dependencies list looks like:

{
   "hslc:semitwist": "~master",
   "hslc:goldie": "~master",
   "hslc:llvmd": "~master"
}

This is really nice but i'm running into a problem with using git branches for development. I tend to create branches for each feature or bugfix i implement. But when i try and compile in one of these branches dub errors out on conflicting package multi-references:

The same package is referenced in different paths:
  hslc ~upstream: /home/jmtierne/Projects/Hatchet
  hslc ~master: /home/jmtierne/Projects/Hatchet
Error: Conflicting package multi-references.

Now i'm assuming the problem here is that i am in upstream branch when everything expects ~master. I can fix it by replacing all ~master with ~upstream however doing this for each branch I create is frustrating. Is there a way to give a any version (*) to a dependency or manually define a version for the subPackages for dub to query on?

@s-ludwig
Copy link
Member

It's currently not possible to work around this, but once a good solution is found it will be implemented.

BTW, the same issue needs to be solved for branch and version based dependencies (e.g. "~master" and ">=1.0.0"). Those are also recognized as conflicting, even though arguably using any of the two would be fine.

@s-ludwig s-ludwig modified the milestones: 0.9.22, 0.9.21 Feb 10, 2014
@s-ludwig
Copy link
Member

Possible solution: for dependencies that are referencing a package in a pure parent path (e.g. "../../"), allow to drop the explicit version and use whatever is there. When still given, issue a warning. The other way around, if no version is given for a path reference to an external package, also output a warning.

@s-ludwig
Copy link
Member

The following should now work for any branch or version:

{
   "hslc:semitwist": "*",
   "hslc:goldie": "*",
   "hslc:llvmd": "*"
}

"*" is a new special version that matches anything available, meant especially for sub packages.

@serates
Copy link
Author

serates commented Mar 29, 2014

Awesome! Thanks a lot!

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