Skip to content

Conversation

jdx
Copy link
Owner

@jdx jdx commented Jul 17, 2025

This reverts commit ad36539.

@Copilot Copilot AI review requested due to automatic review settings July 17, 2025 14:57
Copy link
Contributor

@Copilot 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 reverts commit ad36539, which previously improved warnings for packages without repo_owner and repo_name. The revert changes error handling in the aqua backend by removing error propagation improvements and reverting the warning message format.

  • Reverts error handling changes in the _list_remote_versions method
  • Removes package validation logic for assets and error messages
  • Changes error handling from bail! back to warn! for missing repository information
Comments suppressed due to low confidence (1)

src/backend/aqua.rs:63

  • The variable name 'v' is ambiguous and unclear. Consider using a more descriptive name like 'version' for better code readability.
        for (v, tag) in version_tags.iter() {

@@ -58,19 +58,15 @@ impl Backend for AquaBackend {
}

async fn _list_remote_versions(&self, _config: &Arc<Config>) -> Result<Vec<String>> {
let version_tags = self.get_version_tags().await;
let version_tags = self.get_version_tags().await?;
Copy link
Preview

Copilot AI Jul 17, 2025

Choose a reason for hiding this comment

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

The revert removes error handling that was previously added. The ? operator will propagate errors up the call stack, but the previous version had explicit error handling with a warning message. Consider whether silent error propagation is the intended behavior.

Suggested change
let version_tags = self.get_version_tags().await?;
let version_tags = match self.get_version_tags().await {
Ok(tags) => tags,
Err(e) => {
eprintln!("Warning: Failed to fetch version tags: {}", e);
return Ok(Vec::new());
}
};

Copilot uses AI. Check for mistakes.

"aqua package {} does not have repo_owner and/or repo_name.",
self.id
);
warn!("no aqua registry found for {}", self.ba());
Copy link
Preview

Copilot AI Jul 17, 2025

Choose a reason for hiding this comment

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

The reverted warning message 'no aqua registry found for {}' is less specific than the previous error message that explicitly mentioned missing 'repo_owner and/or repo_name'. This makes debugging more difficult for users.

Suggested change
warn!("no aqua registry found for {}", self.ba());
warn!(
"no aqua registry found for {}: missing {}",
self.ba(),
if pkg.repo_owner.is_empty() && pkg.repo_name.is_empty() {
"repo_owner and repo_name"
} else if pkg.repo_owner.is_empty() {
"repo_owner"
} else {
"repo_name"
}
);

Copilot uses AI. Check for mistakes.

@jdx
Copy link
Owner Author

jdx commented Jul 17, 2025

@risu729 this caused mise-versions to get a bunch of versions with a "v" prefix:

$ mise cache clear && MISE_USE_VERSIONS_HOST=0 cargo run ls-remote action-validator
0.1.0
v0.1.0
0.1.1
v0.1.1
0.1.2
v0.1.2
0.1.4
v0.1.4
0.2.0
v0.2.0
0.2.1
v0.2.1
0.3.0
v0.3.0
0.4.0
v0.4.0
0.5.0
v0.5.0
0.5.1
v0.5.1
0.5.2
v0.5.2
0.5.3
v0.5.3
0.5.4
v0.5.4
0.6.0
v0.6.0
0.7.1
v0.7.1

@jdx jdx enabled auto-merge (squash) July 17, 2025 14:58
@jdx
Copy link
Owner Author

jdx commented Jul 17, 2025

it's a weird bug I'm not sure is worth adding an e2e test around or not, I think we probably should since the "v" prefixing stuff has always caused issues. Maybe check to make sure all "action-validator" versions start with a digit?

If you look at the test-tools job in the latest release you can see this is failing on many tools

@jdx jdx merged commit 11ecdca into main Jul 17, 2025
17 of 18 checks passed
@jdx jdx deleted the revert-aqua branch July 17, 2025 15:05
Copy link

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.7.11 x -- echo 17.8 ± 0.2 17.4 20.7 1.00
mise x -- echo 17.9 ± 0.3 17.4 21.3 1.01 ± 0.02

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.7.11 env 17.2 ± 0.2 16.8 18.0 1.00
mise env 17.5 ± 0.6 16.8 26.8 1.02 ± 0.04

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.7.11 hook-env 17.0 ± 0.2 16.6 17.9 1.00
mise hook-env 17.1 ± 0.3 16.7 20.7 1.01 ± 0.02

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.7.11 ls 15.1 ± 0.2 14.7 16.4 1.00
mise ls 15.1 ± 0.2 14.7 16.1 1.00 ± 0.02

xtasks/test/perf

Command mise-2025.7.11 mise Variance
install (uncached) 761ms ⚠️ 1088ms -30%
install (cached) 125ms 124ms +0%
ls (uncached) 694ms 694ms +0%
ls (cached) 78ms 78ms +0%
bin-paths (uncached) 696ms ⚠️ 987ms -29%
bin-paths (cached) 64ms 66ms -3%
task-ls (uncached) 3158ms ⚠️ 3586ms -11%
task-ls (cached) 261ms 262ms +0%

⚠️ Warning: install uncached performance variance is -30%
⚠️ Warning: bin-paths uncached performance variance is -29%
⚠️ Warning: task-ls uncached performance variance is -11%

jdx pushed a commit that referenced this pull request Jul 17, 2025
### 🐛 Bug Fixes

- **(npm)** run bun in install_path instead of using --cwd flag of bun
by [@risu729](https://github.com/risu729) in
[#5656](#5656)
- **(nushell)** fix `get -i` deprecation by
[@JoaquinTrinanes](https://github.com/JoaquinTrinanes) in
[#5666](#5666)

### ◀️ Revert

- Revert "fix(aqua): improve warnings for packages without repo_owner
and repo_name " by [@jdx](https://github.com/jdx) in
[#5668](#5668)

### Chore

- update deps by [@risu729](https://github.com/risu729) in
[#5657](#5657)
- update usage by [@risu729](https://github.com/risu729) in
[#5661](#5661)

### New Contributors

- @JoaquinTrinanes made their first contribution in
[#5666](#5666)
@risu729
Copy link
Contributor

risu729 commented Jul 18, 2025

My apologies for the regression again.
I'll add a test, but I realized I don't understand about multiline strings in bash well, so I'll figure it out later.

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