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

[draft/RFC] Make tool ports first class citizens #31748

Closed
wants to merge 17 commits into from

Conversation

BillyONeal
Copy link
Member

@BillyONeal BillyONeal commented Jun 1, 2023

There are several outstanding efforts trying to introduce dependencies from vcpkg to various host support tools, or that wish to provide tools. vcpkg has no less than 5 different ways to get these dependencies:

  • tool ports
  • vcpkg fetch
    • known internally
    • vcpkgTools.xml
  • vcpkg_find_acquire_program
  • vcpkg artifacts

None of these do everything we want, see the following support matrix:

vcpkg tool support matrix

This introduces a new helper port, vcpkg-find-acquire-tool, which exposes the guts of vcpkg_find_acquire_program for tool port consumption. Moreover, it uses the new VALIDATOR feature of find_program to close the gap between what vcpkg_find_acquire_program was able to do and vcpkg fetch is able to do.

Remaining work necessary to complete this:

  • Confirm with the rest of the vcpkg maintainers that they like this outcome.
  • Confirm with contributors interested in this area that they view this as an acceptable direction.
  • Implement INTERPRETER and teach vcpkg-tool-meson to use this infrastructure.
  • Implement the SourceForge bits and add vcpkg-tool-swig and vcpkg-tool-doxygen.
  • Add a learn.microsoft.com page describing how a user writes a tool port and resulting guidelines.
  • Make the output of the 'get it from your system' message prettier; currently there are extra newlines I can't account for.
  • We should fix the couple of ports that seem to be accidentally getting the python3 interpreter when they appear to be making python bindings and thus should be using built-from-source Python before merging this. Non-exhaustive list of examples:
    • itk
    • libtorrent
    • libxslt
    • openscap

Work currently blocked by this:

Outstanding guidelines notes (to be added to based on other maintainers' comments):

  • Tool ports should NOT respect VCPKG_FORCE_SYSTEM_BINARIES; we believe that setting is poorly designed and will deprecate use of that setting going forward. Introducing VCPKG_FORCE_SYSTEM_<ToolName> might make sense.
  • Tool ports must not affect the behavior of ports that do not use bits exposed by the tool port. In particular, the existing vcpkg-tool-meson and vcpkg-tool-ninja break this rule by trying to influence what vcpkg_find_acquire_program does.
  • Tool ports must not do the actual work in their vcpkg-port-config.cmake, they must instead declare a function that does the actual work.
  • Tool ports include dependent vcpkg-port-config.cmake files in their own vcpkg-port.config.cmake files to ensure their functions are available.
  • Port cmake helper functions should be in a file named after their function to make it easy to find with Ctrl+P et al.
  • Tool ports can, but are not required to, use CMake cache entries; we expect most uses of tool port helper functions will only lookup the tool name once.
  • cmake_parse_arguments(PARSE_ARGV arg 1 "" "" "")
  • Check for required args:
        foreach(arg_name IN ITEMS  )
            if(NOT DEFINED "arg_${arg_name}")
                message(FATAL_ERROR "${arg_name} is required.")
            endif()
        endforeach()
  • Check for too many args:
        if(DEFINED arg_UNPARSED_ARGUMENTS)
            message(FATAL_ERROR "Unrecognized arguments: ${arg_UNPARSED_ARGUMENTS}")
        endif()
  • include_guard(GLOBAL)
  • Tool ports do not attempt to run their helper function inside portfile.cmake to make things fail early.
  • cmake-helpers include dependent vcpkg-port-config.cmake files in their own vcpkg-port-config.cmake file.

Reviewing individual commits highly recommended.

@BillyONeal BillyONeal added info:internal This PR or Issue was filed by the vcpkg team. category:infrastructure Pertaining to the CI/Testing infrastrucutre labels Jun 1, 2023
@Neumann-A
Copy link
Contributor

Should we fix the couple of ports that seem to be accidentally getting the python3 interpreter when they appear to be making python bindings and thus should be using built-from-source Python here?

Yes

(have to check the rest of the PR)

@@ -41,7 +41,8 @@ if(CMAKE_HOST_WIN32)
set(PYTHON3 "${MSYS_ROOT}/mingw64/bin/python3.exe")
vcpkg_execute_required_process(COMMAND ${PYTHON3} -c "import site; print(site.getsitepackages()[0])" WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} LOGNAME prerequisites-pypath-${TARGET_TRIPLET} OUTPUT_VARIABLE PYTHON_LIB_PATH)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this also generating python bindings?

Copy link
Contributor

Choose a reason for hiding this comment

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

Good question. The tensorflow ports are broken for windows. #30582 (comment)

@@ -17,7 +17,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS

set(ADDITIONAL_OPTIONS "")
if(PYTHON_BINDINGS)
Copy link
Contributor

Choose a reason for hiding this comment

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

did i miss that in the python bindings list?

Copy link
Member Author

Choose a reason for hiding this comment

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

The python bindings list was not exhaustive. Will investigate them as separate changes before this one lands.

# This function is called through find_path or find_program to validate that the program works
function(z_vcpkg_try_find_acquire_tool_validator result candidate)
vcpkg_execute_in_download_mode(
COMMAND ${candidate} $CACHE{z_vcpkg_try_find_acquire_tool_validator_VERSION_COMMAND}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you use $CACHE here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because find_program passes no context information to the validator, we have to route things through "globals". Since these need to come from the cache, I said $CACHE to make that excruciatingly clear.

Would you prefer I just remove $CACHE or do you have better suggestions on how to smuggle this information into the validator?

Copy link
Contributor

Choose a reason for hiding this comment

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

Would you prefer I just remove $CACHE

Just remove CACHE. I don't see a reason to actually use that.

passes no context information to the validator, we have to route things through "globals"

The context is scoped through the call site. (as all function calls are in cmake)
Example:

cmake_minimum_required(VERSION 3.25)
function(git_validator result item)
    message(STATUS "Scoped variable:${var}")
    set(${result} TRUE PARENT_SCOPE)
endfunction()
set(var "Hello from the validator!" )
find_program(GIT NAMES git VALIDATOR git_validator) 

Output:

E:\vcpkg_folders>cmake -P find_git.cmake
-- Scoped variable:Hello from the validator!

so no need to smuggle anything.

Comment on lines 10 to 12
# Given VERSION_PREFIX is "my fancy program" and program_version_output is
# "my fancy program 1.2.0", extract the dots-numeric part
if(DEFINED CACHE{z_vcpkg_try_find_acquire_tool_validator_VERSION_PREFIX})
Copy link
Contributor

@Neumann-A Neumann-A Jun 1, 2023

Choose a reason for hiding this comment

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

Can we pass a VERSION_REGEX instead? (or even a VERSION_VALIDATOR?)

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't necessarily object to VERSION_REGEX; I just looked at what the existing tools we care about do, and for them prefix was sufficient. I'm not sure how to document what the resulting regex interface would look like; how does the regex tell us where the version part is located?

CMake regex' inability to assert positions at line boundaries does not help :(

Copy link
Contributor

Choose a reason for hiding this comment

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

Then version VERSION_VALIDATOR it is ;). Yeah i did not think about CMAKE_MATCH_X being needed for the implementation

@@ -20,7 +20,8 @@ set(supported_on_unix ON)
set(version_command --version)
set(extra_search_args EXACT_VERSION_MATCH)

vcpkg_find_acquire_program(PYTHON3)
include("${CMAKE_CURRENT_LIST_DIR}/../vcpkg-tool-python3-interpreter/vcpkg-port-config.cmake")
Copy link
Contributor

Choose a reason for hiding this comment

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

another include. Still necessary?

Copy link
Member Author

Choose a reason for hiding this comment

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

This one was not necessary, good point.

@@ -0,0 +1,10 @@
{
"name": "vcpkg-tool-python3-interpreter",
"version": "3.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"version": "3.0.0",
"version": "3",

?

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed.

Comment on lines +7 to +9
"dependencies": [
"vcpkg-find-acquire-tool"
]
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe add a feature which will force the usage of the python3 port ? Or would you consider that a antipattern?

Copy link
Member Author

Choose a reason for hiding this comment

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

I consider that an antipattern. This tool port is only for "I need a python to run a python script and I do not otherwise care about the python ecosystem"; if you otherwise care about that you need to depend on python.

Yes, find_package(PYTHON3 does not make this clear :(

Copy link
Contributor

Choose a reason for hiding this comment

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

This tool port is only for "I need a python to run a python script and I do not otherwise care about the python ecosystem"; if you otherwise care about that you need to depend on python.

But there should be a rule how the python port exposes its binary.

Copy link
Member Author

Choose a reason for hiding this comment

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

But there should be a rule how the python port exposes its binary.

I don't think the existing tool ports are consistent enough for that; not every tool refers to a single individual binary. Guidelines are just guidelines, if a tool port needs something different, that's going to be reasonable to do.

@@ -67,7 +67,7 @@ vcpkg_download_distfile(GNI_TO_CMAKE_PY
)

# Generate CMake files from GN / GNI files
vcpkg_find_acquire_program(PYTHON3)
vcpkg_find_acquire_python3_interpreter(PYTHON3)
Copy link
Contributor

@Neumann-A Neumann-A Jun 1, 2023

Choose a reason for hiding this comment

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

vcpkg_find_acquire_python3_interpreter(PYTHON3)

Is kind of annoying and long. can we get something like:
vcpkg_get(<X>) and make that call vcpkg_find_acquire_<X>(X)

Having:

vcpkg_find_acquire_python3_interpreter(PYTHON3) # may need to be added to path
vcpkg_find_acquire_meson(MESON)
vcpkg_find_acquire_flex(FLEX) # may need to be added to path

is kind of verbose compared to something like

vcpkg_get(INTERPRETER python3 ADD_TO_PATH)
vcpkg_get(PYSCRIPT meson)
vcpkg_get(TOOL flex ADD_TO_PATH)

(the explicit dep in the manifest will still be verbose.)

@dg0yt
Copy link
Contributor

dg0yt commented Jun 1, 2023

  • Shall tool ports install tools to the installed tree (assets + fat artifacts, e.g. vcpkg-tool-bazel/gn/ninja), or put files in an ad-hoc location (buildtrees, downloads -> assets + thin artifacts, e.g. vcpkg-tool-lessmsi)?
  • Shall tool ports be able to fetch varying versions (e.g. gn or python may be needed with different exact versions by different consumers)?

@Neumann-A
Copy link
Contributor

Main points for discussion in my eyes:

Tool ports should NOT respect VCPKG_FORCE_SYSTEM_BINARIES; we believe that setting is poorly designed and will deprecate use of that setting going forward. Introducing VCPKG_FORCE_SYSTEM_ might make sense.

How is VCPKG_FORCE_SYSTEM_BINARIES different from looping over all VCPKG_FORCE_SYSTEM_<ToolName> and setting them to true? I don't think VCPKG_FORCE_SYSTEM_<ToolName> is necessary. It can be forced in the triplet due to CACHE variables (and if you want to avoid abi hashing simply include some other cmake file setting the values.)

Tool ports must not do the actual work in their vcpkg-port-config.cmake, they must instead declare a function that does the actual work.

I am ok with that but explicitly calling out to vcpkg_find_acquire_python3_interpreter(PYTHON3) is kind of redundant to the automatic include(vcpkg-port-config.cmake) and automatically calling vcpkg_find_acquire_python3_interpreter(PYTHON3) at the end of it unless you want to do something like vcpkg_get(INTERPRETER python3 ADD_TO_PATH) and pass additional parameters or allow additional injection from the portfile into the function.

Check for required args:

maybe add a z_<function> which can test that.

cmake_parse_arguments(PARSE_ARGV arg 1 "" "" "")

it is cmake_parse_arguments(PARSE_ARGV 1 arg "" "" ""). Also 0 is OUTPUT var ?

Should cmake-helper to cmake-helper dependencies include the vcpkg-port-config.cmake file, or the individual function files?

I am for the chaining/former approach since otherwise another helper port has implementation details of the upstream port. Depending on vcpkg-port-config.cmake to be available is a vcpkg convention and not up to a port.

Tool ports can, but are not required to, use CMake cache entries; we expect most uses of tool port helper functions will only lookup the tool name once.

Not using CACHE entries means disallowing overwrites from the triplet.

string(FIND
"${program_version_output}"
"$CACHE{z_vcpkg_try_find_acquire_tool_validator_VERSION_PREFIX}" prefix_offset)
# If there's no matching prefix, this isn't even the program we're looking for, so bail
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# If there's no matching prefix, this isn't even the program we're looking for, so bail
# If there's no matching prefix, this isn't even the program we're looking for, so fail

?

Copy link
Member Author

Choose a reason for hiding this comment

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

I did mean bail but I agree fail is probably more universally understandable; changed.

@Thomas1664
Copy link
Contributor

  • Should we fix the couple of ports that seem to be accidentally getting the python3 interpreter when they appear to be making python bindings and thus should be using built-from-source Python here?

Definitely yes!

IMO we should not build things like LLVM, Nodejs or Python from source when used as a tool.

Copy link
Contributor

@BurningEnlightenment BurningEnlightenment left a comment

Choose a reason for hiding this comment

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

Has it been considered to just outright drop Windows x86 32Bit support for (developer) tools? AFAICT there isn't any Windows 32Bit version with (extended) support left.

Comment on lines 17 to 24
if(is64_bit)
vcpkg_find_acquire_tool(
OUT_TOOL_PATH out_var_value
OUT_TOOL_ACQUIRED tool_acquired
OUT_EXTRACTED_ROOT out_extract_root
TOOL_NAME python
VERSION ${program_version}
DOWNLOAD_FILENAME "python-${program_version}-embed-win32.zip"
Copy link
Contributor

Choose a reason for hiding this comment

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

Logic error: if (is64_bit) => embed-win32.zip

The branches need to be inverted.

@Neumann-A
Copy link
Contributor

A single function as an interface, backed by a registry which is extended via tool ports. Something like ...

That goes into the direction of vcpkg_get i suggested in #31748 (comment). However, I currently come to the conclusion that is something which can be later introduced.

A port using vcpkg_find_acquire_program(bazel) could be upgraded to a new major version by just updating the port's the dependency on the tool port.

That will work independent of the approach.

Similar patterns may be seen in python, gn, llvm etc.. vcpkg just tried to avoid the topic. But if vcpkg is to stay, there will be more cases.

With python2 there is already precedence. But i think it will rather be the exception than the rule and stuff will be handled like CMake.

@dan-shaw dan-shaw mentioned this pull request Jun 15, 2023
2 tasks
@BillyONeal
Copy link
Member Author

Q: How are tool ports different than e.g. atlmfc ? A: atlmfc is always a system provided thing that the toolchain makes available by default; there is no information that needs to be conveyed into a build system to turn on its use.

@BillyONeal
Copy link
Member Author

@dg0yt I don't think we're opposed to the concept of asking for a version here; we're just changing enough things with this proposal and that opens a whole can of worms with negotiation etc. that I don't want to hold the rest for. That's why I'm saying "not right now, but not necessarily opposed to the idea".

@dg0yt
Copy link
Contributor

dg0yt commented Jun 20, 2023

Q: How are tool ports different than e.g. atlmfc ? A: atlmfc is always a system provided thing that the toolchain makes available by default; there is no information that needs to be conveyed into a build system to turn on its use.

Hm, I thought about the atlmfc pattern when I proposed the VSCLANG tool.

  • atlmfc is needed for the target triplet. Most tools are desired for (i.e. to be run on) the host triplet.
  • The actual atlmfc and vsclang are expected to come with the system (toolchain). Other tools must be downloaded (and cached at some point).
  • atlmfc and tools must be made available to the actual build process.
    • atlmfc does copying to include where it is found implicitly, but it shouldn't be needed.
    • Some tool ports do copying to tools where they are found implicitly, but it shouldn't be needed.
    • vfap and some tool ports provide the location explicitly only, via an output variable.
      AFAIU this is the proposed pattern here.
      However, this specific pattern more or less locks out user projects : they cannot call maintainer functions.

We depend on a significant set of such tools which are not yet sufficiently reflected: autoconf, automake, libtool, ... This is an issue because it leads to poor error reporting. (I know that ports should print there requirements, but this leads to a lot of redundant and inconsistent information.)

@Neumann-A
Copy link
Contributor

So where do we stand here? I would like to see this move forward somehow to unblock a few PRs of mine ;)

@dg0yt
Copy link
Contributor

dg0yt commented Aug 7, 2023

So where do we stand here? I would like to see this move forward somehow to unblock a few PRs of mine ;)

PING

set(download_sha512 2a1e539ed628c0cca5935d24d22cf3a7165f5c80e12a4003ac184deae6a6d0aa31f582f3e8257b0730adfc09aeec3a0e62f4732e658c312d5382170bcd8c94d8)
if(CMAKE_HOST_WIN32)
set(download_urls "https://dl.google.com/go/go${tool_subdirectory}.zip")
set(download_filename "go${tool_subdirectory}.zip")
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: tool_subdirectory and paths_to_search should also be under if(CMAKE_HOST_WIN32). The latter must also be quoted.

@@ -2,8 +2,10 @@ set(program_name nuget)
set(tool_subdirectory "5.11.0")
set(paths_to_search "${DOWNLOADS}/tools/nuget-${tool_subdirectory}-windows")
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this should also be under if(CMAKE_HOST_WIN32)

vcpkg_list(APPEND installed_pythons ${more_maybe_pythons})
endforeach()

if(is64_bit)
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be nice to have arm64 check, too

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree but for purposes of this PR I don't want to expand the feature set beyond what vcpkg_find_acquire_program does today.

endif()

if(tool_acquired)
file(REMOVE "${out_extract_root}/python310._pth")
Copy link
Contributor

Choose a reason for hiding this comment

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

I think there should be a comment about why this is needed in vcpkg (probably not in this PR)

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree but I don't know. This is copy pasta from vcpkg_find_acquire_program I think.

"dependencies": [
{
"name": "vcpkg-tool-python3-interpreter",
"host": true
Copy link
Contributor

Choose a reason for hiding this comment

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

For consistency, we should either remove host from dependencies from tool ports, or add them everywhere else (vcpkg-tool-python3-interpreter etc).

Copy link
Contributor

Choose a reason for hiding this comment

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

vcpkg-tool-python3-interpreter should probably be marked with "supports": "native" then?

Copy link
Contributor

Choose a reason for hiding this comment

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

It it already marked

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll ask maintainers. I have a mild preference for removing it when "supports":"native" just by virtue of being shorter.

Copy link
Contributor

Choose a reason for hiding this comment

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

FTR supports can be overridden at the command line, or restrictions can be removed in future revisions.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, this is a reason to keep it as it is

Copy link
Member Author

Choose a reason for hiding this comment

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

@ras0219-msft argues that 'not host:true' is more correct in the --allow-unsupported universe, because in, for example:

include("${CMAKE_CURRENT_LIST_DIR}/../vcpkg-find-acquire-tool/vcpkg-port-config.cmake")

this means the selected triplet for the dependency needs to match the selected triplet of the port.

Poll: We want host:true even when supports:native?

@JavierMatosD No.
@ras0219-msft No. (Strongly opposed to host:true.)
@BillyONeal @vicroms I'm convinced by @ras0219-msft
@data-queue No.

ports/openscap/vcpkg.json Show resolved Hide resolved
@@ -18,7 +18,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
"crypto" LIBXSLT_WITH_CRYPTO
)
if("python" IN_LIST FEATURES)
vcpkg_find_acquire_program(PYTHON3)
vcpkg_find_acquire_python3_interpreter(PYTHON3)
list(APPEND FEATURE_OPTIONS "-DPYTHON_EXECUTABLE=${PYTHON3}")
list(APPEND FEATURE_OPTIONS_RELEASE "-DLIBXSLT_PYTHON_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib/site-packages")
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks wrong. Should probably be lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages.
And the port should depend on python3 package.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should move everything to lib/site-packages or tools/python3/lib/site-packages. There is no need to hardcode the python version. But that is another PR in my eyes.

@Neumann-A Neumann-A mentioned this pull request Aug 9, 2023
11 tasks
@BurningEnlightenment
Copy link
Contributor

Soo, since the Perl update in #33854 got green-lit, can we maybe agree to update some other rarely used / unlikely to break things like Go while waiting for this?

@BillyONeal
Copy link
Member Author

BillyONeal commented Sep 25, 2023

Soo, since the Perl update in #33854 got green-lit, can we maybe agree to update some other rarely used / unlikely to break things like Go while waiting for this?

If the change is extremely unlikely to be breaking I think updates to vcpkg_find_acquire_program things are fair game. The things currently listed as blocked by this are either (1) totally new tools, or (2) things known to cause breakage. (As in, updating the tool version required corresponding changes in ports)

Notably, #33854 required no edits to ports/*. (If it did require such edits, it would not have been OK to merge)

@Neumann-A Neumann-A mentioned this pull request Oct 26, 2023
7 tasks
@BillyONeal BillyONeal mentioned this pull request Nov 1, 2023
BillyONeal added a commit to BillyONeal/vcpkg that referenced this pull request Nov 3, 2023
…unctions.

This updates the list of helper port scripts in ports.cmake to ensure it has every file in scripts/cmake, and changes the caller to conditionally call the function rather than conditionally include.

This was extracted from microsoft#31748 but I'm not sure we want to do it.
BillyONeal added a commit to BillyONeal/vcpkg that referenced this pull request Dec 2, 2023
This is a continuation of the work started in microsoft#31748 . There I tried to boil the ocean of all tools at the same time which turned into something unreviewable. Instead, this adds only python and meson, and a first caller of each.
@dg0yt dg0yt mentioned this pull request Mar 9, 2024
7 tasks
@vipcxj
Copy link
Contributor

vipcxj commented Mar 9, 2024

I think vcpkg should provide a mechanism to globally set the tool version to be used, and each port can individually specify the tool version it needs, so that when a port needs a higher version of tool which not exists in vcpkg, it only needs to add this version of tool as a port and specify the port to use it, which won't affect any of the older ports.
Specifically, when relying on vcpkg-tool-meson as a host dependency, if the version is not specified, vcpkg should choose a specific reliable version instead of the latest version. When a port needs to use a newer meson, just specify the version number in the dependency. And for host dependencies like meson, the ontology must be allowed to have different versions at the same time. Different ports can use different mesons.

@gerard-ryan-immersaview
Copy link
Contributor

Is there any update on this?

@BillyONeal
Copy link
Member Author

Closing this as there has been no action in more than 4 months. Doesn't mean we are giving up on tool ports, but I don't think the comments here are going to be useful in a subsequent review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:infrastructure Pertaining to the CI/Testing infrastrucutre info:internal This PR or Issue was filed by the vcpkg team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants