Skip to content

[vcpkg] Allow compilation of HEAD_REF-only ports in manifest mode#16613

Closed
PazerOP wants to merge 1 commit intomicrosoft:masterfrom
PazerOP:head_fallback_on_manifests
Closed

[vcpkg] Allow compilation of HEAD_REF-only ports in manifest mode#16613
PazerOP wants to merge 1 commit intomicrosoft:masterfrom
PazerOP:head_fallback_on_manifests

Conversation

@PazerOP
Copy link
Contributor

@PazerOP PazerOP commented Mar 9, 2021

Requires microsoft/vcpkg-tool#24 to work, otherwise it does nothing.

Sort of addresses #12504. More specifically, supports my desired use case:

With the given conditions, it is impossible to build my project. vcpkg will run the manifest install step, then hit my --head-requiring port, and abort.

I cannot use --head, because not all my vcpkg dependencies are built from source (discord-game-sdk). I also have no desire to be living on the bleeding edge for any third-party dependencies anyway.

Theoretically, this change should not break any existing behavior (unless people were relying on vcpkg not working in this situation). It takes a previously non-working scenario (HEAD_REF-only port, manifests, and no --head) and makes it work in a (in my opinion) reasonable way.

…specific options), and a package requires --head, choose the head ref automatically.
@PazerOP PazerOP marked this pull request as ready for review March 9, 2021 06:27
@JackBoosY JackBoosY added the category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed label Mar 9, 2021
@ras0219-msft
Copy link
Contributor

ras0219-msft commented Mar 15, 2021

We are very hesistant to introduce any functionality that produces nondeterministic behavior, especially without loud, obnoxious messages for/from users.

Have you considered just defining VCPKG_USE_HEAD_VERSION yourself in your port?

set(VCPKG_USE_HEAD_VERSION ON)

Note: this is not a supported scenario and breaks binarycaching, but it is a hack that may give you what you want.

@PhoebeHui PhoebeHui changed the title Allow compilation of HEAD_REF-only ports in manifest mode [vcpkg] Allow compilation of HEAD_REF-only ports in manifest mode Apr 1, 2021
@ras0219-msft
Copy link
Contributor

Closing for now, let me know if the above solution doesn't work for you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants