Skip to content

chore(release): sync aqua-registry dependency sources#9776

Merged
jdx merged 1 commit into
jdx:mainfrom
risu729:fix/release-plz-aqua-build-dep
May 11, 2026
Merged

chore(release): sync aqua-registry dependency sources#9776
jdx merged 1 commit into
jdx:mainfrom
risu729:fix/release-plz-aqua-build-dep

Conversation

@risu729

@risu729 risu729 commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix xtasks/release-plz so aqua-registry is rewritten in both [dependencies] and [build-dependencies] after the subcrate is published.
  • Avoid Cargo's mixed-source manifest error during release publishing by removing both local path entries before re-adding the published crates.io version.

Root Cause

The release-plz job for chore: release 2026.5.6 (#9764) failed at https://github.com/jdx/mise/actions/runs/25666525627/job/75340319171 after publishing aqua-registry v2026.5.5.

The failing step was:

+ cargo add aqua-registry@2026.5.5
error: failed to parse manifest at `/home/runner/work/mise/mise/Cargo.toml`

Caused by:
  Dependency 'aqua-registry' has different source paths depending on the build target. Each dependency must have a single canonical source path irrespective of build target.

PR #9535 introduced the new baked aqua registry pipeline. As part of that change, the root mise crate now depends on aqua-registry at runtime and also in build.rs, so Cargo.toml has aqua-registry = { path = "crates/aqua-registry" } in both [dependencies] and [build-dependencies].

The release script already handled publishing the subcrate, but it only ran cargo add aqua-registry@$AQUA_REGISTRY_VERSION for the normal dependency. That made the normal dependency point to crates.io while the build dependency still pointed at the local workspace path, and Cargo rejects that mixed source state before the release can continue.

Test Plan

  • bash -n xtasks/release-plz
  • mise run lint-fix
  • Manually verified the dependency rewrite sequence: cargo rm aqua-registry, cargo rm --build aqua-registry, cargo add aqua-registry@2026.5.5, cargo add --build aqua-registry@2026.5.5, then restored the manifest.

This PR body was generated by an AI coding assistant.

Made with Cursor

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

Copy link
Copy Markdown
Contributor

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 helper function use_published_aqua_registry in the xtasks/release-plz script to streamline the process of updating the aqua-registry dependency. The function handles removing and re-adding the dependency for both standard and build configurations. Feedback was provided to improve the robustness of the script by allowing the cargo rm commands to fail gracefully, ensuring the script continues even if the dependency is not currently present.

Comment thread xtasks/release-plz
@risu729 risu729 marked this pull request as ready for review May 11, 2026 14:29
@greptile-apps

greptile-apps Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a regression in the release pipeline where cargo publish for the main mise crate would abort with a mixed-source manifest error after publishing aqua-registry. The root cause is that aqua-registry appears in both [dependencies] and [build-dependencies] in Cargo.toml (added by PR #9535), but the release script was only updating the normal dependency to point to crates.io while leaving the build dependency still pointing at the local path.

  • Adds a use_published_aqua_registry helper that removes both the [dependencies] and [build-dependencies] local-path entries via cargo rm / cargo rm --build, then re-adds both using the freshly published crates.io version.
  • Replaces the bare cargo add \"aqua-registry@$AQUA_REGISTRY_VERSION\" call (which only patched [dependencies]) with the new helper.

Confidence Score: 4/5

The fix is correct and directly addresses the documented CI failure — safe to merge.

The change is minimal and well-scoped: it removes both local-path references and re-adds the crates.io version for both [dependencies] and [build-dependencies], which exactly matches how Cargo.toml is currently structured. The only open question is whether cargo rm --build aqua-registry would break the release if aqua-registry is ever dropped from [build-dependencies] in the future, but that is not a concern for the current state of the codebase.

No files require special attention beyond xtasks/release-plz.

Important Files Changed

Filename Overview
xtasks/release-plz Adds use_published_aqua_registry helper to remove both [dependencies] and [build-dependencies] path entries before re-adding the crates.io version, fixing the mixed-source manifest error during release. The cargo rm --build call will fail with set -e active if aqua-registry is ever removed from [build-dependencies].

Reviews (1): Last reviewed commit: "chore(release): sync aqua-registry depen..." | Re-trigger Greptile

Comment thread xtasks/release-plz
local version="$1"

cargo rm aqua-registry
cargo rm --build aqua-registry

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Fragile assumption about build-dependency presence

With set -euxo pipefail active, cargo rm --build aqua-registry will abort the entire release script if aqua-registry is ever removed from [build-dependencies] (e.g., after a future refactor). The function assumes both entries always co-exist with no guard or recovery path. Consider adding || true or a pre-flight check if you want the function to be resilient to that scenario.

@jdx jdx merged commit afff7c8 into jdx:main May 11, 2026
34 checks passed
@risu729 risu729 deleted the fix/release-plz-aqua-build-dep branch May 11, 2026 15:28
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