Uh oh!
There was an error while loading. Please reload this page.
Shrink the rust-src component - #41546
Conversation
rust-highfive
commented
Apr 25, 2017
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
cuviper
commented
Apr 26, 2017
@malbarbo To paraphrase, you're asking about the fact that rust-std may or may not include rustc crates? I'm not actually referring to rust-std for the chosen crates here, but only the proper If we want to include rustc crates in rust-src, we could, but I don't think that's necessary. All of those crates are unstable, and folks who really want that can still checkout rust.git for use by racer et al. |
alexcrichton
commented
Apr 26, 2017
Thanks for the PR @cuviper! This seems like the kind of list that's highly susceptible to breakage over time, I wonder if we could enhance distcheck to verify that the rust-src component is valid? Maybe something like executing Also cc @jonathandturner and @nrc, I believe the rls uses the rust-src component |
petrochenkov
commented
Apr 26, 2017
I need to check if this breaks intellisense for people developing rustc itself using editors with plugins depending on |
petrochenkov
commented
Apr 26, 2017
Ok, everything still seems to work normally. |
cuviper
commented
Apr 26, 2017
@alexcrichton I agree that the list is a bit fragile. Using I think rls primarily uses this through racer, but I'm not certain. I don't usually use rls or vscode, but it seems like it works, and I did make sure racer directly works too. |
cuviper
commented
Apr 26, 2017
Well at first glance, it's not that easy, because Just having the distcheck as your suggested is probably an 80% solution, and it's not like this list changes frequently. |
alexcrichton
commented
Apr 26, 2017
So far this list has changed at least once a cycle for I think the past 3 or 4 cycles? Which means it'd otherwise have broken once per release so far for the past few months :( |
cuviper
commented
Apr 26, 2017
OK, there's a distcheck. I double-checked that if the source list has something bogus then rust-src doesn't build successfully, and if it's missing something (say libcore) then the distcheck catches that. |
alexcrichton
commented
Apr 26, 2017
bors
commented
Apr 26, 2017
📌 Commit b9bdb17 has been approved by |
…chton Shrink the rust-src component Before this change, the installable rust-src component had essentially the same contents as the rustc-src dist tarball, just additionally wrapped in a rust-installer. As discussed on [internals], rust-src is only meant to support uses for the standard library, so it doesn't really need the rest of the compiler sources. Now rust-src only contains libstd and its path dependencies, which roughly matches the set of crates that have rust-analysis data. The result is **significantly** smaller, from 36MB to 1.3MB compressed, and from 247MB to 8.5MB uncompressed. [internals]: https://internals.rust-lang.org/t/minimizing-the-rust-src-component/5117
…chton Shrink the rust-src component Before this change, the installable rust-src component had essentially the same contents as the rustc-src dist tarball, just additionally wrapped in a rust-installer. As discussed on [internals], rust-src is only meant to support uses for the standard library, so it doesn't really need the rest of the compiler sources. Now rust-src only contains libstd and its path dependencies, which roughly matches the set of crates that have rust-analysis data. The result is **significantly** smaller, from 36MB to 1.3MB compressed, and from 247MB to 8.5MB uncompressed. [internals]: https://internals.rust-lang.org/t/minimizing-the-rust-src-component/5117
cuviper
commented
Apr 27, 2017
alexcrichton
commented
Apr 27, 2017
frewsxcv
commented
Apr 27, 2017
I did not do any manual adjustments to the rollup. Everything that's committed in there is through the bors queue interface. I feel like we've had this happen before; it's kind of a scary bug. |
cuviper
commented
Apr 28, 2017
I just noticed, that's not the tail commit -- it should be c5cd4cb. @alexcrichton maybe r+ it explicitly? |
alexcrichton
commented
Apr 28, 2017
bors
commented
Apr 28, 2017
💡 This pull request was already approved, no need to approve it again. |
bors
commented
Apr 28, 2017
🙀 |
alexcrichton
commented
Apr 28, 2017
Hm sure enough homu is now wedged with this, closing to test out. |
alexcrichton
commented
Apr 28, 2017
Hm @cuviper mind sending up a follow-up PR? Sorry for the automation hiccup :( |
cuviper
commented
Apr 28, 2017
No problem, I was already getting that ready. :) #41608 |
…richton Add a distcheck for rust-src completeness This is for the last commit of rust-lang#41546. For some reason, @bors only saw the first two commits, and wouldn't approve the last even when explicitly directed so. r? @alexcrichton
…richton Add a distcheck for rust-src completeness This is for the last commit of rust-lang#41546. For some reason, @bors only saw the first two commits, and wouldn't approve the last even when explicitly directed so. r? @alexcrichton
…richton Add a distcheck for rust-src completeness This is for the last commit of rust-lang#41546. For some reason, @bors only saw the first two commits, and wouldn't approve the last even when explicitly directed so. r? @alexcrichton
rust-src: include everything needed to compile libstd with jemalloc I am not very happy about all this `Path::new`, but did not find a nice way to avoid it. Also, this shouldn't be very performance-critical. With this patch, rust-src-1.19.0-dev.tar.gz grows from 1.4 to 3.1 MiB (new uncompressed size: 15.5 MiB). Not great, but shipping incomplete sources is also not great, and this is still much smaller than pre-rust-lang#41546. Excluding the entire `src/jemalloc/test` does not work, unfortunately; there is a file in there that is needed to build libstd. (And anyway there's just 190 KiB uncompressed left in that folder.) In principle, we could try excluding the Rust test suite directories (that would be `libcore/tests` and `libcollection/tests`). I don't know enough about how this component is used to judge whether that would cause any problems. Anyway this is just 600 KiB uncompressed. Fixesrust-lang#41952
rust-src: include everything needed to compile libstd with jemalloc I am not very happy about all this `Path::new`, but did not find a nice way to avoid it. Also, this shouldn't be very performance-critical. With this patch, rust-src-1.19.0-dev.tar.gz grows from 1.4 to 3.1 MiB (new uncompressed size: 15.5 MiB). Not great, but shipping incomplete sources is also not great, and this is still much smaller than pre-rust-lang#41546. Excluding the entire `src/jemalloc/test` does not work, unfortunately; there is a file in there that is needed to build libstd. (And anyway there's just 190 KiB uncompressed left in that folder.) In principle, we could try excluding the Rust test suite directories (that would be `libcore/tests` and `libcollection/tests`). I don't know enough about how this component is used to judge whether that would cause any problems. Anyway this is just 600 KiB uncompressed. Fixesrust-lang#41952
rust-src: include everything needed to compile libstd with jemalloc I am not very happy about all this `Path::new`, but did not find a nice way to avoid it. Also, this shouldn't be very performance-critical. With this patch, rust-src-1.19.0-dev.tar.gz grows from 1.4 to 3.1 MiB (new uncompressed size: 15.5 MiB). Not great, but shipping incomplete sources is also not great, and this is still much smaller than pre-#41546. Excluding the entire `src/jemalloc/test` does not work, unfortunately; there is a file in there that is needed to build libstd. (And anyway there's just 190 KiB uncompressed left in that folder.) In principle, we could try excluding the Rust test suite directories (that would be `libcore/tests` and `libcollection/tests`). I don't know enough about how this component is used to judge whether that would cause any problems. Anyway this is just 600 KiB uncompressed. Fixes#41952
Before this change, the installable rust-src component had essentially the same contents as the rustc-src dist tarball, just additionally wrapped in a rust-installer. As discussed on internals, rust-src is only meant to support uses for the standard library, so it doesn't really need the rest of the compiler sources.
Now rust-src only contains libstd and its path dependencies, which roughly matches the set of crates that have rust-analysis data. The result is significantly smaller, from 36MB to 1.3MB compressed, and from 247MB to 8.5MB uncompressed.