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

Tag in vcpkgCommitId #47

Closed
Shatur opened this issue Oct 14, 2020 · 10 comments
Closed

Tag in vcpkgCommitId #47

Shatur opened this issue Oct 14, 2020 · 10 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Shatur
Copy link

Shatur commented Oct 14, 2020

If I understand correctly, then vcpkgCommitId cannot contain a tag. But if you specify it, then I will get silently non-working cache. Workflow output with tag in vcpkgCommitId (the cache is unpacked but not used).

@Shatur Shatur mentioned this issue Oct 14, 2020
@Shatur
Copy link
Author

Shatur commented Oct 14, 2020

Is it possible to add tagging support to vcpkgCommitId?

@lukka
Copy link
Owner

lukka commented Oct 14, 2020

@Shatur95 yes, it would be possible, no ETA though.

Instead of specifying a tag, or a commit id, the best practice is to use vcpkg as a submodule, so that the vcpkg used is exactly the same locally and on CI.

@lukka lukka added enhancement New feature or request help wanted Extra attention is needed labels Oct 14, 2020
@Shatur
Copy link
Author

Shatur commented Oct 14, 2020

Instead of specifying a tag, or a commit id, the best practice is to use vcpkg as a submodule, so that the vcpkg used is exactly the same locally and on CI.

Yes, I know, but I only need vcpkg on Windows, because on Linux I need to build a package with the versions of the libraries that are in the official repository. I would even okay with #35 or #44 to have latest possible versions of the libraries.

@lukka
Copy link
Owner

lukka commented Oct 17, 2021

Please take a look to run-vcpkg@v10 and see if suites your needs. Feel free to reopen this or a new ticket about any problem you may see.

@lukka lukka closed this as completed Oct 17, 2021
@Shatur
Copy link
Author

Shatur commented Oct 18, 2021

The description still stays that a tag name as a vcpkgCommitId is forbidden:

description: "Specify the full SHA-1 hash of a Git commit (not a branch name, nor a tag!) that establishes which version of vcpkg needs to be used. When using vcpkg as a Git submodule, this input is *not* needed as implicitly specified by the submodule."

@lukka
Copy link
Owner

lukka commented Oct 18, 2021

@Shatur right, tags are not supported. Reopening this item.

@lukka lukka reopened this Oct 18, 2021
@justusranvier
Copy link
Contributor

the best practice is to use vcpkg as a submodule

I guess you've never run into this issue before, but using vcpkg as a submodule is actually a terrible idea if you need to run vcpkg on windows images because of the MAX_PATH issue.

There are several packages in vcpkg whose build process runs right up to the limit and only work if you use C:\VCPKG. Any base path longer than that and you'll get hard to diagnose failures and confusing error messages that take a long time to track back to their root cause.

@lukka
Copy link
Owner

lukka commented Sep 24, 2022

@justusranvier hitting the MAX_PATH limitation is certainly a nightmare that forces unnecessary changes to workaround it.
The most important thing is to pin a specific version of vcpkg, so that the build reliably works in the same way for build executed by the devs and on CI build agent. Pinning using "vcpkg as a submodule" is one way, but certainly there can be others as long as they are stored in the source control. Which other approach would you suggest? A PR to improve the current best practices content is welcome.

There are also other questions as well that would help in narrowing down the problem and probably delineating a solution:

  • what is the extent of the problem of pinning the vcpkg version using a Git submodule? Is it a complete failure in any case, or only surfacing when some port is being used? This best practice is described in the vcpkg.io, and problem with it should be highlighted to the vcpkg project as an GH issue.
  • are you using a self hosted agent? I do not have a direct experience about this, but hopefully the Windows hosted agents are setup to not hit the MAX_PATH limitation.

@justusranvier
Copy link
Contributor

  • Is it a complete failure in any case, or only surfacing when some port is being used?

Not all ports will result in exceeding MAX_PATH, but qtdeclarative and its dependencies will unless the base path is very short (C:\VCPKG)

but hopefully the Windows hosted agents are setup to not hit the MAX_PATH limitation

From my experience the hosted runners do hit MAX_PATH. I have read there are registry hacks to turn off this limitation but they require a reboot so there's no way to use them in a hosted runner.

@lukka
Copy link
Owner

lukka commented Nov 5, 2023

Closing as more than one year of inactivity. Feel free to ask to reopen if needed.

@lukka lukka closed this as completed Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants