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

Optional dependency being used anyway #1089

Open
Abscissa opened this issue Mar 1, 2017 · 2 comments
Open

Optional dependency being used anyway #1089

Abscissa opened this issue Mar 1, 2017 · 2 comments

Comments

@Abscissa
Copy link
Contributor

Abscissa commented Mar 1, 2017

Maybe I'm misunderstanding something about the optional dependencies, but they don't appear to be optional. mysql-native has an optional dependency on vibe, as seen in mysqln's dub.sdl.

But if I create a fresh new directory, with these two files:

dub.sdl:

name "test"
dependency "mysql-native" version="~>1.0.0"

src/main.d:

import mysql;
void main() {}

And then run dub, dub will download vibe core, include vibe core in dub.selections.json. Using '-v' reveals that -version=Have_vibe_d_core is included in the build.

@Abscissa
Copy link
Contributor Author

Abscissa commented Mar 1, 2017

FWIW, that was with dub v1.2.0

@skoppe
Copy link
Contributor

skoppe commented May 28, 2017

I think I have a similar problem with dub 1.3.0

I am using vibe-d and trying to compile with botan, instead of openssl.

From what I understand botan and openssl are optional dependencies of vibe.stream. Openssl is the default optional dependency, which means it will get picked by default unless a dub.selections.json exists.

Now, regardless of what I do, the Have_openssl version gets set when compiling. That means it will pull in the openssl library when linking.

I think that dub should not set the version for an optional dependency that isn't used.

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

No branches or pull requests

2 participants