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

Cargo should strip features of dev dependencies #12225

Closed
Morganamilo opened this issue Jun 2, 2023 · 3 comments · Fixed by #13518
Closed

Cargo should strip features of dev dependencies #12225

Morganamilo opened this issue Jun 2, 2023 · 3 comments · Fixed by #13518
Assignees
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-publish S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review

Comments

@Morganamilo
Copy link

Morganamilo commented Jun 2, 2023

Problem

#7333 added stripping of dependencies, but did not strip features pointing to those dependencies.

This causes a rather unintuitive error where cargo says the dependency does not exist. Which one would only understand if they knew about the stripping that cargo does.

Proposed Solution

Cargo should also strip these features from the manifest before publishing.

If foo is a dev-dependency being stripping then a = ["foo/a"] should be transformed to a = [].

Notes

No response

@Morganamilo Morganamilo added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage. labels Jun 2, 2023
@ehuss ehuss added Command-publish S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review and removed S-triage Status: This issue is waiting on initial triage. labels Jun 2, 2023
@eval-exec
Copy link
Contributor

@rustbot claim

@eval-exec
Copy link
Contributor

eval-exec commented Jun 4, 2023

Hello, I submitted a PR to fix this。 Would you like review my PR and provide your feedback? 💟

phil-opp added a commit to rust-osdev/bootloader that referenced this issue Dec 27, 2023
The test runner was accidentally disabled in #351, in an attempt to fix the publish errors introduced by #304 (caused by a bug in cargo: rust-lang/cargo#12225). As a result, the test runner became a no-op as neither the bios nor the uefi features were enabled.

This commit fixes the issue by enabling both features by default. Once the cargo bug is fixed, we might want to switch back to the feature configuration added of #304.

Fixes #405
@linyihai
Copy link
Contributor

@rustbot claim

I'm going to try, and if I haven't moved for a long time, feel free to pick it up and continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-publish S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review
Projects
None yet
4 participants