Skip to content

Revert "fix(aqua): align version resolution logic in list_bin_paths"#5574

Merged
jdx merged 1 commit into
mainfrom
revert-5562-refactor-aqua-bin-paths
Jul 11, 2025
Merged

Revert "fix(aqua): align version resolution logic in list_bin_paths"#5574
jdx merged 1 commit into
mainfrom
revert-5562-refactor-aqua-bin-paths

Revert "fix(aqua): align version resolution logic in list_bin_paths (…

b3f617a
Select commit
Loading
Failed to load commit list.
Cursor / Cursor BugBot completed Jul 11, 2025 in 3m 29s

BugBot Review

BugBot completed review and found 2 potential issues

Request ID: serverGenReqId_e903b47c-f8b4-47e9-923f-eee12b5f0765

Details

Bug: Version Mismatch Causes Installation Failures

The srcs method, used during installation and by list_bin_paths, now incorrectly uses the original ToolVersion (tv) for determining source file paths. This is inconsistent with the complex version resolution (including tag lookup, v-prefixing, and package-specific prefixes) performed in install_version_ to determine the actual downloaded version. As a result, srcs may look for files using an incorrect version string, leading to failed symlinks during installation or list_bin_paths failing to locate installed binaries.

src/backend/aqua.rs#L710-L711

mise/src/backend/aqua.rs

Lines 710 to 711 in b3f617a

for (src, dst) in self.srcs(pkg, tv)? {

src/backend/aqua.rs#L147-L153

mise/src/backend/aqua.rs

Lines 147 to 153 in b3f617a

.get_or_try_init_async(async || {
// TODO: align this logic with the one in `install_version_`
let pkg = AQUA_REGISTRY
.package_with_version(&self.id, &[&tv.version])
.await?;
let srcs = self.srcs(&pkg, tv)?;

src/backend/aqua.rs#L729-L737

mise/src/backend/aqua.rs

Lines 729 to 737 in b3f617a

.map(|f| {
let srcs = if let Some(prefix) = &pkg.version_prefix {
vec![f.src(pkg, &format!("{}{}", prefix, tv.version))?]
} else {
vec![
f.src(pkg, &tv.version)?,
f.src(pkg, &format!("v{}", tv.version))?,
]
};

Fix in CursorFix in Web


Bug: Package Resolution Mismatch Causes Incorrect Binary Paths

The list_bin_paths method uses a simplified package resolution, only attempting to match the raw tool version. This contrasts with install_version_, which employs a more complex resolution logic that accounts for version tags, v-prefixes, and package-specific version prefixes. This discrepancy can cause list_bin_paths to resolve to a different package configuration than what was actually installed, resulting in incorrect binary path calculations or a failure to locate installed binaries.

src/backend/aqua.rs#L146-L153

mise/src/backend/aqua.rs

Lines 146 to 153 in b3f617a

let paths = cache
.get_or_try_init_async(async || {
// TODO: align this logic with the one in `install_version_`
let pkg = AQUA_REGISTRY
.package_with_version(&self.id, &[&tv.version])
.await?;
let srcs = self.srcs(&pkg, tv)?;

Fix in CursorFix in Web


BugBot free trial expires on July 22, 2025
You have used $0.00 of your $50.00 spend limit so far. Manage your spend limit in the Cursor dashboard.

Was this report helpful? Give feedback by reacting with 👍 or 👎