Add a Windows manifest to uv binaries #16894
Merged
+52
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Currently we do not include a Windows manifest on the uv binary for windows builds. This can cause problems such as the one in #16877 which can limit what uv can do for some Windows operations (e.g. symlinks) that can have restrictions imposed by the OS unbeknownst to us and make it none obvious to isolate the issue.
Given we already do this for the
uv-trampoline, we should also do it for uv. In the case of uv, I opted for explicit entries in the manifest rather than using the defaults embed_manifest crate provides which are not appropriate in all general cases.The manifest now includes declarations for:
uv-trampoline, but it's arguably a breaking change in rare cases. We shouldn't have issues with using utf-8 as we don't really rely on *A calls to begin with.HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem@LongPathsEnableddword being set to1(see ref).The resulting manifest is the following
For reference, here's
cargo's manifest from 1.91Closes #16877
Test Plan
Before changes on Windows 11 25H2 (without SeCreateSymbolicLinkPrivilege)
Before changes on Windows 11 25H2 (with SeCreateSymbolicLinkPrivilege)
After changes on Windows 11 25H2 (with or without SeCreateSymbolicLinkPrivilege)