Skip to content

Add --public support for cargo add #13037

Description

@epage

Problem

rust-lang/rfcs#3516 calls for controlling the new public field in cargo add

Proposed Solution

Add --public and --no-public flags. This will mirror --optional / --no-optional

Test cases

  • Ability to add a new dep that is a public dependency
  • Able to turn an existing private dep into a public dep
  • Able to turn an existing public dep into a private dep

See the test cases for --optional for patterns in naming, etc.

Notes

The RFC called for --public <bool>. ... I don't remember why I did that. I think it might have been due to some aspects of a previous design of the RFC and I forgot to update it. We can note this in the tracking issue for us to approve this deviation.

No activity

Activity on this issue will appear here.

Activity

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-addS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewZ-public-dependencyNightly: public-dependency

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions