-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Tracking Issue for frontmatter #136889
Copy link
Copy link
Open
Labels
B-RFC-approvedBlocker: Approved by a merged RFC but not yet implemented.Blocker: Approved by a merged RFC but not yet implemented.B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-frontmatter`#![feature(frontmatter)]``#![feature(frontmatter)]`S-tracking-impl-incompleteStatus: The implementation is incomplete.Status: The implementation is incomplete.T-cargoRelevant to the cargo team, which will review and decide on the PR/issue.Relevant to the cargo team, which will review and decide on the PR/issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
B-RFC-approvedBlocker: Approved by a merged RFC but not yet implemented.Blocker: Approved by a merged RFC but not yet implemented.B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-frontmatter`#![feature(frontmatter)]``#![feature(frontmatter)]`S-tracking-impl-incompleteStatus: The implementation is incomplete.Status: The implementation is incomplete.T-cargoRelevant to the cargo team, which will review and decide on the PR/issue.Relevant to the cargo team, which will review and decide on the PR/issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
This is a tracking issue for the RFC "frontmatter" (rust-lang/rfcs#3503).
The feature gate for the issue is
#![feature(frontmatter)].About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
Steps
Non-blocking
Test coverage prior to stabilization
In the following, the RFC text in its accepted form will be referred to as the "accepted text".
run-maketest that exercises how cargo and rustc works together w.r.t. frontmatter, depending on what the final cooperation scheme we end up using.rustfixis able to account for frontmatters (or properly ignore), i.e.//@ run-rustfix.Unresolved Questions
$tools<-> rustc.-Zunpretty? See discussions in Add unstable frontmatter support #137193 (comment).rust-analyzer,rustfmt,cargo,clippy) handle frontmatter (and interop w/rustc)? Will parsing support (or ability to ignore frontmatter) be a stabilization blocker (re. toolchain UX)? For all of them, for a subset of the tools?--- cargobe accepted? In Implement RFC 3503: frontmatters #140035 and the accepted text, whitespace between starting dashes and the infostring is permitted.feature(frontmatter)rejects frontmatters with dashes with leading spaces #141367TokenStream::from_str) #145520Implementation history
Initial implementations
(Significant) changes since the RFC was accepted
Frontmatter opener vs infostring starting with
-character grammar ambiguityThe accepted text has a grammar ambiguity in the case where the infostring starts with a
-.-character is used to delimit the frontmatter "opener"---.-characters to support escaping nesting of---s within the frontmatter.-, making it ambiguous as to whether it's a 3--opener +--starting infostring, or if it is a 4--opener + infostring.Remedy: we can require the infostring to begin with Unicode
XID_Start, then permit subsequently characters in the set {XID_Continue,.}. I.e. (illustrative)See discussions at #140035 (comment).
.in e.g.file.ext(see RFC: Syntax for embedding cargo-script manifests rfcs#3503 (comment)).Illustrative grammar
#140035 (comment) (with start and end dashes >= 3
-characters and must match in-count):