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

Remove src/tools/rust-demangler #125880

Merged
merged 1 commit into from
Jun 19, 2024
Merged

Remove src/tools/rust-demangler #125880

merged 1 commit into from
Jun 19, 2024

Conversation

Zalathar
Copy link
Contributor

@Zalathar Zalathar commented Jun 2, 2024

rust-demangler is a small binary that reads a list of mangled symbols from stdin, demangles them (using the rustc-demangle library crate), and prints the demangled symbols to stdout.

It was added as part of the initial implementation of coverage instrumentation in 2020/2021, so that coverage tests could pass it to llvm-cov --Xdemangler when generating coverage reports. It has been largely untouched since then.

As of #125816 it is no longer used by coverage tests, and has no remaining in-tree uses.

There is code in bootstrap to build and package the demangler, but it's unclear where the resulting binaries actually end up, or whether there's any reasonable way for rustup users to obtain them.


For users needing a command-line demangler, rustfilt exists and is more actively maintained. It's also quite easy to use the rustc-demangle library to build a custom command-line demangler if necessary, with only a few lines of code.

The tool's name (rust-demangler) is easily confused with the name of the library crate rustc-demangle, so removing the tool will eliminate that confusion. There also doesn't appear to be much reason to use rust-demangler over rustfilt.


This PR therefore removes the tool, and removes all of its associated code from bootstrap.

MCP filed: rust-lang/compiler-team#754

@rustbot
Copy link
Collaborator

rustbot commented Jun 2, 2024

r? @clubby789

rustbot has assigned @clubby789.
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 S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jun 2, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jun 2, 2024

This PR modifies config.example.toml.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@lqd
Copy link
Member

lqd commented Jun 2, 2024

It seems to be in a rustup component, and if that’s published then it can be tricky to just delete, maybe double check that?

We definitely had issues in the past when removing components (rls and save analysis come to mind), I’m not sure why, but could be related to backwards compatibility or lack thereof in rustup itself and may have been fixed since.

(Also this looks bootstrap related, so does it need a t-compiler mcp?)

@Mark-Simulacrum
Copy link
Member

We upload the artifact to the CI bucket but it's not accessible through rustup (not present in the manifest). Checked current nightly with curl -O https://static.rust-lang.org/dist/channel-rust-nightly.toml and grepping that file for rust-demangler.

@clubby789 clubby789 added the S-waiting-on-MCP Status: PR has a compiler MCP and is waiting for the compiler MCP to complete. label Jun 12, 2024
@Zalathar
Copy link
Contributor Author

Another rebase for good luck.

The final comment period has passed without any objections, so we should be able to go ahead and remove this.

@oli-obk
Copy link
Contributor

oli-obk commented Jun 19, 2024

r? @oli-obk

@bors r+

@bors
Copy link
Contributor

bors commented Jun 19, 2024

📌 Commit fd4fe7d has been approved by oli-obk

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 Jun 19, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 19, 2024
Rollup of 6 pull requests

Successful merges:

 - rust-lang#125447 (Allow constraining opaque types during subtyping in the trait system)
 - rust-lang#125766 (MCDC Coverage: instrument last boolean RHS operands from condition coverage)
 - rust-lang#125880 (Remove `src/tools/rust-demangler`)
 - rust-lang#126154 (StorageLive: refresh storage (instead of UB) when local is already live)
 - rust-lang#126572 (override user defined channel when using precompiled rustc)
 - rust-lang#126662 (Unconditionally warn on usage of `wasm32-wasi`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 1e46036 into rust-lang:master Jun 19, 2024
6 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jun 19, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jun 19, 2024
Rollup merge of rust-lang#125880 - Zalathar:demangler, r=oli-obk

Remove `src/tools/rust-demangler`

`rust-demangler` is a small binary that reads a list of mangled symbols from stdin, demangles them (using the `rustc-demangle` library crate), and prints the demangled symbols to stdout.

It was added as part of the initial implementation of coverage instrumentation in 2020/2021, so that coverage tests could pass it to `llvm-cov --Xdemangler` when generating coverage reports. It has been largely untouched since then.

As of rust-lang#125816 it is no longer used by coverage tests, and has no remaining in-tree uses.

There is code in bootstrap to build and package the demangler, but it's unclear where the resulting binaries actually end up, or whether there's any reasonable way for `rustup` users to obtain them.

---

For users needing a command-line demangler, `rustfilt` exists and is more actively maintained. It's also quite easy to use the `rustc-demangle` library to build a custom command-line demangler if necessary, with only a few lines of code.

The tool's name (`rust-demangler`) is easily confused with the name of the library crate `rustc-demangle`, so removing the tool will eliminate that confusion. There also doesn't appear to be much reason to use `rust-demangler` over `rustfilt`.

---

This PR therefore removes the tool, and removes all of its associated code from bootstrap.

MCP filed: rust-lang/compiler-team#754
@bors
Copy link
Contributor

bors commented Jun 19, 2024

⌛ Testing commit fd4fe7d with merge 3186d17...

@Zalathar Zalathar deleted the demangler branch June 19, 2024 21:44
bherrera pushed a commit to misttech/integration that referenced this pull request Jun 22, 2024
This was removed in rust-lang/rust#125880

Original-Bug: 348390430
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/infra/recipes/+/1069232
Original-Revision: 8447a3802f23d09bba93efd4b305b9801b2c6c8e
GitOrigin-RevId: a4e01d658f6626447382ba0b1dbcce95bd3b3a73
Change-Id: Ia537bbb0698b3362ca4b6ada5c2ae816cc1e30e9
gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request Sep 18, 2024
This was dropped in upstream commit fd4fe7d129cac2b7a0668847117775ee23031771.

See rust-lang/rust#125880. rust-demangler is no more.

For rust-bin *only*, USE=profiler was just used to control rust-demangler,
not whether rust-bin was built with the profiler runtime (obviously), so
we drop the USE flag for rust-bin.

Bug: https://bugs.gentoo.org/939701
Closes: https://bugs.gentoo.org/939669
Signed-off-by: Sam James <[email protected]>
gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request Sep 18, 2024
This was dropped in upstream commit fd4fe7d129cac2b7a0668847117775ee23031771.

See rust-lang/rust#125880. rust-demangler is no more.

Note that we keep USE=profiler as it still seems to be used for other
bits like the profiling runtime.

Bug: https://bugs.gentoo.org/939669
Closes: https://bugs.gentoo.org/939701
Signed-off-by: Sam James <[email protected]>
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. S-waiting-on-MCP Status: PR has a compiler MCP and is waiting for the compiler MCP to complete. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants