Skip to content

Disable adding a feature when using cargo-add --optional #13430

Closed as not planned
@passcod

Description

@passcod

Problem

With #13071, cargo add started creating explicit features for new optional deps. While I understand the reasoning, this is frustrating to have to keep remembering to delete that line when I actively want to use the newer behaviour that adding optional dependencies doesn't create features.

Proposed Solution

Some kind of opt-in switch or heuristic that will let me disable this behaviour.

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-addS-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions