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

Disallow cargo from downloading dev-dependencies when they are not needed. #21

Closed
diseraluca opened this issue May 27, 2021 · 0 comments · Fixed by #22
Closed

Disallow cargo from downloading dev-dependencies when they are not needed. #21

diseraluca opened this issue May 27, 2021 · 0 comments · Fixed by #22
Assignees
Labels
bug Something isn't working cargo #![no_std]

Comments

@diseraluca
Copy link
Owner

Currently, cargo build downloads all dependencies independently of if they are needed.

What this means for us, is that it tries to download and compile the dev-dependencies, which require std and are used only for tests and examples, even when building the library for embedded devices, where std is not present, failing the compilation.

Some possible solutions to this might be moving the example and tests in another crate, but this might not be possible as some tests may require access to private parts of the code and by rust convention should live in the module where the code is declared, moving to nightly where a solution to this problem is provided or hiding things behind a feature.

@diseraluca diseraluca added bug Something isn't working #![no_std] cargo labels May 27, 2021
@diseraluca diseraluca self-assigned this May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cargo #![no_std]
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant