Skip to content

feat(cli): Support cargo Cargo.toml#12281

Merged
bors merged 2 commits into
rust-lang:masterfrom
epage:toml
Jun 21, 2023
Merged

feat(cli): Support cargo Cargo.toml#12281
bors merged 2 commits into
rust-lang:masterfrom
epage:toml

Conversation

@epage

@epage epage commented Jun 17, 2023

Copy link
Copy Markdown
Contributor

What does this PR try to resolve?

This is making the assumption that we want full unity between places accepting both single-file packages and Cargo.toml for #12207. This has not been brought up before in any of the discussions (Internals, eRFC), so I can understand if there are concerns about this and we decide to hold off.

We might want to resolve symlinks before this so people can have a prettier name for these.

How should we test and review this PR?

The test for this was added in a commit before the actual change, letting people see how the behavior changed.

epage added 2 commits June 16, 2023 21:12
This wasn't in the original Pre-RFC but in terms of consistently
accepting manifests everything, I think this makes sense.
@rustbot

rustbot commented Jun 17, 2023

Copy link
Copy Markdown
Collaborator

r? @ehuss

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-cli Area: Command-line interface, option parsing, etc. A-documenting-cargo-itself Area: Cargo's documentation Command-run S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 17, 2023
@epage
epage force-pushed the toml branch 4 times, most recently from f11ebdd to 7f2eca4 Compare June 19, 2023 15:47

@weihanglo weihanglo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like pretty similar to #12289 but for cargo <script.rs>. I don't have a strong opinion against the feature itself, but I am more curious about how we teach this (and #12289 as well)?

Apart from that, I can merge it as is.

@weihanglo weihanglo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's leave teaching discussion then.

I love the consistency between this and #12289. Merge and move on.

Edited: Just want to note that this cargo Cargo.toml can be seen as a shorthand of cargo run --manifest-path Cargo.toml.

@weihanglo

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Jun 21, 2023

Copy link
Copy Markdown
Contributor

📌 Commit 7f2eca4 has been approved by weihanglo

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 21, 2023
@bors

bors commented Jun 21, 2023

Copy link
Copy Markdown
Contributor

⌛ Testing commit 7f2eca4 with merge 3de1cc4...

@bors

bors commented Jun 21, 2023

Copy link
Copy Markdown
Contributor

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing 3de1cc4 to master...

@bors
bors merged commit 3de1cc4 into rust-lang:master Jun 21, 2023
@epage
epage deleted the toml branch June 21, 2023 19:38
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 22, 2023
Update cargo

2 commits in dead4b8740c4b6a8ed5211e37c99cf81d01c3b1c..4cebd130ebca3bc219180a54f3e26cc1b14a91de
2023-06-20 20:07:17 +0000 to 2023-06-21 18:59:29 +0000
- fix: Allow embedded manifests in all commands (rust-lang/cargo#12289)
- feat(cli): Support `cargo Cargo.toml` (rust-lang/cargo#12281)

r? `@ghost`
@ehuss ehuss added this to the 1.72.0 milestone Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area: Command-line interface, option parsing, etc. A-documenting-cargo-itself Area: Cargo's documentation Command-run S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants