Skip to content

Update outputs formatting; Update core APIs#141

Merged
thelovekesh merged 54 commits intomainfrom
update/output-formatting
Jan 14, 2026
Merged

Update outputs formatting; Update core APIs#141
thelovekesh merged 54 commits intomainfrom
update/output-formatting

Conversation

@thelovekesh
Copy link
Collaborator

  • Add better output formatting
  • Replace go-validator with custom validator.
  • Fix archive reporting APIs
  • Add semaphore in installer to limit number of unpack instances
  • Add network concurrency to download manifest and tarballs concurrently. Also, added a cli flag to limit concurrency.
  • Add tarballs caching

@thelovekesh thelovekesh added the core changes made in cli core api label Jan 14, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @thelovekesh, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a suite of enhancements focused on improving the user experience, performance, and reliability of the WPM CLI. Key changes include a new, standardized output formatting system, a custom-built validation engine for wpm.json files, and a significantly overhauled package installer. The installer now leverages concurrency, tarball caching, and atomic operations to provide faster and more robust dependency management. Additionally, core API types have been refactored for better organization, and error reporting for dependency resolution has been made more informative.

Highlights

  • Enhanced Output Formatting: Introduced a new pkg/output package and integrated it across the CLI to provide standardized, colorized, and more readable output for various commands, including installation and publishing. This centralizes output logic and improves user experience.
  • Custom Validation Logic: Replaced the external go-playground/validator library with a custom validation package (pkg/pm/wpmjson/validator). This change provides more granular control over validation rules for wpm.json fields and offers structured error reporting.
  • Improved Installer Performance and Robustness: Significantly refactored the package installer to support network concurrency for fetching manifests and tarballs, implement tarball caching, and introduce a semaphore to limit concurrent unpack operations. This makes installations faster and more resilient.
  • Atomic Package Installation/Update: The installer now performs atomic directory replacements for packages, ensuring that updates or installations are less prone to corruption and can attempt rollbacks in case of failure. This includes handling cross-device moves and retrying file deletions.
  • Refactored Core API Types: Extracted common types (PackageType, Dependencies, etc.) into a new pkg/pm/wpmjson/types package and introduced a dedicated pkg/pm/wpmjson/manifest package for registry manifest definitions. This improves modularity and clarity of data structures.
  • Structured Dependency Resolution Errors: The dependency resolver now returns structured ResolutionError types, providing clearer and more actionable messages for version conflicts or downgrades, guiding users on how to resolve issues.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link

📦 wpm cli builds 📦

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a significant and impressive refactoring of core functionalities, including the installer, validator, and output handling. The changes greatly improve robustness, performance, and user experience. Key improvements include the introduction of tarball caching, atomic package updates via a backup-and-restore mechanism, concurrent downloads, and a custom validator for more precise error messages. The code structure is also much cleaner with better separation of concerns. I've identified a few critical issues related to error handling and nil pointer dereferences that should be addressed, but overall this is a high-quality contribution.

@thelovekesh thelovekesh merged commit 5a845ed into main Jan 14, 2026
15 checks passed
@thelovekesh thelovekesh deleted the update/output-formatting branch January 14, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core changes made in cli core api

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant