Skip to content

Remove the 'upgrade' message.#1802

Merged
BillyONeal merged 4 commits intomicrosoft:mainfrom
BillyONeal:audit-maybe-upgrade
Oct 22, 2025
Merged

Remove the 'upgrade' message.#1802
BillyONeal merged 4 commits intomicrosoft:mainfrom
BillyONeal:audit-maybe-upgrade

Conversation

@BillyONeal
Copy link
Member

@BillyONeal BillyONeal commented Oct 7, 2025

The 'upgrade' message asks users to rerun bootstrap-vcpkg. We used to do this all over the place but have been slowly doing it less often. Unfortunately, even the places that were reasonable, were mostly inconsistent about applying it.

In particular, emitting the upgrade message for things that require git pull is incorrect. Ever emitting the message in Visual Studio or one-liner deployments was always bogus.

(The reason for this is because I'm context-izing vcpkg fetch and there are a lot of problematic upgrade cases in there)

Audit results:

  • strings.cpp:380: Wrong, parse failure is not a tool upgrade fix. (Note however the only callers where visualstudio.cpp which was questionably ok)
  • strings.cpp:396: Ditto
  • binaryparagraph.cpp:251: Both cases are about corrupted installation databases and both are wrong.
  • binaryparagraph.cpp:261: Ditto
  • commands.build.cpp:438: Probably correct, new vcpkg.exe may learn about new cpu architecture.
  • commands.build.cpp:467: Probably correct, new vcpkg.exe may learn about new VS.
  • commands.build.cpp:1045: Probably correct, new vcpkg may learn about new known architectures.
  • commands.build.cpp:2147: Wrong, corrupted installation database.
  • commands.edit.cpp:171: Wrong, nonexistent port won't be fixed by bootstrap.
  • commands.format-manifest.cpp:59: This is just a bug in vcpkg and probably shouldn't be localized in the first place. It's a parse failure so it's wrong.
  • commands.integrate.cpp:658: Plausible, new integrates may be learned by new vcpkg.exe.
  • commands.package-info.cpp:47: Plausible, new vcpkg may have new package-info formats. But we don't emit the message for other unknown command line arguments so why is this one special?
  • commands.remove.cpp:184: Wrong, upgrading vcpkg.exe won't make this not be manifest mode.
  • commands.update.cpp:62: Ditto
  • dependencies.cpp:299: Wrong, missing feature won't change by rebootstrap
  • dependencies.cpp:860: Ditto
  • registries.cpp:865: Wrong, missing git sha in the registry won't change by rebootstrap
  • statusparagraph.cpp:86: Wrong, corrupted installation database.
  • tools.cpp:854: Wrong, missing tool entry won't change by rebootstrap
  • tools.cpp:1053: Plausible, new vcpkg.exe may learn new ways to find a tool from the system
  • vcpkglib.cpp:201: Wrong, corrupted database.
  • vcpkgpaths.cpp:86: Wrong, parse error.
  • vcpkgpaths.cpp:195: Wrong, bogus git SHA.

Total: 6 correct/plausible, 16 wrong.

Related: microsoft/vcpkg#43309

The 'upgrade' message asks users to rerun bootstrap-vcpkg. We used to do this all over the place but have been slowly doing it less often. Unfortunately, even the places that were reasonable, were mostly inconsistent about applying it.

In particular, emitting the upgrade message for things that require `git pull` is *incorrect*. Ever emitting the message in Visual Studio or one-liner deployments was always bogus.

(The reason for this is because I'm context-izing `vcpkg fetch` and there are a lot of problematic upgrade cases in there)

Audit results:

* strings.cpp:380: Wrong, parse failure is not a tool upgrade fix. (Note however the only callers where visualstudio.cpp which was questionably ok)
* strings.cpp:396: Ditto
* binaryparagraph.cpp:251: Both cases are about corrupted installation databases and both are wrong.
* binaryparagraph.cpp:261: Ditto
* commands.build.cpp:438: Probably correct, new vcpkg.exe may learn about new cpu architecture.
* commands.build.cpp:467: Probably correct, new vcpkg.exe may learn about new VS.
* commands.build.cpp:1045: Probably correct, new vcpkg may learn about new known architectures.
* commands.build.cpp:2147: Wrong, corrupted installation database.
* commands.edit.cpp:171: Wrong, nonexistent port won't be fixed by bootstrap.
* commands.format-manifest.cpp:59: This is just a bug in vcpkg and *probably* shouldn't be localized in the first place. It's a parse failure so it's wrong.
* commands.integrate.cpp:658: Plausible, new integrates may be learned by new vcpkg.exe.
* commands.package-info.cpp:47: Plausible, new vcpkg may have new package-info formats. But we don't emit the message for other unknown command line arguments so why is this one special?
* commands.remove.cpp:184: Wrong, upgrading vcpkg.exe won't make this not be manifest mode.
* commands.update.cpp:62: Ditto
* dependencies.cpp:299: Wrong, missing feature won't change by rebootstrap
* dependencies.cpp:860: Ditto
* registries.cpp:865: Wrong, missing git sha in the registry won't change by rebootstrap
* statusparagraph.cpp:86: Wrong, corrupted installation database.
* tools.cpp:854: Wrong, missing tool entry won't change by rebootstrap
* tools.cpp:1053: Plausible, new vcpkg.exe may learn new ways to find a tool from the system
* vcpkglib.cpp:201: Wrong, corrupted database.
* vcpkgpaths.cpp:86: Wrong, parse error.
* vcpkgpaths.cpp:195: Wrong, bogus git SHA.

Total: 6 correct/plausible, 16 wrong.
Copy link
Collaborator

@ras0219-msft ras0219-msft left a comment

Choose a reason for hiding this comment

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

Approving direction, if not implementation.

Copy link
Member

@vicroms vicroms left a comment

Choose a reason for hiding this comment

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

LGTM

@BillyONeal BillyONeal merged commit e61ed1c into microsoft:main Oct 22, 2025
7 checks passed
@BillyONeal BillyONeal deleted the audit-maybe-upgrade branch October 22, 2025 20:45
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.

3 participants