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

Build fail due to optional dependency #1272

Closed
andre2007 opened this issue Oct 20, 2017 · 3 comments
Closed

Build fail due to optional dependency #1272

andre2007 opened this issue Oct 20, 2017 · 3 comments

Comments

@andre2007
Copy link
Contributor

Background information to understand the issue: I am creating a XMake build infrastructure for the D Programming Language. There are some "golden rules" which I have to follow. I am not allowed to access the internet (code.dlang.org) during the build.

The consequence is, all dependencies have to be included. In my dub project I use the dub package "d-unit" which has an optional dependency to "unit-threaded" (https://github.com/linkrope/dunit/blob/master/dub.json#L24)

I extracted the d-unit zip file (https://github.com/linkrope/dunit/archive/v0.8.1.zip) into the main dub folder and added the dependency with "path" information.

"dependencies": {
		"d-unit": {"path":"dunit-0.8.1"}
	},

As mentioned, the dub build command is not allowed to use the internet and therefore has the skip argument:

dub build --skip-registry=all

The build fails due to the optional dependency to unit-threaded

Could not find a valid dependency tree configuration: Package d-unit contains invalid dependency
unit-threaded (no version candidates)

My proposal is to have a lazy dependency resolvement. As long as a configuration is not used, the dependencies should not be downloaded.

@andre2007
Copy link
Contributor Author

I just learned there is a parameter --nodeps (Do not check/update dependencies before building) for dub build. Although I use this parameter, the same error message is shown. Is this the correct behavior of --nodeps? I understand the description, that the check which causes the error message should not occur.

@andre2007
Copy link
Contributor Author

Pull request from skoppe #1148

@Geod24
Copy link
Member

Geod24 commented Jul 27, 2022

This is another duplicate of #1217

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants