-
Notifications
You must be signed in to change notification settings - Fork 113
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
Update to Rust/Cargo v1.75 and simplify Windows Conda setup #9935
base: main
Are you sure you want to change the base?
Conversation
4dd8bf9
to
7b7d7ad
Compare
env-windows.yml
Outdated
- pip=22.3.1 | ||
- rust=1.75 | ||
- rust-std-armv7-linux-androideabi=1.75 | ||
- rust-std-x86_64-linux-android=1.75 |
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.
We don't support compiling android on windows, so no need to have those :)
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.
Huzzah!
<!-- | ||
Merge modules | ||
--> | ||
<DirectoryRef Id="MozillaVPNFolder"> |
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 am waaaay to far away rn from a real windows PC to test this but afaik we require a VC_redist to be installed for the client to run. So if none are installed, (which is unlikey tbf) things might break, no ?
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.
My understanding is that from Windows 10 onwards microsoft has switched to a universal CRT that no longer requires a vcredist, and since the WIX installer goes out of its way to deny installation on earlier versions of Windows then this shouldn't be needed anymore.
But yes, much testing is required.
@@ -12,13 +12,16 @@ task-defaults: | |||
worker-type: b-win2022 | |||
fetches: | |||
fetch: | |||
- win-dev-env |
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.
This line brings me so much joy.
60caccc
to
74fc57a
Compare
Description
It took me three tries to get this done, but this should upgrade our Cargo/Rust toolchain to version v1.75 up from v1.69. The work was fairly straightforward for every platform except Windows, where all we really needed to do was bump a version number and work around some minor build quirks.
Windows however, turned out to be a beast, and I found it unable to build after touching the rust crates. This forced me to finally recon with my personal development machine and figure out why it never worked with Conda. A quick tour of the changes on Windows that made this all work for me:
rust-std-apple-xxx
packages now have a dependency on the pseudo-package__unix
which makes them uninstallable on Windows. For this reason, I felt it was best to split out condaenv.yml
file into a UNIX and Windows variant. This enabled some other cleanup in the Windows env too and to omit theextras.ps1
script.MSM/MergeModules
aren't installed by the Jake-Shadle/xwin project, and word on the internet is that they are only required to support Windows 8 and earlier. Given that we explicitly require Windows 10 (and even block installation on older version) we can just remove this and it ought to work.scripts/windows/conda-toolchain.cmake
that can be used as a one-stop-shop to configure CMake with Clang-CL and the conda environment. This effectively replaces all of the environment hacking in the oldconda_setup_win_sdk.ps1
script.config.toml
for Windows that passes the CMake toolchain tocargo
this eliminates much of the environment hacking needed to get cargo to build.conda-setup-xwin-sdk.ps1
script using the latest versionJake-Shadle/xwin
project using the new--use-winsysroot-style
option which allows us to massively simplify the arguments to Clang and LLVM in order to connect the two.I think this was especially painful for me because my Windows machine has MS Visual Studio 2019 installed for other projects too and I am hesitant to uninstall it to get conda working. Hopefully with these changes we should get a working build environment both with and without VS2019 installed.
Reference
First Attempt: #9812
Second Attempt: #9914
Checklist