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

dependencies with a platform suffix is silently accepted and the suffix ignored #1049

Closed
rtbo opened this issue Jan 21, 2017 · 6 comments
Closed

Comments

@rtbo
Copy link
Contributor

rtbo commented Jan 21, 2017

On cross-platform dub packages that has e.g. a "dependencies-linux" entry in dub.json, dub tries to build the dependencies also on non-linux systems.
This makes building the package eventually fail if the dependency isn't meant to be built on a non-linux system.

rtbo added a commit to rtbo/dub1049 that referenced this issue Jan 21, 2017
@rtbo
Copy link
Contributor Author

rtbo commented Jan 21, 2017

steps to reproduce from a Windows system:

git clone https://github.com/rtbo/dub1049.git
cd dub1049
dub test

@s-ludwig
Copy link
Member

I haven't run the repro case yet, but that behavior would really surprise me, because actually platform suffixes are not supported at all for dependencies. So it should really not include the dependency at all in this case (outputting a warning would be helpful but is not yet implemented).

The intended way to get this working is to define separate configurations for each platform and put the platform specific dependencies in there. DUB will then still download them, but will only build those that are specified by the selected configuration.

@rtbo
Copy link
Contributor Author

rtbo commented Jan 21, 2017

If I understand, dub should not even try to download and build the linux specific dependency because this is not the correct way for specifying such dependency!

At least fixing my code will be easy, I will introduce configurations!

@Geod24 Geod24 changed the title dub attempts to build dependencies for other OS dependencies with a platform suffix is silently accepted and the suffix ignored Jan 3, 2020
@Geod24 Geod24 added the bug label Jan 3, 2020
@Geod24
Copy link
Member

Geod24 commented Jan 3, 2020

Regarding the download issue, we have #1706
But dub should either not take dependencies into account if it has a platform suffix, or honor it.

Changed the title accordingly.

@Geod24
Copy link
Member

Geod24 commented Jul 27, 2022

Will be fixed by #2280

@Geod24
Copy link
Member

Geod24 commented Jul 27, 2022

This is essentially #614 , closing as duplicate.

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

3 participants