Skip to content

Conversation

epage
Copy link
Contributor

@epage epage commented Sep 8, 2025

What does this PR try to resolve?

Ooch our way towards rustc's quality of error reporting to make up for the fact that users won't see most frontmatter rustc error messages.

How to test and review this PR?

Several parts of this are not ideal yet

  • Frontmatter close should show the open and show the EOF, instead of
    pointing at the open
  • Trailing content on close will usually have a newline
  • Multiple frontmatters should show the original frontmatter
  • Some content, like supported infostrings, should go in a help
  • Ideally we try to recover on no closing and instead point out a
    mismatched open/close

But this is still an improvement over nothing!

Several parts of this are not ideal yet
- Frontmatter close should show the open and show the EOF, instead of
  pointing at the open
- Trailing content on close will usually have a newline
- Multiple frontmatters should show the original frontmatter
- Some content, like supported infostrings, should go in a help
- Ideally we try to recover on no closing and instead point out a
  mismatched open/close

But this is still an improvement over nothing!
@rustbot
Copy link
Collaborator

rustbot commented Sep 8, 2025

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-manifest Area: Cargo.toml issues S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 8, 2025
@epage epage force-pushed the frontmatter branch 2 times, most recently from 81e1a81 to 90b68c8 Compare September 11, 2025 19:07
@weihanglo weihanglo enabled auto-merge September 11, 2025 19:14
@weihanglo weihanglo added this pull request to the merge queue Sep 11, 2025
Merged via the queue into rust-lang:master with commit e3f6477 Sep 11, 2025
43 of 50 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 11, 2025
@epage epage deleted the frontmatter branch September 11, 2025 20:57
epage added a commit to epage/cargo that referenced this pull request Sep 11, 2025
Of the non-ideal error cases mentioned in rust-lang#15939, this is likely the one
people will hit the most and so important for us to improve.
epage added a commit to epage/cargo that referenced this pull request Sep 12, 2025
Of the non-ideal error cases mentioned in rust-lang#15939, this is likely the one
people will hit the most and so important for us to improve.
epage added a commit to epage/cargo that referenced this pull request Sep 12, 2025
Of the non-ideal error cases mentioned in rust-lang#15939, this is likely the one
people will hit the most and so important for us to improve.
github-merge-queue bot pushed a commit that referenced this pull request Sep 13, 2025
### What does this PR try to resolve?

Of the non-ideal error cases mentioned in #15939, this is likely the one
people will hit the most and so important for us to improve.

### How to test and review this PR?

Further iteration can show the opening code fence as well to provide
more context for the error.
bors added a commit to rust-lang/rust that referenced this pull request Sep 17, 2025
Update cargo submodule

19 commits in 24bb93c388fb8c211a37986539f24a819dc669d3..966f94733bbc94ca51ff9f1e4c49ad250ebbdc50
2025-09-10 23:16:07 +0000 to 2025-09-16 17:24:45 +0000
- fix(frontmatter): Improve error quality (rust-lang/cargo#15972)
- fix: wrong variable name in documentation (rust-lang/cargo#15968)
- Add "Optimizing Build Performance" section to the Cargo book (rust-lang/cargo#15924)
- Remove extra apostrophe in environment-variables.md (rust-lang/cargo#15963)
- Clarify warning for using `features` or `default-features` in `patch` (rust-lang/cargo#15953)
- fix(frontmatter): Try alternative len code fences (rust-lang/cargo#15952)
- feat(cli): Allow completions for third-party subcommand names (rust-lang/cargo#15961)
- docs(index): Clarify what we mean by omitting features (rust-lang/cargo#15957)
- fix(future): Report all content as a single Report (rust-lang/cargo#15943)
- fix(complete): Show local crates/features over other members  (rust-lang/cargo#15956)
- docs(resolver): Describe the role of the lockfile  (rust-lang/cargo#15958)
- chore: Skip check-version-bump ci job in forks (rust-lang/cargo#15959)
- Eliminate the last three "did you mean" warning phrasings (rust-lang/cargo#15356)
- fix(info): Suggest a more universal `cargo tree` command (rust-lang/cargo#15954)
- feat(cli): Use ellipses when truncating progress (rust-lang/cargo#15955)
- feat(completer): Added completion for `--features` flag (rust-lang/cargo#15309)
- fix(publish): Switch the 'ctrl-c on wait' line to a help message (rust-lang/cargo#15942)
- docs: move docs building process to contributor guide (rust-lang/cargo#15854)
- fix(manifest): Show error source to users (rust-lang/cargo#15939)

r? ghost
@rustbot rustbot added this to the 1.92.0 milestone Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-manifest Area: Cargo.toml issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants