On windows .FOO does not imply 'hide from the UI'. The Hidden bit is set separately; we should set it. Probably we want to set it and record we've set it in settings.toml to fixup existing installs.
Directories for applications that are installed normally are not hidden, so there is an argument to be made that rustup should not hide where it is installed. The only reason to hide it is because of the unix convention of dotfiles being hidden and rustup choosing to install to a dotdirectory by default (which is wrong on Windows).
Also, care needs to be taken to ensure that we only hide .rustup and .cargo when they are in the default location and not a user customized location via RUSTUP_HOME/CARGO_HOME.
Those are good points; I agree that the installation path is not the normal windows convention, and in fact multirust as rustup used to be known used to be in APPDATALOCAL.
I'll leave this to get some more feedback before proceeding. I'm not sure I agree about only hiding if in the default location; the most common use of those variables we see is folk forcing FHS/XDG style layouts willy-nilly : but I would say that if the overridden path doesn't have a basename starting with a dot, then we clearly shouldn't hide it.
I think the "basename with leading dot -> set hidden bit" approach is good, I'm kinda feeling like we should just reconcile the hidden bit with the leading dot on self-update, we could do it in the second-half handling so it applies when people update to 1.23 and then remove it again and only set it during installation, or we could always reconcile it on any update. Either is fine with me. I think having an entry in the settings.toml is just overcomplicating things.
It does seem to make most sense to either follow the Windows convention or, if imposing foreign conventions on others, to impose them in a manner consistent with that foreign convention, rather than devising configuration around it.
@rustbot label: +O-windows
Most helpful comment
Directories for applications that are installed normally are not hidden, so there is an argument to be made that rustup should not hide where it is installed. The only reason to hide it is because of the unix convention of dotfiles being hidden and rustup choosing to install to a dotdirectory by default (which is wrong on Windows).
Also, care needs to be taken to ensure that we only hide
.rustupand.cargowhen they are in the default location and not a user customized location viaRUSTUP_HOME/CARGO_HOME.