Replies: 2 comments
-
Giving this to @ras0219 because it sounds vaguely binary caching related. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Git for Windows provide 64bit portable binaries. For instance: https://github.com/git-for-windows/git/releases/tag/v2.26.2.windows.1
Currently an x86 (32bit) git binary is being downloaded and used every time vcpkg is installed somewhere on x64 Windows 10:
Unfortunately, it appears that the version of Git offered by Visual Studio is older than the current version used by vcpkg:
If the people maintaining Git for Windows at Microsoft would bump their version to 2.26.2 or newer, vcpkg on windows could use it instead of downloading a portable copy of Git every time it is installed.
On Windows 10, Visual Studio's Git for Windows could be installed by vcpkg if Visual Studio is detected in one of the methods detailed in the following web page:
https://devblogs.microsoft.com/cppblog/finding-the-visual-c-compiler-tools-in-visual-studio-2017/
Likely the powershell API is optimal.
(As an aside, the atlmfc port could also do this for the installation of ATL/MFC components instead of just printing an error to screen and a build failing if the components are missing.)
I understand that there maybe security reasons for needing the latest Git (and surely this is more important for a system wide installation.)
But are there new git features which vcpkg is relying on which require the very latest git binary which would mean that looking for and using Visual Studio's git binary is a no go?
Proposed solution
Detect if a Windows system is 64 bit and use 64bit portable Git binaries, should that be the case.
Attempt to use Visual Studio's Git for Windows component instead of a portable git binary on Windows.
Fall back to a portable Git binary if the version shipped via Visual Studio's Git for Windows component is too old and lacks new features required by vcpkg (although I'm not aware of any currently.)
Additional context
In short, I'd just like to install git once via the Visual Studio installer and forget about it. It irks me slightly to see an arbitrary 32 bit binary being downloaded from an un-vetted external source (although technically trusted) which is not Microsoft. Github releases allow anyone to upload anything as an archive afaik. This poses a risk factor which doesn't need to exist. Git for Windows via the Visual Studio installer should be able to provide all that vcpkg needs from a git binary and vcpkg should use it by default on Windows 10 imo.
Beta Was this translation helpful? Give feedback.
All reactions