Skip to content

Commit 9cde0f7

Browse files
committed
Fully remove submodule handling from bootstrap.py
These submodules were previously updated in python because Cargo gives a hard error if toml files are missing from the workspace: ``` error: failed to load manifest for workspace member `/home/jnelson/rust-lang/rust/src/tools/rls` Caused by: failed to read `/home/jnelson/rust-lang/rust/src/tools/rls/Cargo.toml` Caused by: No such file or directory (os error 2) failed to run: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /home/jnelson/rust-lang/rust/src/bootstrap/Cargo.toml ``` However, bootstrap doesn't actually need to be part of the workspace. Remove it so we can move submodule handling fully to Rust, avoiding duplicate code between Rust and Python. Note that this does break `cargo run`; it has to be `cd src/bootstrap && cargo run` now. Given that we're planning to make the main entrypoint a shell script (or rust binary), I think this is a good tradeoff for reduced complexity in bootstrap.py.
1 parent a09c668 commit 9cde0f7

File tree

6 files changed

+705
-183
lines changed

6 files changed

+705
-183
lines changed

Cargo.lock

+5-67
Original file line numberDiff line numberDiff line change
@@ -215,32 +215,6 @@ dependencies = [
215215
"byte-tools",
216216
]
217217

218-
[[package]]
219-
name = "bootstrap"
220-
version = "0.0.0"
221-
dependencies = [
222-
"cc",
223-
"cmake",
224-
"filetime",
225-
"getopts",
226-
"hex 0.4.2",
227-
"ignore",
228-
"libc",
229-
"num_cpus",
230-
"once_cell",
231-
"opener",
232-
"pretty_assertions 0.7.2",
233-
"serde",
234-
"serde_json",
235-
"sha2",
236-
"sysinfo",
237-
"tar",
238-
"toml",
239-
"walkdir",
240-
"winapi",
241-
"xz2",
242-
]
243-
244218
[[package]]
245219
name = "bstr"
246220
version = "0.2.13"
@@ -735,15 +709,6 @@ dependencies = [
735709
"rustc-semver",
736710
]
737711

738-
[[package]]
739-
name = "cmake"
740-
version = "0.1.44"
741-
source = "registry+https://github.com/rust-lang/crates.io-index"
742-
checksum = "0e56268c17a6248366d66d4a47a3381369d068cce8409bb1716ed77ea32163bb"
743-
dependencies = [
744-
"cc",
745-
]
746-
747712
[[package]]
748713
name = "colored"
749714
version = "2.0.0"
@@ -1023,9 +988,9 @@ dependencies = [
1023988

1024989
[[package]]
1025990
name = "ctor"
1026-
version = "0.1.15"
991+
version = "0.1.22"
1027992
source = "registry+https://github.com/rust-lang/crates.io-index"
1028-
checksum = "39858aa5bac06462d4dd4b9164848eb81ffc4aa5c479746393598fd193afa227"
993+
checksum = "f877be4f7c9f246b183111634f75baa039715e3f46ce860677d3b19a69fb229c"
1029994
dependencies = [
1030995
"quote",
1031996
"syn",
@@ -2670,9 +2635,9 @@ checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64"
26702635

26712636
[[package]]
26722637
name = "output_vt100"
2673-
version = "0.1.2"
2638+
version = "0.1.3"
26742639
source = "registry+https://github.com/rust-lang/crates.io-index"
2675-
checksum = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9"
2640+
checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66"
26762641
dependencies = [
26772642
"winapi",
26782643
]
@@ -2931,18 +2896,6 @@ version = "0.1.1"
29312896
source = "registry+https://github.com/rust-lang/crates.io-index"
29322897
checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
29332898

2934-
[[package]]
2935-
name = "pretty_assertions"
2936-
version = "0.7.2"
2937-
source = "registry+https://github.com/rust-lang/crates.io-index"
2938-
checksum = "1cab0e7c02cf376875e9335e0ba1da535775beb5450d21e1dffca068818ed98b"
2939-
dependencies = [
2940-
"ansi_term",
2941-
"ctor",
2942-
"diff",
2943-
"output_vt100",
2944-
]
2945-
29462899
[[package]]
29472900
name = "pretty_assertions"
29482901
version = "1.2.1"
@@ -5147,21 +5100,6 @@ dependencies = [
51475100
"unicode-xid",
51485101
]
51495102

5150-
[[package]]
5151-
name = "sysinfo"
5152-
version = "0.24.1"
5153-
source = "registry+https://github.com/rust-lang/crates.io-index"
5154-
checksum = "a6a8e71535da31837213ac114531d31def75d7aebd133264e420a3451fa7f703"
5155-
dependencies = [
5156-
"cfg-if 1.0.0",
5157-
"core-foundation-sys",
5158-
"libc",
5159-
"ntapi",
5160-
"once_cell",
5161-
"rayon",
5162-
"winapi",
5163-
]
5164-
51655103
[[package]]
51665104
name = "tar"
51675105
version = "0.4.38"
@@ -5538,7 +5476,7 @@ dependencies = [
55385476
"colored",
55395477
"crossbeam",
55405478
"lazy_static",
5541-
"pretty_assertions 1.2.1",
5479+
"pretty_assertions",
55425480
"regex",
55435481
"rustc_version",
55445482
"serde",

Cargo.toml

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
[workspace]
2-
default-members = ["src/bootstrap"]
32
members = [
4-
"src/bootstrap",
53
"compiler/rustc",
64
"library/std",
75
"library/test",
@@ -44,6 +42,7 @@ exclude = [
4442
"build",
4543
"compiler/rustc_codegen_cranelift",
4644
"compiler/rustc_codegen_gcc",
45+
"src/bootstrap",
4746
"src/test/rustdoc-gui",
4847
# HACK(eddyb) This hardcodes the fact that our CI uses `/checkout/obj`.
4948
"obj",
@@ -97,15 +96,6 @@ gimli.debug = 0
9796
miniz_oxide.debug = 0
9897
object.debug = 0
9998

100-
# The only package that ever uses debug builds is bootstrap.
101-
# We care a lot about bootstrap's compile times, so don't include debug info for
102-
# dependencies, only bootstrap itself.
103-
[profile.dev]
104-
debug = 0
105-
[profile.dev.package]
106-
# Only use debuginfo=1 to further reduce compile times.
107-
bootstrap.debug = 1
108-
10999
# We want the RLS to use the version of Cargo that we've got vendored in this
110100
# repository to ensure that the same exact version of Cargo is used by both the
111101
# RLS and the Cargo binary itself. The RLS depends on Cargo as a git repository

0 commit comments

Comments
 (0)