Skip to content

Conversation

@BillyONeal
Copy link
Member

@BillyONeal BillyONeal commented May 13, 2025

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:
before and after comparison normal

--head:
before and after comparison with --head

…eady installed' message, --head warning, and merging the 'green success' message into the total elapsed time part.

Cherry picked from microsoft#1514
@ras0219-msft ras0219-msft requested a review from Copilot May 13, 2025 17:27
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@BillyONeal BillyONeal requested a review from ras0219-msft May 13, 2025 20:23
@BillyONeal BillyONeal enabled auto-merge (squash) May 13, 2025 20:24
@BillyONeal BillyONeal merged commit 20d0806 into microsoft:main May 13, 2025
7 checks passed
@BillyONeal BillyONeal deleted the deduplicate-already-installed branch May 13, 2025 22:00
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.

2 participants