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

Sub-package path dependencies don't work #754

Closed
carlor opened this issue Jan 25, 2016 · 6 comments
Closed

Sub-package path dependencies don't work #754

carlor opened this issue Jan 25, 2016 · 6 comments

Comments

@carlor
Copy link
Contributor

carlor commented Jan 25, 2016

The following dependencies:

        "dependencies": {
                  "vibe-d": {"path": "../vibe.d"}
        }

With vibe-d master in ../vibe.d leads to the following error message:
Unknown dependency: vibe-d:core

@p0nce
Copy link
Contributor

p0nce commented Feb 1, 2016

Try the following things :

  • dub clean-caches
  • remove dub.selection.json from the project directory
  • remove global DUB state in .dub directory (C:\Users\$USER\AppData\Roaming\dub on Windows).
    This solves such problems here.

@s-ludwig
Copy link
Member

s-ludwig commented Feb 1, 2016

If it's not caused by locally cached information, which version of DUB is this? It works for me with GIT master.

@carlor
Copy link
Contributor Author

carlor commented Feb 1, 2016

It worked by removing dub.selection.json

@s-ludwig
Copy link
Member

s-ludwig commented Feb 1, 2016

Do you have the old dub.selections.json file still lying around by chance? Would be interesting to see if the error has been legitimate or if it could be improved. But I haven't been able to reproduce it, so without more information I guess this can be closed.

@carlor
Copy link
Contributor Author

carlor commented Feb 1, 2016

Here's how I reproduced it:

  1. First create vibe project: $ dub init proj -t vibe.d; cd proj
  2. Run: $ dub run
  3. dub.selections.json now includes "vibe-d": "0.7.26"
  4. Change dub.json to have "vibe-d": {"path": "../vibe.d"}
  5. dub.selections.json hasn't changed, so dub run fails.
  6. Remove dub.selections.json,
  7. Now it works.

Should dub.selections.json be removed every time dub.json changes?

@s-ludwig
Copy link
Member

s-ludwig commented Feb 2, 2016

No, that's a bug. It should still pick 0.7.26, since it's listed in dub.selections.json, but output a warning "vibe-d 0.7.26 doesn't match dependency specification path=../, do you need to 'dub upgrade'" or similar. I'll have a look.

s-ludwig added a commit that referenced this issue Feb 2, 2016
s-ludwig added a commit that referenced this issue Feb 10, 2016
…endency-fail

Let dub.selections.json always have precedence. Fixes #754.
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

3 participants