dlang / dub

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

Dub with inexistent dependency on other configuration #2627

Closed MrcSnm closed 8 months ago

MrcSnm commented 1 year ago

System information

Bug Description

Basically, this will fail when build with the default configuration. But the non existent dependency in the other config is not required for the default configuration and thus, should build. I know that there exists optional, but optional seems to have a little different use case than handling that. I want to know if you guys are willing to keep it like that and I must really use optional or if that is a bug.

How to reproduce?

{
    "authors": [
        "Marcelo Silva"
    ],
    "copyright": "Copyright © 2023, Marcelo Silva",
    "description": "A minimal D application.",
    "configurations": [
        {
            "name": "default"
        },
        {
            "name": "withDeps",
            "dependencies": {
                "noExist": {"path": "../"}
            }
        }
    ],
    "license": "proprietary",
    "name": "inexistent_ddep"
}

Expected Behavior

Logs

WebFreak001 commented 1 year ago

see #1217 for that dependency resolution should fail right now. Building should theoretically be fine though, so we can maybe adjust the building / dependency fetching algorithm to only fetch dependencies that are needed for the build configuration.

Geod24 commented 8 months ago

As mentioned, it's a duplicate of a well known issue (which is even pinned in this repository). I am working on it.