Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upMaking docs optional again #998
Comments
This comment has been minimized.
This comment has been minimized.
vks
commented
Mar 22, 2017
|
Another problem are network file systems. For me it takes minutes to install the docs, the rest finishes almost instantly. |
This comment has been minimized.
This comment has been minimized.
pravic
commented
Mar 22, 2017
•
|
I'd prefer to leave docs as optional since I use the online version only and don't want to waste disk space or increase rustup update time. |
brson
referenced this issue
Mar 23, 2017
Open
Teach rustup/rustbuild about optional components #1006
This comment has been minimized.
This comment has been minimized.
|
The major missing feature is that the manifest format needs to be extended to understand optional features: #1006. |
Diggsey
added this to Components & extensions
in Issue Categorisation
May 3, 2017
Diggsey
referenced this issue
Jun 25, 2017
Closed
Docs are not optional / removable for MSVC nigtly toolchain #1170
This comment has been minimized.
This comment has been minimized.
Boscop
commented
Jun 26, 2017
•
|
Yes, please make docs optional again! We work a lot with Raspberry Pis where space is very limited! |
Diggsey
referenced this issue
May 27, 2018
Closed
component rust-docs is required and cannot be removed #1412
This comment has been minimized.
This comment has been minimized.
wagenet
commented
Sep 13, 2018
|
This would certainly be nice for CI. |
This comment has been minimized.
This comment has been minimized.
Boscop
commented
Sep 14, 2018
|
And when updating a nightly or when different projects use different nightlies (with a |
This comment has been minimized.
This comment has been minimized.
pravic
commented
Sep 14, 2018
•
Is it still? Because now we have plenty of optional components in rustup (rust-std-*, rust-src, clippy-preview, etc). The problem is (among others) that $toolchain/share/doc contains nearly 15000 files which is a big pressure on disk during toolchain updates - on Windows it takes a really significant amount of time to install rust-docs. From #903:
I am fine with default (though I really doubt that those who really need docs can't install them as a component), but let's make them as opt-out, so rustup would remember during the next update that rust-docs doesn't need to be downloaded. |
This comment has been minimized.
This comment has been minimized.
Boscop
commented
Sep 14, 2018
•
|
I can confirm that it takes a long time to install the docs on windows, and I'm dealing with multiple nightlies for different projects (with But I'd prefer if the docs were opt-in, because most people only use the online docs. An internet connection is required to be able to use Rust anyway.. |
This comment has been minimized.
This comment has been minimized.
Arnavion
commented
Sep 14, 2018
@pravic The issue is that the manifest does not have a way express opt-out components, only opt-in. |
This comment has been minimized.
This comment has been minimized.
|
The playground docker images are also about 300MB larger than they need to be because of the docs (which I'm working on removing at the moment). |
This comment has been minimized.
This comment has been minimized.
Geobert
commented
Sep 19, 2018
|
Installation of docs makes rustup hang at the end of the install process: #1464 |
Boscop
referenced this issue
Sep 28, 2018
Open
Windows Defender goes nuts when running rustdoc on some projects #36277
This comment has been minimized.
This comment has been minimized.
pronebird
commented
Oct 24, 2018
|
It takes ages for us to install Rust on Travis/Windows. Any progress on sorting this out? Really delays builds by 10 minutes or more which is impossible to work in productive way without wasting 2 hours on CI each day. |
This comment has been minimized.
This comment has been minimized.
|
I have a plan for profiles which will address this. I hope to implement in the next few weeks |
faern
referenced this issue
Nov 9, 2018
Open
Aniviruses cause a huge slowdown for 'rust-docs' installation #763
This was referenced Nov 14, 2018
johnthagen
referenced this issue
Nov 29, 2018
Open
Installing rust-docs component on Windows 10 is very slow #1540
This comment has been minimized.
This comment has been minimized.
|
@nrc I'm sure this is nothing new to you, but wanted to provide another data point. Building a https://travis-ci.org/johnthagen/min-sized-rust/builds/465623377 The profile work will have a great impact on CI. |
thedavidmeister
referenced this issue
Dec 17, 2018
Open
installing rust docs is painfully slow on windows on travis #769
This comment has been minimized.
This comment has been minimized.
Kampfkarren
commented
Dec 27, 2018
|
@nrc What's the status on that? rust-docs takes minutes to install when I never use them. |
This comment has been minimized.
This comment has been minimized.
thedavidmeister
commented
Jan 2, 2019
This comment has been minimized.
This comment has been minimized.
|
Yeah @johnthagen it's all pretty lolworthy. Maybe there's no right answer. Installed by default but decompresed on first use might be a good compromise - presumably its not the download that hurts windows users but touching so many files. Plus options to not install docs at all perhaps. Decompressing on first use does make the assumption that everybody access the toolchain docs via rustup (or maybe cargo?). I'm not sure that's true, whether its because somebody wants to use a different browser or because rustup could even consider rust-docs installed w/o even downloading the tarball - download and decompress on first use. I think that's possible. It would though make the network required for first view of the docs. Probably the size of rust-docs tarball is not so much we need to care. Just a strawman:
|
This comment has been minimized.
This comment has been minimized.
pravic
commented
Feb 13, 2019
|
Just FYI, the docs tarballs are about 30 MB in tgz format. It's not nothing. |
This comment has been minimized.
This comment has been minimized.
pronebird
commented
Feb 13, 2019
•
|
I think it's way easier to not install |
This comment has been minimized.
This comment has been minimized.
lnicola
commented
Feb 13, 2019
|
I'd say don't install |
This comment has been minimized.
This comment has been minimized.
With a short warning that on Windows installing |
This comment has been minimized.
This comment has been minimized.
|
rust-doc should be installed by default and have an opt-in (command line argument) to not install it. Because when you need the offline doc (no internet), there's no way to get it. |
This comment has been minimized.
This comment has been minimized.
lnicola
commented
Feb 13, 2019
|
This comment has been minimized.
This comment has been minimized.
|
@lnicola Installing |
This comment has been minimized.
This comment has been minimized.
|
alternative strawman design following what I believe the OP was based on:
(EDIT: keeping the component compressed and decompressing on use seems like it could also be worth it, but personally I would first prefer to have the ability to opt-out completely for most of my toolchains, only keeping docs for |
This comment has been minimized.
This comment has been minimized.
|
If I remember correctly the consensus lately is that we’d prefer the docs to be included by default because the first time someone might need a local copy is when they’re offline, and at that point it might be too late to download them. But we want the ability to disable them for scenarios like CI. Unfortunately the rustup manifest format does not support yet having a component that is optional but enabled by default, so this needs some implementation work. Separately, the rustdoc team wants to find a way to ship a compressed archive that can be used in place, so that there isn’t a need to create so many files: https://paper.dropbox.com/doc/Rustdoc-2019-roadmap-meeting--AXcjEXi3H6gpiujVOgSaSdmEAg-of8FmD8ZbXNvxD4swa45s |
This comment has been minimized.
This comment has been minimized.
thedavidmeister
commented
Feb 18, 2019
|
all the options proposed so far are reasonable imo, they respect offline access (either always or after the first access) and achieve what is needed here a 30MB dl is trivial on CI, where many GB typically gets pulled down in 10-20 seconds (e.g. restoring cache on travis), still should be fast enough to not appear broken on regular connections what is possible to implement right now without major refactoring? |
This comment has been minimized.
This comment has been minimized.
SamWhited
commented
Feb 18, 2019
•
Please try to remember that "regular connections" are not the same speed everywhere. 30MB is very large, and would take a significant amount of time or cost a significant amount of money in bandwidth in many places. |
This comment has been minimized.
This comment has been minimized.
thedavidmeister
commented
Feb 18, 2019
|
i live in australia, we have plenty of terrible internet connections here ;) if downloading the docs is truly a dealbreaker in many places there are no options other than making it optional we should not discuss anything else if we agree the bandwidth cost is unacceptable that said, if 30mb is a significant cost i'm not sure how it would be possible to work with rust on a large project anyway given the size of all the crates that end up as dependencies... |
This comment has been minimized.
This comment has been minimized.
|
I think @pravic's solution strikes the right balance:
|
This comment has been minimized.
This comment has been minimized.
thedavidmeister
commented
Feb 18, 2019
|
given the age of this issue, i am a little worried that we might "commit" to an ideal that requires a lot of yak shaving... then 12 months passes because nobody has the time/expertise to land what was "committed to", despite best intent do we have a passable option that doesn't require heroic effort from anyone? |
This comment has been minimized.
This comment has been minimized.
|
I was hoping to back able to ask @nrc tomorrow/Tuesday, at the Rustup WG meeting. |
This comment has been minimized.
This comment has been minimized.
thedavidmeister
commented
Feb 18, 2019
|
that sounds awesome |
This comment has been minimized.
This comment has been minimized.
faern
commented
Feb 18, 2019
•
|
Installing them by default, but being able to fully opt out of their download completely sounds like the only really clean solution to me. Everyone who don't really care will get them by default and have access to them when they are offline, just like now. But CI and those who care about their bandwidth and time it takes to install on Windows can just append something like I think optional, opt-out, components make sense even outside the scope of docs. By default rustup is somewhat "batteries included", but there is still a way to only get the bare minimum to compile Rust programs. Really useful for build servers or more constrained environments. |
This comment has been minimized.
This comment has been minimized.
|
There's basically two separate but related features here:
Either feature on their own is helpful, but having both of them will make everyone happy. People who don't want any bandwidth wasted at all can opt out, people who are suddenly without internet and realize they forgot to install the docs won't be screwed, and people installing Rust on Windows won't have to suffer through agonizing installation times. |
This comment has been minimized.
This comment has been minimized.
|
Does anyone know, now that @nrc is leaving Mozilla, what will become of his implementation of this feature? |
This comment has been minimized.
This comment has been minimized.
|
An initial, still WIP PR was sent last week intended to bring a solution to this issue: #1673. |
This comment has been minimized.
This comment has been minimized.
thedavidmeister
commented
Mar 12, 2019
|
maybe this got worse, or maybe travis got worse now seeing intermittent build timeouts: https://travis-ci.com/holochain/holochain-rust/jobs/184030443 maybe the docs have grown recently and we hit some threshold? |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
You might be seeing rust-lang/rust#58849. Workaround at rust-lang/rust#58849 (comment). |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Ah sorry, the issue I just linked is about running the rustdoc tool but this thread and your comment is about installing the rust-docs component of a rustup toolchain. Never mind. |
This comment has been minimized.
This comment has been minimized.
andywswan
commented
Apr 2, 2019
|
it seems to me that no one but 0.1% of the community needs the docs by default, but I just can't think of what to do next? shouldn't we create a poll or something somewhere? |
This comment has been minimized.
This comment has been minimized.
|
Progress is being made, though slowly, on installation profiles to allow for this without the need for polling a subset of the community. All I can ask is that you remain patient. |
This comment has been minimized.
This comment has been minimized.
ashthespy
commented
Apr 2, 2019
|
@kinnison Any way the community could help? If there are smaller sub tasks, I don't mind trying my hand at it. |

MJDSys commentedMar 20, 2017
•
edited
See as docs are required again due to #903, can we track what's necessary to make them optional again here? As one of my laptops doesn't have space for the docs (16G disk :( ), I'd be interested in helping fix the relevant issues. The two mentioned issues I've seen are:
Are there any others? And if you prefer to track this information elsewhere, please close this bug and point me in the right direction!