Skip to content
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

[vcpkg] Fix vcpkg crash and fail to apply patch issue when set VCPKG_FORCE_SYSTEM_BINARIES=1 #181

Closed
wants to merge 3 commits into from

Conversation

PhoebeHui
Copy link
Contributor

src/vcpkg/tools.cpp Outdated Show resolved Hide resolved
}
else
{
return get_path(paths, CMakeProvider());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably wrong; you need CMakeProvider to be ToolProvider where Tool is one of Git, or Ninja, or w/e

Comment on lines -590 to +608
if (get_environment_variable("VCPKG_FORCE_SYSTEM_BINARIES").has_value())
{
return {"cmake", "0"};
}
return get_path(paths, CMakeProvider());
get_system_tool_path(paths, "cmake");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it would cause a lot of binary cache key misses because the CMake version is included in the vcpkg_abi_info.txt. See also: microsoft/vcpkg#16615

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I think I got confused by the name of the new get_system_tool_path function introduced in this PR. From the name of the function I expected it to unconditionally use the system version of the tool rather than a copy vcpkg downloads. But it is a wrapper around get_path.

@BillyONeal
Copy link
Member

This PR has been effectively merged as part of #540

@BillyONeal BillyONeal closed this May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VCPKG_FORCE_SYSTEM_BINARIES cause vcpkg_apply_patches error on Windows
4 participants