Skip to content

Cargo should strip features of dev dependencies #12225

Closed

Description

@Morganamilo

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

Activity

  1. added
    C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
    S-triageStatus: This issue is waiting on initial triage.
    on Jun 2, 2023
  2. added
    S-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or review
    and removed
    S-triageStatus: This issue is waiting on initial triage.
    on Jun 2, 2023
  3. eval-exec commented on Jun 4, 2023

    @eval-exec
    Contributor

    @rustbot claim

  4. eval-exec commented on Jun 4, 2023

    @eval-exec
    Contributor

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

  5. added a commit that references this issue on Dec 27, 2023
  6. linyihai commented on Feb 21, 2024

    @linyihai
    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.

  7. added a commit that references this issue on Mar 14, 2024
    403fbe2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-publishS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or review

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions