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

Support overwriting a foo.workspace = true with a dependency from a… #4

Merged
merged 1 commit into from
Apr 27, 2022

Conversation

Muscraft
Copy link
Owner

Tracking issue: rust-lang#8415
RFC: rust-lang/rfcs#2906

PRs in this RFC:

Changes:

  • Made update_toml() take in a KeyMut that could be formatted as needed
  • Formatted KeyMut anytime the source is not WorkspaceSource
    • This is done so that when we go from a WorkspaceSource (foo.workspace = true) to any other source there is a space after foo
    • foo= { version = "0.0.0", path = "../dependency" } vs foo = { version = "0.0.0", path = "../dependency"

Remaining implementation work for the RFC

r? @epage

@Muscraft Muscraft merged this pull request into cargo-add-support Apr 27, 2022
bors added a commit to rust-lang/cargo that referenced this pull request Apr 28, 2022
Cargo add support for workspace inheritance

Tracking issue: #8415
RFC: rust-lang/rfcs#2906

This PR adds all the required support for workspace inheritance within `cargo-add`. It was split up across a few different PRs as it required `snapbox` support from #10581 and a new `toml_edit` version from #10603. `@epage` and I decided to go ahead with this PR and add in some of the changes those PRs made. `@epage's` name on the commits is from helping to rewrite commits and some very minor additions.

Changes:
  - #10585
  - Muscraft#1
  - Muscraft#3
  - Muscraft#2
  - Muscraft#4

r? `@epage`
@Muscraft Muscraft deleted the overwrite-workspace-dep branch May 27, 2022 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants