dlang / dub

Package and build management system for D
MIT License
672 stars 230 forks source link

Dependencies not found (subpackage-related?) #140

Closed p0nce closed 10 years ago

p0nce commented 10 years ago

When using dub on this package.json file:

{
    "name": "test",
    "targetName": "test",
    "targetType": "executable",
    "sourcePath": ".",
    "importPaths": [ "."],

    "dependencies": {
        "gfm:sdl2": "~master"
    }
}

We get an error "derelict-sdl2" not found. But derelict-sdl2 is a valid package on the dub registry.

I think it has something to do with subpackages, the scheme here is: "package A depending on some lib sub-package B which depends on package C" when dubbing package A.

The exception is thrown in the getTopologicalPackageList function, but it's unclear to me how to fix.

There is two work-arounds:

p0nce commented 10 years ago

Same as #139

s-ludwig commented 10 years ago

There have been some related commits today and when I use that package.json file, the build goes fine up to the linking stage, where it misses several gfm math modules. But that seems to be due to a misconfiguration of the "gfm:sdl2" package, which uses "gfm:math", but doesn't have it listed as a dependency.

Can you test again with git HEAD?

p0nce commented 10 years ago

Sorry still no luck with dub HEAD (c82ff3f421972a9dcb6e00d41fbb4b932d2887bd). Note that to reproduce derelict-sdl2 should neither be already installed, nor in an added local path.

s-ludwig commented 10 years ago

Okay I already had it installed, probably due to some earlier tests. It turns out that sub packages were explicitly excluded from missing dependency resolution for some (currently unknown) reason. We'll have to see if this causes any regressions.

p0nce commented 10 years ago

Thanks! My understanding is that sub-packages, other than inheriting some parent JSON variables and being declared at the same place, are entirely different packages.

s-ludwig commented 10 years ago

Exactly, logically they are completely separate.