Commit Graph

103 Commits

Author SHA1 Message Date
Jieyou Xu 91d064b442 Remove current implementation of ./x suggest
This is quite a bit of implementation complexity, yet it is quite
broken, and we don't have the maintenance bandwidth to address.

Remove the current implementation if only to reduce bootstrap's
implementation complexity; the `suggest` flow comes with its own set of
hacks.
2025-07-15 00:46:33 +08:00
bors 2c2bb995af Auto merge of #140999 - hkBst:update-escaper, r=nnethercote
update to literal-escaper 0.0.4 for better API without `unreachable` and faster string parsing

This is the replacement for just the part of https://github.com/rust-lang/rust/pull/138163 dealing with the changed API of unescape functionality, since that got moved into its own crate.

<del>This uses an unpublished version of literal-escaper (https://github.com/rust-lang/literal-escaper/pull/8).</del>

r? `@nnethercote`
2025-06-25 01:03:30 +00:00
Marijn Schouten 707a6f5463 update to literal-escaper 0.0.4 for better API without unreachable and faster string parsing 2025-06-23 06:36:22 +00:00
Celina G. Val f52c6eee02 Another round of tidy / warning fixes 2025-06-11 16:56:01 -07:00
onur-ozkan 59fbe04a52 move test-float-parse tool into src/tools dir
Obviously `test-float-parse` is a tool like any other in `src/tools`.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-06-03 11:05:51 +03:00
Josh Stone 66deb691d6 Alphabetize the root workspace members 2025-03-13 12:21:14 -07:00
Josh Stone abed12a132 Add src/tools/x to the main workspace
The original reason to exclude it was so it could run before submodules
were initialized. However, those have all been converted to subtrees
now, so the entire workspace is always ready to go.
2025-03-13 12:18:32 -07:00
onur-ozkan 56d0b160f8 remove rls source from the repository
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-12 09:13:59 +03:00
许杰友 Jieyou Xu (Joe) 063ef18fdc Revert "Use workspace lints for crates in compiler/ #138084"
Revert <https://github.com/rust-lang/rust/pull/138084> to buy time to
consider options that avoids breaking downstream usages of cargo on
distributed `rustc-src` artifacts, where such cargo invocations fail due
to inability to inherit `lints` from workspace root manifest's
`workspace.lints` (this is only valid for the source rust-lang/rust
workspace, but not really the distributed `rustc-src` artifacts).

This breakage was reported in
<https://github.com/rust-lang/rust/issues/138304>.

This reverts commit 48caf81484, reversing
changes made to c6662879b2.
2025-03-10 18:12:47 +08:00
Nicholas Nethercote 9212e31c92 Add unreachable_pub to the default lints for compiler/ crates.
And fix the new errors in the handful of crates that didn't have a
`#![warn(unreachable_pub)]`.
2025-03-08 08:41:43 +11:00
Nicholas Nethercote beba32cebb Specify rust lints for compiler/ crates via Cargo.
By naming them in `[workspace.lints.rust]` in the top-level
`Cargo.toml`, and then making all `compiler/` crates inherit them with
`[lints] workspace = true`. (I omitted `rustc_codegen_{cranelift,gcc}`,
because they're a bit different.)

The advantages of this over the current approach:
- It uses a standard Cargo feature, rather than special handling in
  bootstrap. So, easier to understand, and less likely to get
  accidentally broken in the future.
- It works for proc macro crates.

It's a shame it doesn't work for rustc-specific lints, as the comments
explain.
2025-03-08 08:41:09 +11:00
Eric Huss 2773456f5f Move error_index_generator to the rustbook workspace
I had forgotten that error_index_generator is using mdbook. This moves
it to be part of the rustbook workspace so that it can share the
dependency with rustbook.
2025-02-17 10:58:15 -08:00
Jakub Beránek c73ed895c7 Remove the rustc-perf-wrapper tool 2025-02-05 15:33:40 +01:00
许杰友 Jieyou Xu (Joe) 57e8575760 features-status-dump: add new build-metrics tool
Co-authored-by: Jane Losare-Lusby <jlusby42@gmail.com>
2025-01-26 14:45:05 +08:00
onur-ozkan bc7531089e move src/tools/build_helper into src/build_helper
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-11 11:19:11 +03:00
Ralf Jung b12745863e update rustc-std-workspace crates
- make rustc-std-workspace-core/alloc re-exports of their underlying crates, like std
= cleanup manifests
2024-11-04 07:45:15 +01:00
Trevor Gross 42b9cb1cb5 Switch to using the v2 resolver in most workspaces
Pinning the resolver to v1 was done in 5abff3753a ("Explicit set
workspace.resolver ...") in order to suppress warnings. Since there is
no specific reason not to use the new resolver and since it fixes
issues, change to `resolver = "2"` everywhere except library and
submodules.
2024-08-18 13:59:09 -05:00
bjorn3 1f3be75f56 Move the standard library to a separate workspace
This ensures that the Cargo.lock packaged for it in the rust-src
component is up-to-date, allowing rust-analyzer to run cargo metadata on
the standard library even when the rust-src component is stored in a
read-only location as is necessary for loading crates.io dependencies of
the standard library.

This also simplifies tidy's license check for runtime dependencies as it
can now look at all entries in library/Cargo.lock without having to
filter for just the dependencies of runtime crates. In addition this
allows removing an exception in check_runtime_license_exceptions that
was necessary due to the compiler enabling a feature on the object crate
which pulls in a dependency not allowed for the standard library.

While cargo workspaces normally enable dependencies of multiple targets
to be reused, for the standard library we do not want this reusing to
prevent conflicts between dependencies of the sysroot and of tools that
are built using this sysroot. For this reason we already use an unstable
cargo feature to ensure that any dependencies which would otherwise be
shared get a different -Cmetadata argument as well as using separate
build dirs.

This doesn't change the situation around vendoring. We already have
several cargo workspaces that need to be vendored. Adding another one
doesn't change much.

There are also no cargo profiles that are shared between the root
workspace and the library workspace anyway, so it doesn't add any extra
work when changing cargo profiles.
2024-08-02 10:48:12 +00:00
Eric Huss 5dfa062b87 Move rustbook to its own workspace. 2024-07-22 07:20:57 -07:00
Trevor Gross 51827ce4e4 Move test-float-parse to the global workspace
Since `test-float-parse` is now implemented in Rust, we can move it into
the global workspace and check dependency licenses.
2024-07-20 11:39:34 -05:00
Alex Crichton 2a3e22bf04 Promote the wasm32-wasip2 target to Tier 2
This commit promotes the `wasm32-wasip2` Rust target to tier 2 as
proposed in rust-lang/compiler-team#760. There are two major changes in
this PR:

1. The `dist-various-2` container, which already produces the other WASI
   targets, now has an extra target added for `wasm32-wasip2`.
2. A new `wasm-component-ld` binary is added to all host toolchains when
   LLD is enabled. This is the linker used for the `wasm32-wasip2` target.

This new linker is added for all host toolchains to ensure that all host
toolchains can produce the `wasm32-wasip2` target. This is similar to
how `rust-lld` was originally included for all host toolchains to be
able to produce WebAssembly output when the targets were first added.
The new linker is developed [here][wasm-component-ld] and is pulled in
via a crates.io-based dependency to the tree here.

[wasm-component-ld]: https://github.com/bytecodealliance/wasm-component-ld
2024-07-09 12:11:08 -07:00
Jakub Beránek 151986f493 Implement x perf as a separate tool 2024-06-27 10:22:03 +02:00
Zalathar fd4fe7d129 Remove src/tools/rust-demangler 2024-06-19 20:41:34 +10:00
Jakub Beránek 0b1ecf1d8d Remove the expand-yaml-anchors tool 2024-04-29 21:33:17 +02:00
Alex Macleod 5b5ee0e7bd Remove unused [patch] for clippy_lints 2024-04-26 15:35:43 +01:00
Mark Rousskov f946bf4f2e Remove debuginfo from rustc-demangle too
This is done for the same reason as the other dependencies in this list.
2024-04-07 19:19:11 -04:00
Ben Kimock 2f6fb234de Add a test 2024-03-20 23:36:05 -04:00
Kjetil Kjeka 222ce4fdb8 LLVM Bitcode Linker: Added crate 2024-03-11 13:35:35 +01:00
许杰友 Jieyou Xu (Joe) 48e9f92ce2 Add supporting infrastructure for run-make V2 tests 2024-02-29 16:30:38 +00:00
Kleinmarb e49442bf98 fix typo 2024-01-09 22:44:32 +01:00
Mark Rousskov 94a59d6f62 Strip lld-wrapper binaries
This cuts down on the amount of data we need to ship and users need to
keep on disk for each Rust toolchain. As noted in the added comment,
there's not much going on in these executables, so the added benefit of
symbols and debuginfo isn't large, while the cost is not insignificant.

This takes each of the binaries (we store 4 identical copies under
different names) from 3.7MB to 384KB.
2024-01-06 09:39:19 -05:00
Zalathar 1367104cb2 Add tool src/tools/coverage-dump for use by some new coverage tests 2023-09-05 11:11:48 +10:00
Philipp Krones c2490bdc44 Update Cargo.lock/toml
Remove clippy_test_deps from Cargo.toml
2023-07-17 10:22:41 +02:00
Jakub Beránek 91d2fb2e2b Port PGO/LTO/BOLT optimized build pipeline to Rust 2023-07-09 08:39:50 +02:00
Philipp Krones de69d556eb Fix compile-test tests to work with the new ui_test crate 2023-07-02 15:07:39 +02:00
Weihang Lo 5abff3753a Explicit set workspace.resolver = "1"
rust-lang/cargo#10910 starts emitting warning if resolver is not set
for 2021 edition package. We want to surpress the warning for now.
2023-05-31 00:08:11 +01:00
ozkanonur c36b2092bb create new tool rustdoc-gui-test 2023-05-20 14:40:11 +03:00
Chris Denton f9b3d6a525 Generate windows-sys bindings 2023-05-05 20:48:16 +01:00
John Kåre Alsaker fd4c81f4c1 Add a sysroot crate to represent the standard library crates 2023-04-25 13:40:36 +02:00
Weihang Lo befa5c98c9 chore: remove rustc-workspace-hack
Co-authored-by: Scott Schafer <schaferjscott@gmail.com>
Co-authored-by: Eric Huss <eric@huss.org>
2023-04-16 19:32:20 +01:00
Weihang Lo f795a150fe chore: allow cargo to have its own workspace
This also

* bumps cargo to the latest in rust-lang/cargo.
* adds 0BSD to allowed list of licenses

Co-authored-by: Scott Schafer <schaferjscott@gmail.com>
Co-authored-by: Eric Huss <eric@huss.org>
2023-04-16 19:32:12 +01:00
Ezra Shaw 1e95cddc74 feat: implement basic suggest-tests tool 2023-04-09 19:59:14 +12:00
Albert Larsan 40ba0e84d5 Change src/test to tests in source files, fix tidy and tests 2023-01-11 09:32:13 +00:00
Nilstrieb 25c153149e Add build_helper crate to share code between tidy and bootstrap 2023-01-03 17:45:34 +01:00
Joshua Nelson 90a10cae4b Revert "Auto merge of #105058 - Nilstrieb:no-merge-commits-for-you-only-bors-is-allowed-to-do-that, r=jyn514"
This reverts commit 4839886f0a, reversing
changes made to ce85c98575.
2022-12-31 01:55:24 +00:00
Nilstrieb 878af66b53 Add build_helper crate to share code between tidy and bootstrap 2022-12-30 20:41:47 +01:00
Joshua Nelson f94c926aec Support documenting Cargo
The primary motivation is to have the cargo docs show up on https://doc.rust-lang.org/nightly/nightly-rustc/cargo, but as a nice side effect this makes `x doc cargo` work locally.
2022-12-22 14:33:22 -06:00
Pietro Albini 4af7de13d2 initial prototype of the tool to generate copyright notices 2022-11-15 15:02:03 +01:00
Pietro Albini 13efb20846 add tool to collect license metadata from REUSE 2022-11-15 14:50:20 +01:00
Jakob Degen 17395b45b1 Detect unused files in src/test/mir-opt and error on them in tidy. 2022-10-31 21:45:41 -07:00