Open cher-nov opened 3 months ago
You did not describe the "problem you are trying to solve". What is it? What are you confused about?
You did not describe the "problem you are trying to solve". What is it? What are you confused about?
Sorry, my English is far from perfect. The thing that confuses me is the support for these variables in the code and their absence in the official documentation. That's it.
Right -- the question I'm asking is, what are you trying to achieve that you need to understand these variables?
Right -- the question I'm asking is, what are you trying to achieve that you need to understand these variables?
How to correctly access the staging manifests at least. I just noticed that RUSTUP_STAGED_MANIFEST
is not the only undocumented variable, and decided to make a list of them so that Rust developers don’t have to bother with this. "It is my duty to report." (c)
I'm not sure it makes sense to me to document a list of internal-only environment variables. I think most of these should probably remain internal and keeping those undocumented seems okay to me.
Problem you are trying to solve
https://rust-lang.github.io/rustup/environment-variables.html https://rust-lang.github.io/rustup/dev-guide/tips-and-tricks.html
After reading the
rustup
code a little (https://github.com/rust-lang/rust-forge/issues/760), I found out that not all the environment variables it supports are documented. A quick search usinggrep -rniI -e "var(" -e "env\!(" -e "env(" -e "var_os("
revealed at least these:https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/src/cli/self_update/unix.rs#L21
https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/src/cli/self_update/windows.rs#L186
https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/src/cli/self_update.rs#L512
https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/src/cli/self_update.rs#L627
https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/src/dist/mod.rs#L368
https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/src/dist/mod.rs#L534
https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/src/dist/mod.rs#L660
RUSTUP_DIST_SERVER
for this, contrary to rust-lang/rustup@f08c4fe8026cb48582b01a27d4ff72cc51b5299d: https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/doc/user-guide/src/environment-variables.md?plain=1#L17-L20https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/src/utils/utils.rs#L248
https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/src/config.rs#L274
https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/src/config.rs#L400
https://github.com/rust-lang/rustup/blob/edf5c22d478ecce60ae35e3d3a1ae5ff04c6bedb/src/toolchain.rs#L247
Solution you'd like
Describe all this somewhere and/or make a list of variables for internal use so as not to confuse people.