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

Add src/tools/x to the main workspace #138179

Merged
merged 4 commits into from
Mar 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6438,6 +6438,10 @@ version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"

[[package]]
name = "x"
version = "0.1.1"

[[package]]
name = "xattr"
version = "1.4.0"
Expand Down
56 changes: 27 additions & 29 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,50 +1,53 @@
[workspace]
resolver = "2"
members = [
# tidy-alphabetical-start
"compiler/rustc",
"src/build_helper",
"src/etc/test-float-parse",
"src/rustc-std-workspace/rustc-std-workspace-core",
"src/rustc-std-workspace/rustc-std-workspace-alloc",
"src/rustc-std-workspace/rustc-std-workspace-core",
"src/rustc-std-workspace/rustc-std-workspace-std",
"src/rustdoc-json-types",
"src/tools/build-manifest",
"src/tools/bump-stage0",
"src/tools/cargotest",
"src/tools/clippy",
"src/tools/clippy/clippy_dev",
"src/tools/collect-license-metadata",
"src/tools/compiletest",
"src/tools/run-make-support",
"src/tools/coverage-dump",
"src/tools/features-status-dump",
"src/tools/generate-copyright",
"src/tools/generate-windows-sys",
"src/tools/html-checker",
"src/tools/jsondocck",
"src/tools/jsondoclint",
"src/tools/linkchecker",
"src/tools/lint-docs",
"src/tools/lld-wrapper",
"src/tools/llvm-bitcode-linker",
"src/tools/miri",
"src/tools/miri/cargo-miri",
"src/tools/miropt-test-tools",
"src/tools/unstable-book-gen",
"src/tools/tidy",
"src/tools/tier-check",
"src/tools/build-manifest",
"src/tools/opt-dist",
"src/tools/remote-test-client",
"src/tools/remote-test-server",
"src/tools/replace-version-placeholder",
"src/tools/run-make-support",
"src/tools/rust-installer",
"src/tools/rustdoc",
"src/tools/rustfmt",
"src/tools/miri",
"src/tools/miri/cargo-miri",
"src/tools/rustdoc-gui-test",
"src/tools/rustdoc-themes",
"src/tools/unicode-table-generator",
"src/tools/jsondocck",
"src/tools/jsondoclint",
"src/tools/llvm-bitcode-linker",
"src/tools/html-checker",
"src/tools/bump-stage0",
"src/tools/replace-version-placeholder",
"src/tools/lld-wrapper",
"src/tools/collect-license-metadata",
"src/tools/generate-copyright",
"src/tools/rustfmt",
"src/tools/suggest-tests",
"src/tools/generate-windows-sys",
"src/tools/rustdoc-gui-test",
"src/tools/opt-dist",
"src/tools/coverage-dump",
"src/tools/tidy",
"src/tools/tier-check",
"src/tools/unicode-table-generator",
"src/tools/unstable-book-gen",
"src/tools/wasm-component-ld",
"src/tools/features-status-dump",
"src/tools/x",
# tidy-alphabetical-end
]

exclude = [
Expand All @@ -55,11 +58,6 @@ exclude = [
"tests/rustdoc-gui",
# HACK(eddyb) This hardcodes the fact that our CI uses `/checkout/obj`.
"obj",
# The `x` binary is a thin wrapper that calls `x.py`, which initializes
# submodules, before which workspace members cannot be invoked because
# not all `Cargo.toml` files are available, so we exclude the `x` binary,
# so it can be invoked before the current checkout is set up.
"src/tools/x",
]

[profile.release.package.rustc-rayon-core]
Expand Down
10 changes: 7 additions & 3 deletions src/bootstrap/src/core/build_steps/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -582,10 +582,12 @@ Select which editor you would like to set up [default: None]: ";
EditorKind::Emacs => &[
"51068d4747a13732440d1a8b8f432603badb1864fa431d83d0fd4f8fa57039e0",
"d29af4d949bbe2371eac928a3c31cf9496b1701aa1c45f11cd6c759865ad5c45",
"b5dd299b93dca3ceeb9b335f929293cb3d4bf4977866fbe7ceeac2a8a9f99088",
],
EditorKind::Helix => &[
"2d3069b8cf1b977e5d4023965eb6199597755e6c96c185ed5f2854f98b83d233",
"6736d61409fbebba0933afd2e4c44ff2f97c1cb36cf0299a7f4a7819b8775040",
"f252dcc30ca85a193a699581e5e929d5bd6c19d40d7a7ade5e257a9517a124a5",
],
EditorKind::Vim | EditorKind::VsCode => &[
"ea67e259dedf60d4429b6c349a564ffcd1563cf41c920a856d1f5b16b4701ac8",
Expand All @@ -598,10 +600,12 @@ Select which editor you would like to set up [default: None]: ";
"811fb3b063c739d261fd8590dd30242e117908f5a095d594fa04585daa18ec4d",
"4eecb58a2168b252077369da446c30ed0e658301efe69691979d1ef0443928f4",
"c394386e6133bbf29ffd32c8af0bb3d4aac354cba9ee051f29612aa9350f8f8d",
"e53e9129ca5ee5dcbd6ec8b68c2d87376474eb154992deba3c6d9ab1703e0717",
],
EditorKind::Zed => &[
"bbce727c269d1bd0c98afef4d612eb4ce27aea3c3a8968c5f10b31affbc40b6c",
"a5380cf5dd9328731aecc5dfb240d16dac46ed272126b9728006151ef42f5909",
],
EditorKind::Zed => {
&["bbce727c269d1bd0c98afef4d612eb4ce27aea3c3a8968c5f10b31affbc40b6c"]
}
}
}

Expand Down
1 change: 0 additions & 1 deletion src/etc/rust_analyzer_eglot.el
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"check"
"--json-output"])
:linkedProjects ["Cargo.toml"
"src/tools/x/Cargo.toml"
"src/bootstrap/Cargo.toml"
"src/tools/rust-analyzer/Cargo.toml"
"compiler/rustc_codegen_cranelift/Cargo.toml"
Expand Down
1 change: 0 additions & 1 deletion src/etc/rust_analyzer_helix.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ linkedProjects = [
"library/Cargo.toml",
"src/bootstrap/Cargo.toml",
"src/tools/rust-analyzer/Cargo.toml",
"src/tools/x/Cargo.toml",
]

[language-server.rust-analyzer.config.check]
Expand Down
1 change: 0 additions & 1 deletion src/etc/rust_analyzer_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"rust-analyzer.linkedProjects": [
"Cargo.toml",
"library/Cargo.toml",
"src/tools/x/Cargo.toml",
"src/bootstrap/Cargo.toml",
"src/tools/rust-analyzer/Cargo.toml",
"compiler/rustc_codegen_cranelift/Cargo.toml",
Expand Down
1 change: 0 additions & 1 deletion src/etc/rust_analyzer_zed.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"linkedProjects": [
"Cargo.toml",
"library/Cargo.toml",
"src/tools/x/Cargo.toml",
"src/bootstrap/Cargo.toml",
"src/tools/rust-analyzer/Cargo.toml",
"compiler/rustc_codegen_cranelift/Cargo.toml",
Expand Down
1 change: 0 additions & 1 deletion src/tools/tidy/src/deps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ pub(crate) const WORKSPACES: &[(&str, ExceptionList, Option<(&[&str], &[&str])>,
("src/tools/rust-analyzer", EXCEPTIONS_RUST_ANALYZER, None, &[]),
("src/tools/rustbook", EXCEPTIONS_RUSTBOOK, None, &["src/doc/book", "src/doc/reference"]),
("src/tools/rustc-perf", EXCEPTIONS_RUSTC_PERF, None, &["src/tools/rustc-perf"]),
("src/tools/x", &[], None, &[]),
// tidy-alphabetical-end
];

Expand Down
2 changes: 2 additions & 0 deletions src/tools/tidy/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ fn main() {
FromStr::from_str(&env::args().nth(4).expect("need concurrency"))
.expect("concurrency must be a number");

let root_manifest = root_path.join("Cargo.toml");
let src_path = root_path.join("src");
let tests_path = root_path.join("tests");
let library_path = root_path.join("library");
Expand Down Expand Up @@ -137,6 +138,7 @@ fn main() {
check!(edition, &compiler_path);
check!(edition, &library_path);

check!(alphabetical, &root_manifest);
check!(alphabetical, &src_path);
check!(alphabetical, &tests_path);
check!(alphabetical, &compiler_path);
Expand Down
7 changes: 0 additions & 7 deletions src/tools/x/Cargo.lock

This file was deleted.

Loading