Skip to content

Conversation

@mxcl
Copy link
Member

@mxcl mxcl commented Apr 1, 2025

Closes #1160

@mxcl mxcl force-pushed the latest branch 2 times, most recently from 94ef81e to 53011d4 Compare April 1, 2025 23:59
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 implements support for the "@latest" specifier in package requests by refactoring package resolution logic and updating related functionality.

  • Made the inventory module public and added semver type aliases in the library.
  • Updated the inventory functions to accept project names instead of full package requests and adjusted error messages accordingly.
  • Refactored CLI resolution logic to support "@latest", bumped Cargo.toml versions, and added a CI test for the new behavior.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/lib/src/lib.rs Made the inventory module public and introduced type aliases for semver.
crates/lib/src/inventory.rs Modified the ls function to receive a project name and updated error messaging.
crates/lib/Cargo.toml Bumped the library version from 0.5.0 to 0.6.0.
crates/cli/src/x.rs Updated the environment variable assignment for PKGX_VERSION.
crates/cli/src/resolve.rs Refactored package resolution logic using a new Pkgspec enum to support "@latest".
crates/cli/Cargo.toml Updated the CLI version from 2.5.0 to 2.6.0 and bumped the libpkgx dependency.
.github/workflows/ci.yml Added a CI test to validate the "@latest" support.

Copy link
Contributor

@jhheider jhheider left a comment

Choose a reason for hiding this comment

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

Mmm, discriminated unions.

@coveralls
Copy link

Coverage Status

coverage: 89.099%. first build
when pulling 6a6d511 on latest
into 8d288f0 on main.

@mxcl mxcl merged commit d1145c8 into main Apr 2, 2025
21 checks passed
@mxcl mxcl deleted the latest branch April 2, 2025 12:56
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.

I miss @latest

4 participants