Skip to content

fix(compile): Differentiate levels of debug info - #17798

Merged
weihanglo merged 2 commits into
rust-lang:masterfrom
epage:finished
Nov 25, 2026
Merged

weihanglo merged 2 commits into
rust-lang:masterfrom
epage:finished

Conversation

@epage

@epage epage commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

What does this PR try to resolve?

To give extra clues for users to figure out that cargo's defaults aren't
for debugging,
we are adding nuance to the Finished message by saying whether it is
partial or full.

The fact that we are delaying stabilizing the profile change helps get
the full message in front of users to better notice the contrast.

I had considered + no debuginfo but held off for now.

In the Cargo team meeting, we had considered other options like

  • backtrace debuginfo
  • file/line debug info only
  • location debug info only
  • line-and-table-only debug info

We are fine with being extra verbose for several releases but would want
something brief long term.

Some of those options we had considered are focused on specific aspects
of the debug info. They also might not be clear what is lost. They also
don't help the other debug levels.
I felt that partial vs full is clearer in the impact, likely doing a
better job raising red flags so people can go to the docs for more
information which they would likely need to do anyways.

We can see how this goes and evolve this over time.

Notes to reviewers


🤖 LLM involvement: snapshot updating

To give extra clues for users to figure out that cargo's defaults aren't
for debugging,
we are adding nuance to the `Finished` message by saying whether it is
`partial` or `full`.

The fact that we are delaying stabilizing the profile change helps get
the `full` message in front of users to better notice the contrast.

I had considered `+ no debuginfo` but held off for now.

In the Cargo team meeting, we had considered other options Lines
- `backtrace debuginfo`
- `file/line debug info only` 
- `location debug info only`
- `line-and-table-only debug info`

We are fine with being extra verbose for several releases but would want
something brief long term.

Some of those options we had considered are focused on specific aspects
of the debug info. They also might not be clear what is lost. They also
don't help the other debug levels.
I felt that `partial` vs `full` is clearer in the impact, likely doing a
better job raising red flags so people can go to the docs for more
information which they would likely need to do anyways.

We can see how this goes and evolve this over time.
@rustbot rustbot added A-build-execution Area: anything dealing with executing the compiler S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 25, 2026
@rustbot

rustbot commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

r? @Muscraft

rustbot has assigned @Muscraft.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @Muscraft, @epage, @weihanglo
  • @Muscraft, @epage, @weihanglo expanded to Muscraft, epage, weihanglo
  • Random selection from Muscraft, weihanglo

Comment thread src/compiler/job_queue/mod.rs Resolved
Comment thread src/compiler/job_queue/mod.rs Resolved

@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.

I am sold on partial debuginfo. It raise a red flag that debuginfo may be incomplete, making the status line more outstanding.

We can anyway iterate on it later. Let's merge this whenever the CI is green!

View changes since this review

@epage

epage commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

I am sold on partial debuginfo. It raise a red flag that debuginfo may be incomplete, making the status line more outstanding.

To add to this, by being less jargony, we avoid people thinking they know what it means when they don't.

@weihanglo
weihanglo added this pull request to the merge queue Nov 25, 2026
Merged via the queue into rust-lang:master with commit 562527a Nov 25, 2026
30 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 25, 2026
@epage
epage deleted the finished branch November 26, 2026 20:38
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Nov 28, 2026
Update cargo submodule

14 commits in ae8f06eb41b8c4a534d0f280f1b9d287f45ead73..39eba940bf913a566c4763c836cbe24b9f975200
2026-11-21 04:06:35 +0000 to 2026-11-27 22:28:03 +0000
- feat(config)!: Delegate `Definition` origin to `Origin` and precedence to `Scope` (rust-lang/cargo#17822)
- Reduce the usage of `sleep_ms()` in testsuite (rust-lang/cargo#17819)
- fix(clean): Don't double count hardlinks when actually cleaning (rust-lang/cargo#17805)
- Reduce the usage of `sleep_ms()` in freshness tests (rust-lang/cargo#17816)
- fix(git): run gc in foreground to avoid race (rust-lang/cargo#17818)
- fix(script): Skip a UTF-8 BOM before parsing the frontmatter (rust-lang/cargo#17806)
- Reduce the usage of `sleep_ms()` in testsuite (rust-lang/cargo#17815)
- fix(compile): Differentiate levels of debug info  (rust-lang/cargo#17798)
- fix(profiles): line-tables-only on nightly only (rust-lang/cargo#17797)
- fix(cli): Suggest `--profile debug` on all commands that default to `dev` (rust-lang/cargo#17796)
- refactor: clarify home is cargo home (rust-lang/cargo#17790)
- refactor(config)!: various polish (rust-lang/cargo#17787)
- refactor(git): extract git backends to their own modules (rust-lang/cargo#17789)
- docs: fix typos in documentation (rust-lang/cargo#17783)

r? ghost
@rustbot rustbot added this to the 1.102.0 milestone Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-build-execution Area: anything dealing with executing the compiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants