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

feat(embedded): Hack in code fence support #12681

Merged
merged 6 commits into from
Sep 26, 2023
Merged

Conversation

epage
Copy link
Contributor

@epage epage commented Sep 16, 2023

What does this PR try to resolve?

This is to allow us to get feedback on the design proposed
on zulip
to verify we want to make an RFC for this syntax.

#!/usr/bin/env cargo
```cargo
[dependencies]
clap = { version = "4.2", features = ["derive"] }
```

use clap::Parser;

#[derive(Parser, Debug)]
#[clap(version)]
struct Args {
    #[clap(short, long, help = "Path to config")]
    config: Option<std::path::PathBuf>,
}

fn main() {
    let args = Args::parse();
    println!("{:?}", args);
}

How should we test and review this PR?

The tests were updated in a separate commit to ensure there was no regression while then migrating to the new syntax to make sure it worked.

This involves some future work

  • Removing doc comment support
  • Getting the syntax approved and implemented
  • Migrating to rustc support for the syntax

#12207 was updated to record these items so we don't lose track of them

Before we were delegating to rustc for errors but that doesn't help with
commands like `cargo metadata`.
@rustbot
Copy link
Collaborator

rustbot commented Sep 16, 2023

r? @weihanglo

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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 16, 2023
src/cargo/util/toml/embedded.rs Outdated Show resolved Hide resolved
src/cargo/util/toml/embedded.rs Show resolved Hide resolved
@rustbot rustbot added the A-documenting-cargo-itself Area: Cargo's documentation label Sep 18, 2023
@epage epage force-pushed the frontmatter branch 3 times, most recently from ca8af3b to b3bc676 Compare September 20, 2023 00:38
Copy link
Member

@Muscraft Muscraft left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@Muscraft
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Sep 26, 2023

📌 Commit b3bc676 has been approved by Muscraft

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 Sep 26, 2023
@Muscraft Muscraft added the Z-script Nightly: cargo script label Sep 26, 2023
@epage epage added the Z-script Nightly: cargo script label Sep 26, 2023
@bors
Copy link
Contributor

bors commented Sep 26, 2023

⌛ Testing commit b3bc676 with merge 25dc3bd...

@bors
Copy link
Contributor

bors commented Sep 26, 2023

☀️ Test successful - checks-actions
Approved by: Muscraft
Pushing 25dc3bd to master...

@bors bors merged commit 25dc3bd into rust-lang:master Sep 26, 2023
19 checks passed
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 27, 2023
Update cargo

11 commits in 414d9e3a6d8096f3e276234ce220c868767a8792..e6aabe8b3fcf639be3a5bf68e77853bd7b3fa27d
2023-09-22 07:03:57 +0000 to 2023-09-26 16:31:53 +0000
- Use full target spec for `cargo rustc --print --target` (rust-lang/cargo#12743)
- feat(embedded): Hack in code fence support (rust-lang/cargo#12681)
- chore(ci): Update Renovate schema (rust-lang/cargo#12741)
- more specific registry index not found msg (rust-lang/cargo#12732)
- docs: warn about upload timeout (rust-lang/cargo#12733)
- Fix some typos (rust-lang/cargo#12730)
- upgrade gitoxide to v0.54 (rust-lang/cargo#12731)
- Update target-arch-aware crates to support mips r6 targets (rust-lang/cargo#12720)
- Buffer console status messages. (rust-lang/cargo#12727)
- Fix spurious errors with networking tests. (rust-lang/cargo#12726)
- refactor(SourceId): merge `name` and `alt_registry_key` into one enum (rust-lang/cargo#12675)

r? ghost
@epage epage deleted the frontmatter branch September 27, 2023 16:06
@ehuss ehuss added this to the 1.74.0 milestone Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documenting-cargo-itself Area: Cargo's documentation S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. Z-script Nightly: cargo script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants