-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Re-bootstrap vcpkg in manifest mode if updated #27692
Conversation
We need a way to disable this. Where I worked we had to use a self compiled version of vcpkg because of #25521. If this is merged the version is replaced with the broken version distributed by Microsoft. So an option to disable this automatically update is welcomed. |
Unless your version is higher than the one from the bootstrap script which you probably always want. If you update So I also thought about providing an option to disable it but from the cases I thought of it was always like -> requires an update of |
same baseline issue as #27689 |
scripts/buildsystems/vcpkg.cmake
Outdated
ERROR_VARIABLE Z_VCPKG_MANIFEST_VERSION_LOGTEXT | ||
RESULT_VARIABLE Z_VCPKG_MANIFEST_VERSION_RESULT | ||
) | ||
string(REGEX MATCH "program version ([0-9][0-9][0-9][0-9]-[0-9]?[0-9]-[0-9]?[0-9])" z_vcpkg_ver_bin "${Z_VCPKG_MANIFEST_VERSION_LOGTEXT}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't do the right thing when localized :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Give me --version-only
cli. I never get why ms programs are always so verbose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also: will currently do the correct thing. Localization is in the future and a problem for someone else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Localization is not "in the future", this is broken with vcpkg-tool@main.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use the semi-standard --x-json
:
C:\vcpkg> ./vcpkg version --x-json
{
"version": "2022-10-17-3247920fbdd47d08f36cbd480addd9890d3c2435"
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that @ras0219-msft has laid out the appropriate course of action. @Neumann-A, please let us know if you would like to continue with @ras0219-ms suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One problem with --z-require-version
to keep in mind is that old versions will simply error out because they don't know the --z-require-version
switch. And you can't differentiate this error from a normal installation fails error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JavierMatosD I rather take the --x-json
approach than the new cmd line switch stuff. If the process invoke is so a big issue I could use a file(TIMESTAMP <filename> <variable> [<format>] [UTC])
(is available in CMake 3.7.2) of the bootstrap and vcpkg binary and observe changes to these files if necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use the semi-standard
--x-json
:C:\vcpkg> ./vcpkg version --x-json { "version": "2022-10-17-3247920fbdd47d08f36cbd480addd9890d3c2435" }
That doesn't exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One problem with
--z-require-version
to keep in mind is that old versions will simply error out because they don't know the--z-require-version
switch. And you can't differentiate this error from a normal installation fails error.
We could interpret failing to run that as more-or-less unconditionally too old. (For example with a specific command added for this purpose)
@JavierMatosD I disagree #27692 (comment) is not implementable for current users. You can add the mentioned functionallity to vcpkg-tool first and after a year switch the behavior. But currently there is no other way to implement and auto update mechanism. |
@JavierMatosD Please review this PR again. Thanks. |
We'll take a look at this one more time but I don't think the read on the situation has changed. |
@ras0219-msft @dan-shaw @JavierMatosD and I discussed this today. Let's break the problem trying to be solved here apart.
We observe that solving (2) can already be achieved without building any new tech by bumping the Line 87 in a548ef5
This does mean that if we actually build something the UX is slightly worse than the solution proposed here because the result will be an error message "please go update vcpkg" rather than updating it for them, which is case (1) above. Regarding case (1), we have a host of bad tradeoffs:
Speaking personally, I think that leaves us with at least 4 choices:
Stack ranking our preferences:
|
so you want 4 which requires a tool PR. Got it. |
@Neumann-A If you are ready to review, please active this PR. |
As stated in #27692 (comment) the teams wants 4 so unless that has been implemented in the tool there is currently no way forward for this PR which is why this PR stays in Draft mode. |
Closing this PR since it seems that no progress is being made. Please ping us to reopen if work is still being done. |
Solves: People being annoyed manually deleting
vcpkg${CMAKE_EXECUTABLE_SUFFIX}
Solves: Issues due to
vcpkg_minimum_required
since you will always use latest vcpkg now!closes #27635