-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to install dotnet at .dotnet/$rid #14913
base: main
Are you sure you want to change the base?
Conversation
613df43
to
de12fab
Compare
de12fab
to
ce400da
Compare
Honestly I'm not in favor of this change. While the current layout might not be correct in all cases, it existed for years and works. I fear that many repositories (150+ repos depend on Arcade) expect the dotnet installation to exist in the current location. Another example is
|
This is enabled with repo sets We also have |
Right, but I question the benefit of adding yet another path. I'm not sold that this is needed. Which repositories would set this? |
This enabler is mainly for runtime where we do a lot of platform-specific builds, I'm testing it dotnet/runtime#104295 to see how CI reacts. BTW, we don't have to set it repo-wide either. Just having this facility enables the consumer (either the repo itself, or someone building a repo) to use the derived RID in installation path that works with dotnet.sh/cmd. |
After thinking through this some more I'm also not sure anymore this is the best approach since it's only really useful if we enable it by default and we probably don't have the resources to fix all the cases where we assume the current path. I had another simpler idea though: we should be able to detect whether we have the right dotnet by running e.g. |
Re-downloading the right RID can be nice - when jumping locally between Windows and WSL, you need to keep nuking the Alternatively, why not just adding an optional argument with the destination dir and override it in runtime's scenarios? |
You can work around this by installing the right .NET SDK in a global location on both systems. These scripts are able to auto-detect that you have the right version available and skip downloading the repo-local copy. |
It will not fail with the current state of this PR because of line 22. IMO we should take this change and fix like those few places taking wrong assumptions and there aren't that many. I think this change is even less riskier than any other change we make in arcade which can break downstream, in that we have it behind an enviornment variable, which we can remove if we want after updating all consumer repos to use the new scheme. |
@ViktorHofer, any further thoughts on this? Yesterday, I was building dotnet/winforms on win-arm64 by invoking
as I was fixing the compilation issue with latest roslyn, all three versions were the same (global.json had latest version). Consequently, Separate directories is not new in dotnet install. There are multiple scenarios discussed where it'd help (docker, wsl, winform). If we are considering it we should take this change at the beginning of 10.0 cycle and update the downstream repos gradually with trivial changes. |
It is enabled by setting
DOTNET_USE_ARCH_IN_INSTALL_PATH=1
.Fix #14751
cc @akoeplinger