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

Fix "vcpkg fetch" regression where we always print that we're downloading a file even when we're not. #575

Merged
merged 8 commits into from
Jun 9, 2022

Conversation

BillyONeal
Copy link
Member

#540 changed it so that we always check the versions of things, even downloaded tools. This caused a regression for all "generic" tools that we never find from the system, in that we always call "download_tool" even when we have a downloaded copy. This was detected in https://dev.azure.com/vcpkg/public/_build/results?buildId=72501&view=results where attempting to generate file lists fails because we assumed that running fetch a second time would never print status messages. ( #569 will independently fix that by printing status messages to stderr, but we should still not print misleading text )

Independently, it was bad that we never found a Python from the system, so this change makes "python3" no longer a generic tool. We should probably merge everything vcpkg_find_acquire_program does into vcpkg fetch.

  • Change find_from_PATH to accept more than one stem, as happens to Python.
  • Add ToolProvider::ignore_version which is used when the version of a tool can't be determined, which is true for "generic" tools.
  • Adds Python3Provider.

@Neumann-A
Copy link
Contributor

Independently, it was bad that we never found a Python from the system, so this change makes "python3" no longer a generic tool. We should probably merge everything vcpkg_find_acquire_program does into vcpkg fetch.

should not all tools be a vcpkg-tool-<toolname> port. Especially in the case of python where the python lib build by vcpkg and the python tool need to agree. Maybe @Hoikas can say something to that?

@BillyONeal
Copy link
Member Author

Before:
image

After:
image

@BillyONeal
Copy link
Member Author

should not all tools be a vcpkg-tool-<toolname> port. Especially in the case of python where the python lib build by vcpkg and the python tool need to agree. Maybe @Hoikas can say something to that?

I don't think we have consensus that we want vcpkg-tool-Xxx ports for most things, since that conveys that we want to be an acquisition channel for those tools to users, and we don't want to be.

Python in particular is the mother of all edge cases because both the Python port (which is for Python plugins, builds Python from source, etc.) and the Python artifact / fetch / etc. (which is for people who merely want a Python interpreter) are reasonable on their own and don't need to agree.

@Hoikas
Copy link
Contributor

Hoikas commented Jun 8, 2022

Python definitely needs to be the same across the universe, mostly due to CMake's brittle FindPython ecosystem. The current python3 port would be sufficient to provide a tool port for the host triplet.

@BillyONeal
Copy link
Member Author

Python definitely needs to be the same across the universe, mostly due to CMake's brittle FindPython ecosystem. The current python3 port would be sufficient to provide a tool port for the host triplet.

We are not going to force anyone who wants a python interpreter to run meson or whatever to build python from source. Yes, this does mean that care has to be taken for things that interact with CMake's brittle handling here, but that's already the case on all *nix and MacOS systems where Python is generally available on the system in the first place.

@Hoikas
Copy link
Contributor

Hoikas commented Jun 9, 2022

I realize I am quickly drifting off topic, but it probably needs to be said:

We are not going to force anyone who wants a python interpreter to run meson or whatever to build python from source.

To pre-empt the next batch of issues get opened about meson ports failing on Windows 7, we should probably remove the claim of Windows 7 support, in that case. The python3 prebuilts and python3 port must stay in sync with one another, lest that brittle handling break. Unfortunately, Windows 7 Python 3 was nuked as of Python 3.8. The easiest workaround for that is to simply use our own python3[deprecatedf-win7-support]. But, since we seem to be vehemently opposed to this solution, for whatever reason, then we should probably stop pretending to support things that we don't.

@BillyONeal
Copy link
Member Author

To pre-empt the next batch of issues get opened about meson ports failing on Windows 7, we should probably remove the claim of Windows 7 support, in that case.

vcpkg supports win7. That does not mean that every port and/or everything we can download on one's behalf does. We can clarify that.

The python3 prebuilts and python3 port must stay in sync with one another, lest that brittle handling break.

They are never in sync. /usr/bin/python3 is owned by apt, not us. 'fetch' is "give me the system's thing", not "give me something consistent within an installed tree" thing.

@BillyONeal BillyONeal merged commit d2d696a into microsoft:main Jun 9, 2022
@BillyONeal BillyONeal deleted the fetch-regression branch June 9, 2022 22:06
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.

5 participants