dub
dub copied to clipboard
dub fetch --annotate doesn't generate complete dub.selections.lock file
System information
- dub version: dub >=1.37.0
- OS Platform and distribution: Linux (NixOS)
- compiler version N/A
Bug Description
Note: all of the examples below also work with dub upgrade instead of dub fetch
Running dub fetch --annotate used to generate a complete dub.selections.json file.
After dub 1.37.0 it only fetches some but misses some deeper subprojects deeper in the dependency tree.
Just running dub fetch without --annotate will still work correctly, but it actually downloads the deps, which I do not want.
How to reproduce?
- clean your DUB_HOME:
rm -r ~/.dub - remove
dub.selections.jsonif it exists:rm dub.selections.json - depend on a subproject
- e.g. add
dependency "dcv:core" version="~>0.3.0"todub.sdl
- e.g. add
- run
dub fetch --annotate --verbose - see logs:
Using fixed selection dcv 0.3.0
Subpackage dcv:[email protected] not found.
- get only this as the selection:
{
"fileVersion": 1,
"versions": {
"dcv": "0.3.0"
}
}
Expected Behavior
- run
dub fetch --annotate --verbose- note: here I just copied the result from
dub fetch --verbosewithout--annotate
- note: here I just copied the result from
- see logs similar to this, but without the actual fetching:
Using fixed selection dcv 0.3.0
Subpackage dcv:[email protected] not found.
Dependency resolution result:
dcv: 0.3.0
Fetching dcv 0.3.0 (getting selected version)
Placing to User...
Found dependency dcv:core 0.3.0
Version selection for dependency bcaa (bcaa) of dcv:core is missing.
Missing dependency bcaa 0.0.8 of dcv:core
Version selection for dependency mir-algorithm (mir-algorithm) of dcv:core is missing.
Missing dependency mir-algorithm >=3.15.3 of dcv:core
Version selection for dependency mir-random (mir-random) of dcv:core is missing.
Missing dependency mir-random 2.2.19 of dcv:core
Using fixed selection dcv 0.3.0
- get selections
{
"fileVersion": 1,
"versions": {
"bcaa": "0.0.8",
"dcv": "0.3.0",
"mir-algorithm": "3.22.1",
"mir-core": "1.7.1",
"mir-linux-kernel": "1.2.1",
"mir-random": "2.2.19",
"silly": "1.1.1"
}
}
Note: after having the dependencies downloaded into your DUB_HOME, the running the command with --annotate works as expected