-
Notifications
You must be signed in to change notification settings - Fork 888
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
Offer to auto install VS 2022 #2954
Conversation
If there are no MSVC build tools already installed then default to auto installing Visual Studio 2022 Community Edition.
I think two issues with this PR are going to be testing and improving the messages displayed to users. Also this does spawn an interactive GUI installer which is not something rustup has done before. |
I just went through the manual process of trying to find the right things to be installed, I haven't looked closely yet, but VS 2022 Enterprise installed with several packs (that we use internally at Microsoft) still doesn't cover the requirements. I am happy to help test this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty OK with this - I have no useful way to check (My Windows system isn't for development) so if you can answer my questions and / or make the changes I suggest then I feel like we're close to being able to merge this if someone else can check it.
Thanks! Currently this PR is aimed at getting the OSS or home developer up and running with only what's needed for a pure Rust project using the Community Edition. The enterprise use case can be more complicated because we need to select the right edition and make sure to test for existing versions of any tools or libraries rather than installing the latest. That is something I plan to handle too but I'm worried about doing too much in one PR. Also enterprise projects are more likely to involve a mix of languages, frameworks, etc and other requirements which Rustup can't know about. This PR uses a "focused" GUI mode to concentrate on what Rustup will install but for other use cases it may be more important to display the full GUI. Sorry if I'm rambling. I've just been thinking a lot about various different use cases. |
No worries, not rambling :). I was just saying that I agree this can be a confusing process and that even with my enterprise installation with 20GB of components installed, I still was having trouble getting it working. I've tested the steps here manually so far and they did fix my Rust installation. This weekend I will try to build this and run some tests in a VM. I think there is a way we can also have the UI that is launched be completely non-interactive. |
Yeah there is. The problem is mostly licensing. Showing an interactive UI "solves" that by requiring the user to click through the prompts that link to the licenses. We can maybe solve that by linking to https://visualstudio.microsoft.com/license-terms/ and asking if the user agrees. Assuming that link is stable. |
Hm, there seems to be an issue with the arm linux CI?
|
On the basis that as it stands I can't easily test this, I'm going to merge and when we come to do the release I'll specifically seek feedback on this component during the public test phase. |
This PR aims to improve installation on MSVC hosts when the user does not have Visual Studio already installed. The default workflow will download and install VS 2022 unless the user declines.
For all other cases (e.g. Visual Studio is installed but lacks the required components) it falls back to the current manual install message. This could be further improved in the future but on reflection I think I'd like to work out the new VS install case first because I feel this will have the biggest impact. Users who are already familiar with Visual Studio will have an easier time understanding the install instructions.
See #2947