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): Add multiple experimental manifest syntaxes #13241

Merged
merged 3 commits into from
Jan 3, 2024

Conversation

epage
Copy link
Contributor

@epage epage commented Jan 2, 2024

What does this PR try to resolve?

As syntax discussions for "cargo script" are on-going, this allows us to experiment with a couple of them so we can see how they work in practice.

This is missing the line-prefix syntax as we decide how we want to separate blocks for it.

While doing this, I removed the previous doc-comment syntax. This was left in for transition purposes. With where discussions are going, its unlikely we'll go back to that syntax.

How should we test and review this PR?

Additional information

rust-lang/rfcs#3503

https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Syntax.20for.20embedded.20tooling.20metadata

We added code fence support in ba869d3
(September), so I think this was enough of a transition period and there
is little interest in going back to this.
This is to allow us to experiment with how things change if there is no
infostring.
@rustbot
Copy link
Collaborator

rustbot commented Jan 2, 2024

r? @ehuss

(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 Jan 2, 2024
src/cargo/util/toml/embedded.rs Outdated Show resolved Hide resolved
Comment on lines +238 to +241
if tick_char == '#' {
// Attribute
return Ok(source);
}
Copy link
Member

Choose a reason for hiding this comment

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

Should this explicitly check for #![] or #[]?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd rather not get into the complexity of matching rust syntax. If we go this route, we can further evaluate what the exact behavior should be.

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! As this is an eRFC, I am happy to approve this.

@Muscraft
Copy link
Member

Muscraft commented Jan 3, 2024

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 3, 2024

📌 Commit 22200b7 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 Jan 3, 2024
@bors
Copy link
Collaborator

bors commented Jan 3, 2024

⌛ Testing commit 22200b7 with merge f9946d1...

@bors
Copy link
Collaborator

bors commented Jan 3, 2024

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

@bors bors merged commit f9946d1 into rust-lang:master Jan 3, 2024
22 checks passed
@weihanglo
Copy link
Member

Should we update the unstable doc accordingly?

@epage epage deleted the syntax branch January 3, 2024 22:37
@epage
Copy link
Contributor Author

epage commented Jan 3, 2024

I think I'd rather wait until we have something more definitive to say about what direction we are going.

epage added a commit to epage/cargo that referenced this pull request Jan 3, 2024
This is a follow up to rust-lang#13241 with another syntax being discussed.
This one is a bit more polarizing but we're hoping first-hand experience
with it can help people get a feel for how well it works in practice.
epage added a commit to epage/cargo that referenced this pull request Jan 3, 2024
This is a follow up to rust-lang#13241 with another syntax being discussed.
This one is a bit more polarizing but we're hoping first-hand experience
with it can help people get a feel for how well it works in practice.

As the experiment is meant to be short-lived, this is implemented in a
hacky way and docs aren't updated.
epage added a commit to epage/cargo that referenced this pull request Jan 4, 2024
This is a follow up to rust-lang#13241 with another syntax being discussed.
This one is a bit more polarizing but we're hoping first-hand experience
with it can help people get a feel for how well it works in practice.

As the experiment is meant to be short-lived, this is implemented in a
hacky way and docs aren't updated.
bors added a commit that referenced this pull request Jan 4, 2024
feat(embedded): Add prefix-char frontmatter syntax support

This is a follow up to #13241 with another syntax being discussed. This one is a bit more polarizing but we're hoping first-hand experience with it can help people get a feel for how well it works in practice.

As the experiment is meant to be short-lived, this is implemented in a hacky way and docs aren't updated.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 6, 2024
Update cargo

10 commits in add15366eaf3f3eb84717d3b8b71902ca36a7c84..2ce45605d9db521b5fd6c1211ce8de6055fdb24e
2024-01-02 03:24:42 +0000 to 2024-01-04 18:04:13 +0000
- feat(embedded): Add prefix-char frontmatter syntax support (rust-lang/cargo#13247)
- Update dependency handlebars to v5 for mdman. (rust-lang/cargo#13249)
- Deprecate rustc plugin support in cargo (rust-lang/cargo#13248)
- feat(embedded): Add multiple experimental manifest syntaxes (rust-lang/cargo#13241)
- chore: update auto labels (rust-lang/cargo#13244)
- test: support publish package with a `public` field. (rust-lang/cargo#13245)
- `cargo fix`: Call rustc fewer times. (rust-lang/cargo#13243)
- chore: tracing be compat with rustc_log (rust-lang/cargo#13239)
- chore(deps): update compatible (rust-lang/cargo#13227)
- Contrib: Fix team HackMD links (rust-lang/cargo#13237)

r? ghost
@rustbot rustbot added this to the 1.77.0 milestone Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

6 participants