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

version-based dependency overridden by path-based from _unselected_ configuration #777

Closed
rcorre opened this issue Feb 27, 2016 · 4 comments

Comments

@rcorre
Copy link

rcorre commented Feb 27, 2016

Given the following:

name "dubtest"

configuration "dynamic" {
    dependency "allegro" version="~>2.0.3+5.0.10"
    targetType "executable"
    libs "allegro"
}

configuration "static" {
    dependency "allegro" path="DAllegro5"
}

dub build --config=dynamic will get the allegro dependency from ./DAllegro5 rather than looking in the cache for the versioned dependency.

If you delete the dependency from the unused configuration, it works.

Full output:

[rcorre@desktop-arch dubtest]$ dub run --config=dynamic -v
Using dub registry url 'http://code.dlang.org/'
Refreshing local packages (refresh existing: true)...
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /home/rcorre/.dub/packages/local-packages.json
Note: Failed to determine version of package dubtest at .. Assuming ~master.
Refreshing local packages (refresh existing: false)...
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /home/rcorre/.dub/packages/local-packages.json
Adding local /tmp/dubtest/DAllegro5
Note: Failed to determine version of package allegro at .. Assuming ~master.
Found dependency allegro >=0.0.0 @DAllegro5
Checking for missing dependencies.
Using fixed selection allegro 2.0.3+5.0.10
Refreshing local packages (refresh existing: false)...
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /home/rcorre/.dub/packages/local-packages.json
Adding local /tmp/dubtest/DAllegro5
Found dependency allegro >=0.0.0 @DAllegro5
Checking for upgrades.
Using cached upgrade results...
Generating using build
Generate target dubtest (executable /tmp/dubtest dubtest)
Generate target allegro (staticLibrary /tmp/dubtest/DAllegro5 dallegro5)
Performing "debug" build using dmd for x86_64.
allegro ~master: target for configuration "no-libs" is up to date.
Using existing build in /tmp/dubtest/DAllegro5/.dub/build/no-libs-debug-linux.posix-x86_64-dmd_2070-F918032832AACEBCEA74E06E9194D292/.
Copying target from /tmp/dubtest/DAllegro5/.dub/build/no-libs-debug-linux.posix-x86_64-dmd_2070-F918032832AACEBCEA74E06E9194D292/libdallegro5.a to /tmp/dubtest/DAllegro5
dubtest ~master: target for configuration "dynamic" is up to date.
Using existing build in /tmp/dubtest/.dub/build/dynamic-debug-linux.posix-x86_64-dmd_2070-BD38FC2B9D3466932F0883331E42F1A8/.
Copying target from /tmp/dubtest/.dub/build/dynamic-debug-linux.posix-x86_64-dmd_2070-BD38FC2B9D3466932F0883331E42F1A8/dubtest to /tmp/dubtest
To force a rebuild of up-to-date targets, run again with --force.
Running ./dubtest
@rcorre
Copy link
Author

rcorre commented Feb 27, 2016

Using fixed selection allegro 2.0.3+5.0.10

This should come from the cache, but later ...

Using existing build in /tmp/dubtest/DAllegro5/.dub/build/no-libs-debug-linux.posix-x86_64-dmd_2070F918032832AACEBCEA74E06E9194D292/.

s-ludwig added a commit that referenced this issue Feb 27, 2016
@s-ludwig
Copy link
Member

Is this happening for 0.9.24? I can confirm it there, but on master it appears to be fixed already. I've added a test case to ensure that this is/stays fixed.

@rcorre
Copy link
Author

rcorre commented Feb 27, 2016

Yeah, that was 0.9.24. Looks fine on master. Thanks!

@WebFreak001
Copy link
Member

issue was reintroduced it seems, but is now being tracked in #1217

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