Deduplicate 'already installed' / HEAD message.#1683
Merged
BillyONeal merged 3 commits intomicrosoft:mainfrom May 13, 2025
Merged
Deduplicate 'already installed' / HEAD message.#1683BillyONeal merged 3 commits intomicrosoft:mainfrom
BillyONeal merged 3 commits intomicrosoft:mainfrom
Conversation
…eady installed' message, --head warning, and merging the 'green success' message into the total elapsed time part. Cherry picked from microsoft#1514
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR deduplicates console output for installed packages and refactors related message formatting to clearly separate --head warnings from normal output while merging the success message into the total elapsed time display.
- Introduces a new all_text() method in FormattedPlan to combine warning and normal texts.
- Renames InstallSummary::format() to format_results() and replaces the failed() method with a print_complete_message() for clearer failure reporting.
- Updates tests, message strings, and related pipelines to validate the improved output formatting.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/vcpkg/dependencies.cpp | Added all_text() and updated plan block usage for deduplicated messages. |
| src/vcpkg/commands.upgrade.cpp | Updated to use summary.format_results() and print_complete_message(). |
| src/vcpkg/commands.set-installed.cpp | Refactored lambda to update install_actions to already_installed actions. |
| src/vcpkg/commands.install.cpp | Renamed format(), adjusted summary failure handling and print messages. |
| src/vcpkg/commands.ci.cpp | Updated to use summary.format_results() for consistent output. |
| src/vcpkg-test/dependencies.cpp | Modified tests to validate the new all_text() output. |
| locales/messages.json | Updated messages to reflect changes in wording for installed packages. |
| include/vcpkg/dependencies.h | Updated structure with new members and all_text() declaration. |
| include/vcpkg/commands.install.h | Renamed format() and removed the failed() method in favor of new printing API. |
| include/vcpkg/base/message-data.inc.h | Revised message definitions for clearer already installed and elapsed time messaging. |
| azure-pipelines/end-to-end-tests-dir/build-test-ports.ps1 | Adapted test expectations for the updated --head message output. |
ras0219-msft
approved these changes
May 13, 2025
Co-authored-by: Robert Schumacher <[email protected]>
…e install actions.
ras0219-msft
approved these changes
May 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improve console output when installing packages by deduplicating 'already installed' message, --head warning, and merging the 'green success' message into the total elapsed time part.
Cherry picked from #1514
Normal:

--head: