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

Fix inconsistent symbol mangling with -Zverbose #94037

Merged
merged 1 commit into from
Feb 16, 2022
Merged

Conversation

tmiasko
Copy link
Contributor

@tmiasko tmiasko commented Feb 16, 2022

Always skip arguments that are the defaults of their respective
parameters, to avoid generating inconsistent symbols for builds
with -Zverbose flag and without it.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Feb 16, 2022
@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 16, 2022
@tmiasko
Copy link
Contributor Author

tmiasko commented Feb 16, 2022

This removes printing of arguments equal to defaults introduced in #92191 @jackh726. I could make this customizable, if this is something you find useful, but if not I would prefer to just remove it.

@rust-log-analyzer

This comment has been minimized.

Always skip arguments that are the defaults of their respective
parameters, to avoid generating inconsistent symbols for builds
with `-Zverbose` flag and without it.
@jackh726
Copy link
Member

I don't remember what exactly prompted me to add this; I think it was when I was looking through the logs and was a bit confused with what was happening (though IIRC I was confused about the wrong this).

Regardless, it's a bit unfortunate that symbol mangling and printing are so linked. I would expect that we shouldn't have to worry too much about -Z verbose printing; lifetimes, for example, are much different.

I don't feel strongly one way or the other on removing this with or without adding an alternative. When I'm combing through logs for something, I almost always enable -Z verbose, and I probably wouldn't think to enable something else too.

@Mark-Simulacrum
Copy link
Member

I agree that it seems unfortunate logs and symbols are so tightly tied together, but ultimately not really related to this particular PR.

I'm inclined to r+ this and if a strong use case comes along for emitting the defaults we can do so in the future, perhaps gated on a flag that is more obviously crate-graph-wide necessary (or fix the symbol mangling to not be affected).

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 16, 2022

📌 Commit 3158372 has been approved by Mark-Simulacrum

@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 Feb 16, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 16, 2022
Fix inconsistent symbol mangling with -Zverbose

Always skip arguments that are the defaults of their respective
parameters, to avoid generating inconsistent symbols for builds
with `-Zverbose` flag and without it.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 16, 2022
…askrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#92366 (Resolve concern of `derive_default_enum`)
 - rust-lang#93382 (Add a bit more padding in search box)
 - rust-lang#93962 (Make [u8]::cmp implementation branchless)
 - rust-lang#94015 (rustdoc --check option documentation)
 - rust-lang#94017 (Clarify confusing UB statement in MIR)
 - rust-lang#94020 (Support pretty printing of invalid constants)
 - rust-lang#94027 (Update browser UI test version)
 - rust-lang#94037 (Fix inconsistent symbol mangling with -Zverbose)
 - rust-lang#94045 (Update books)
 - rust-lang#94054 (:arrow_up: rust-analyzer)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 237f16d into rust-lang:master Feb 16, 2022
@rustbot rustbot added this to the 1.60.0 milestone Feb 16, 2022
@tmiasko tmiasko deleted the verbose branch February 16, 2022 22:13
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants