dlang / dub

Package and build management system for D
MIT License
677 stars 227 forks source link

Serious regression in stable/v1.39 wrt. 'Non-optional dependency not found in dependency tree!?' #2973

Closed kinke closed 1 week ago

kinke commented 2 weeks ago

This trivial project fails the dependency resolution if the single dependency is on disk:

--- dub.sdl
name "foo"
dependency "arsd-official:cgi" version="~>10.9.0"

--- dub.selections.json
{
    "fileVersion": 1,
    "versions": {
        "arsd-official": "10.9.10"
    }
}

dub v1.38.0 works fine. New behavior with v1.39.0-beta.1 (latest stable) and latest master:

$ rm -rf ~/.dub/packages
$ dub build # fetches arsd-official and works fine
$ dub build --vverbose
Note: Failed to determine version of package foo at .. Assuming ~master.
Collecting dependencies for foo
Lazily loading package arsd-official:10.9.10 from /home/mkinkelin/.dub/packages/arsd-official/10.9.10/arsd-official/
  Found dependency arsd-official:cgi 10.9.10
  Collecting dependencies for arsd-official
core.exception.AssertError@source/dub/project.d(197): Non-optional dependency 'arsd-official:cgi' of 'foo' not found in dependency tree!?.
----------------
source/dub/project.d:197 [0x5af4b63cbc0a]
source/dub/project.d:208 [0x5af4b63cb85b]
source/dub/project.d:890 [0x5af4b63d790f]
source/dub/project.d:909 [0x5af4b63d40be]
source/dub/project.d:647 [0x5af4b63cc3f4]
source/dub/project.d:241 [0x5af4b63cc266]
source/dub/commandline.d:1490 [0x5af4b68236bc]
source/dub/commandline.d:1559 [0x5af4b6823d31]
source/dub/commandline.d:535 [0x5af4b66ec592]
source/app.d:39 [0x5af4b6833ccc]
kinke commented 2 weeks ago

In the v1.38 --vverbose output, it says it checks the subpackage deps, not the arsd-official parent package deps:

  Found dependency arsd-official:cgi 10.9.10
  Collecting dependencies for arsd-official:cgi
kinke commented 1 week ago

Fixed by #2974.