Skip to content

chore: use deprecated_at! macro for ubi backend deprecation#9049

Merged
jdx merged 7 commits intomainfrom
deprecate-ubi
Apr 11, 2026
Merged

chore: use deprecated_at! macro for ubi backend deprecation#9049
jdx merged 7 commits intomainfrom
deprecate-ubi

Conversation

@jdx
Copy link
Copy Markdown
Owner

@jdx jdx commented Apr 11, 2026

Summary

  • Switch the ubi backend deprecation from the always-on deprecated! macro to deprecated_at! with warn_at=2026.4.0 (immediate) and remove_at=2027.1.0 (12 months from original docs deprecation in Dec 2025)
  • Add deprecation warning to _list_remote_versions so users see it during version resolution, not just on install
  • Add <Badge type="danger" text="deprecated" /> to the ubi docs page
  • Mention github backend advantages (provenance, progress reports, fewer dependencies) in the deprecation notice
  • Document deprecation policy in CLAUDE.md

Test plan

  • cargo check passes
  • Pre-commit hooks pass

🤖 Generated with Claude Code

jdx and others added 4 commits April 11, 2026 14:04
Switch the ubi backend deprecation from the always-on `deprecated!` macro
to `deprecated_at!` with warn_at=2026.5.0 and remove_at=2027.5.0. Also
add the deprecation warning to `_list_remote_versions` so users see it
during version resolution, not just on install.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Per deprecation policy: warn at 2026.10.0 (6 months from now),
fail to compile at 2027.10.0 (12 months after warn).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The github backend has been available for a long time, so there's no
need to delay the deprecation warning. Set warn_at to 2026.4.0 (now)
while keeping remove_at at 2027.10.0.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add deprecation policy to CLAUDE.md. Set ubi removal to 2027.5.0
(12 months from now since the warning shows immediately).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@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 updates the ubi backend to use the deprecated_at! macro, specifying deprecation and removal dates. The review feedback suggests enhancing the deprecation message to include GitLab and HTTP alternatives, removing trailing periods for style consistency, and relocating the warning to a more central location to ensure it is consistently triggered.

Comment thread src/backend/ubi.rs
Comment on lines +43 to +48
deprecated_at!(
"2026.4.0",
"2027.5.0",
"ubi",
"The ubi backend is deprecated. Use the github backend instead (e.g., github:owner/repo)."
);
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.

medium

The deprecation message could be more comprehensive. Since ubi supports both GitHub and GitLab, as well as direct URLs, it's helpful to mention the alternative backends for those cases. Also, for consistency with other deprecation messages in the codebase (e.g., in github.rs and tool_version.rs), the trailing period should be omitted.

Additionally, placing the warning here means it won't be triggered for users who are offline or who only run the tool (e.g., via mise exec) without resolving versions. Moving this to UbiBackend::from_arg would ensure the warning is shown whenever the backend is loaded from configuration.

Suggested change
deprecated_at!(
"2026.4.0",
"2027.5.0",
"ubi",
"The ubi backend is deprecated. Use the github backend instead (e.g., github:owner/repo)."
);
deprecated_at!(
"2026.5.0",
"2027.5.0",
"ubi",
"The ubi backend is deprecated. Use the github or gitlab backend instead (e.g., github:owner/repo), or the http backend for direct URLs"
);
References
  1. Trailing periods in deprecation messages should be omitted for consistency with the repository style. (link)
  2. When dealing with legacy features or external tool compatibility, prefer clear documentation and deprecation over maintaining complex backward-compatibility logic.

Comment thread src/backend/ubi.rs
Comment on lines +202 to 207
deprecated_at!(
"2026.4.0",
"2027.5.0",
"ubi",
"The ubi backend is deprecated. Use the github backend instead (e.g., github:owner/repo)"
"The ubi backend is deprecated. Use the github backend instead (e.g., github:owner/repo)."
);
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.

medium

For consistency with the other deprecation warning and to better guide users, consider updating the message to include GitLab and direct URL alternatives, and remove the trailing period to match the project's style.

Suggested change
deprecated_at!(
"2026.4.0",
"2027.5.0",
"ubi",
"The ubi backend is deprecated. Use the github backend instead (e.g., github:owner/repo)"
"The ubi backend is deprecated. Use the github backend instead (e.g., github:owner/repo)."
);
deprecated_at!(
"2026.5.0",
"2027.5.0",
"ubi",
"The ubi backend is deprecated. Use the github or gitlab backend instead (e.g., github:owner/repo), or the http backend for direct URLs"
);
References
  1. Trailing periods in deprecation messages should be omitted for consistency with the repository style. (link)

Comment thread src/backend/ubi.rs
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 11, 2026

Greptile Summary

This PR formalizes the ubi backend deprecation: it adds a Deprecation Policy to CLAUDE.md, strengthens the docs warning with migration rationale, and replaces the always-on deprecated! macro with deprecated_at! in both _list_remote_versions and install_version_. The core logic of ubi resolution and installation is untouched.

Note from prior review threads (not yet addressed): both deprecated_at! calls use warn_at=\"2026.4.0\", which is behind the current crate version 2026.4.8, so the warning still fires unconditionally today — functionally identical to the old deprecated! macro.

Confidence Score: 4/5

Safe to merge functionally, but the intended grace period before the warning fires is not achieved due to the stale warn_at value flagged in prior threads.

The warn_at="2026.4.0" issue identified in prior review threads remains unresolved — with the current version at 2026.4.8 the deprecation warning fires immediately, matching the old always-on behaviour rather than the future-dated schedule the PR description implies. No new blocking issues were found in this pass.

src/backend/ubi.rs — both deprecated_at! calls still reference warn_at="2026.4.0"

Important Files Changed

Filename Overview
CLAUDE.md Adds a new Deprecation Policy section documenting the three-phase approach (docs immediately, warn_at after 6 months, remove_at 12 months after warn), with an escape hatch for long-available replacements.
docs/dev-tools/backends/ubi.md Adds to the title and expands the migration rationale (provenance verification, download progress, fewer dependencies). No issues found.
src/backend/ubi.rs Replaces always-on deprecated! with deprecated_at! in both _list_remote_versions and install_version_; warn_at="2026.4.0" is already behind the current version (2026.4.8), so the warning fires unconditionally today — flagged in prior review threads.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["User calls ubi backend\n(_list_remote_versions or install_version_)"] --> B{"mise V >= warn_at\n(2026.4.0)"}
    B -->|"Yes — fires immediately\n(current: 2026.4.8)"| C["Emit 'deprecated [ubi]' warning\n(deduped per process via DEPRECATED set)"]
    B -->|No| D["Skip warning"]
    C --> E["Proceed with operation"]
    D --> E
    E --> F{"mise V >= remove_at\n(2027.5.0)"}
    F -->|"Yes (debug builds only)"| G["debug_assert! fires\n'Code should be removed'"]
    F -->|No| H["Continue normally"]
Loading

Reviews (2): Last reviewed commit: "chore: set ubi remove_at to 2027.1.0" | Re-trigger Greptile

Comment thread src/backend/ubi.rs
Comment on lines +43 to +48
deprecated_at!(
"2026.4.0",
"2027.5.0",
"ubi",
"The ubi backend is deprecated. Use the github backend instead (e.g., github:owner/repo)."
);
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.

P1 warn_at is already past — warning fires immediately

Both deprecated_at! calls use warn_at = "2026.4.0", but the current crate version is already 2026.4.8. Because 2026.4.8 >= 2026.4.0, deprecated_at! fires on every invocation right now — functionally identical to the old always-on deprecated! macro the PR is replacing. The PR description explicitly says warn_at=2026.5.0 to give users a one-month grace period; the code should match that intent.

Suggested change
deprecated_at!(
"2026.4.0",
"2027.5.0",
"ubi",
"The ubi backend is deprecated. Use the github backend instead (e.g., github:owner/repo)."
);
deprecated_at!(
"2026.5.0",
"2027.10.0",
"ubi",
"The ubi backend is deprecated. Use the github backend instead (e.g., github:owner/repo)."
);

The same fix applies at line 202 in install_version_.

Fix in Claude Code

Comment thread src/backend/ubi.rs
Comment on lines +202 to 207
deprecated_at!(
"2026.4.0",
"2027.5.0",
"ubi",
"The ubi backend is deprecated. Use the github backend instead (e.g., github:owner/repo)"
"The ubi backend is deprecated. Use the github backend instead (e.g., github:owner/repo)."
);
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.

P1 Same stale warn_at in install_version_

Same issue as in _list_remote_versionswarn_at="2026.4.0" is already past 2026.4.8, so the warning fires unconditionally today.

Suggested change
deprecated_at!(
"2026.4.0",
"2027.5.0",
"ubi",
"The ubi backend is deprecated. Use the github backend instead (e.g., github:owner/repo)"
"The ubi backend is deprecated. Use the github backend instead (e.g., github:owner/repo)."
);
deprecated_at!(
"2026.5.0",
"2027.10.0",
"ubi",
"The ubi backend is deprecated. Use the github backend instead (e.g., github:owner/repo)."
);

Fix in Claude Code

jdx and others added 3 commits April 11, 2026 14:14
Highlight provenance verification, download progress reports, and fewer
dependencies as reasons to migrate from ubi to the github backend.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
12 months from the original docs deprecation in Dec 2025.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7b9aba1. Configure here.

Comment thread src/backend/ubi.rs
"2027.1.0",
"ubi",
"The ubi backend is deprecated. Use the github backend instead (e.g., github:owner/repo)."
);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Deprecation dates don't match PR description or policy

Medium Severity

The deprecated_at! calls use warn_at="2026.4.0" and remove_at="2027.1.0", but the PR description specifies warn_at=2026.5.0 and remove_at=2027.5.0. Additionally, the 9-month gap between warn and remove contradicts the 12-month policy defined in CLAUDE.md (also added in this PR) and the convention used by every other deprecated_at! call in the codebase (e.g., 2026.3.02027.3.0, 2026.7.02027.7.0). This causes the warning to appear one month early and the removal deadline to arrive four months sooner than intended.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7b9aba1. Configure here.

@jdx jdx changed the title chore(deps): deprecate ubi backend chore: use deprecated_at! macro for ubi backend deprecation Apr 11, 2026
@github-actions
Copy link
Copy Markdown

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.4.8 x -- echo 23.8 ± 0.3 23.3 27.9 1.00
mise x -- echo 24.3 ± 0.2 23.8 25.0 1.02 ± 0.02

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.4.8 env 23.3 ± 0.5 22.7 27.7 1.00
mise env 23.6 ± 0.6 23.0 33.6 1.01 ± 0.03

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.4.8 hook-env 24.0 ± 0.2 23.4 24.8 1.00
mise hook-env 24.4 ± 0.3 23.9 28.4 1.02 ± 0.01

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.4.8 ls 21.2 ± 0.2 20.7 22.0 1.00
mise ls 21.6 ± 0.2 21.1 22.5 1.02 ± 0.01

xtasks/test/perf

Command mise-2026.4.8 mise Variance
install (cached) 154ms 153ms +0%
ls (cached) 80ms 80ms +0%
bin-paths (cached) 84ms 84ms +0%
task-ls (cached) 813ms 784ms +3%

@jdx jdx merged commit f20b600 into main Apr 11, 2026
37 checks passed
@jdx jdx deleted the deprecate-ubi branch April 11, 2026 14:56
mise-en-dev added a commit that referenced this pull request Apr 11, 2026
### 🐛 Bug Fixes

- **(docs)** upgrade esbuild to 0.28.0 with es2022 build target by @jdx
in [#9047](#9047)
- **(env)** skip tools=true module hooks in dependency_env by @jdx in
[#9011](#9011)
- **(lockfile)** resolve SLSA provenance URLs deterministically for all
platforms by @cameronbrill in
[#8982](#8982)
- **(registry)** test of docuum in registry by @jylenhof in
[#8996](#8996)
- **(release)** publish extracted mise.exe alongside Windows zip by
@zeitlinger in [#8997](#8997)
- **(schema)** add missing config fields by @risu729 in
[#9044](#9044)
- **(task)** support sandbox fields in task templates by @risu729 in
[#9046](#9046)
- **(tasks)** respect env precedence for task config by @risu729 in
[#9039](#9039)
- prevent implicit enabling of `self_update` when rustls features are
enabled by @salim-b in [#9040](#9040)
- allow installing bun and others when downloads folder is on a
different mount by @bgeron in
[#9032](#9032)

### 📚 Documentation

- discourage direnv compatibility PRs and remove issue suggestions by
@jdx in
[ca78346](ca78346)
- tighten direnv compatibility language by @jdx in
[ab140c8](ab140c8)
- add Tera tip for unsupported version files by @risu729 in
[#9048](#9048)

### 📦️ Dependency Updates

- update ghcr.io/jdx/mise:deb docker digest to 49fa8a4 by @renovate[bot]
in [#8999](#8999)
- update ghcr.io/jdx/mise:copr docker digest to 61ba7b6 by
@renovate[bot] in [#8998](#8998)
- update ghcr.io/jdx/mise:copr docker digest to fa351ff by
@renovate[bot] in [#9002](#9002)
- update ghcr.io/jdx/mise:alpine docker digest to f3bb475 by
@renovate[bot] in [#9001](#9001)
- update ghcr.io/jdx/mise:rpm docker digest to d45af2d by @renovate[bot]
in [#9005](#9005)
- update ghcr.io/jdx/mise:deb docker digest to d7463ac by @renovate[bot]
in [#9004](#9004)
- update jdx/mise-action digest to 5228313 by @renovate[bot] in
[#9007](#9007)
- update rust docker digest to e8e2bb5 by @renovate[bot] in
[#9008](#9008)
- update taiki-e/install-action digest to 97a5807 by @renovate[bot] in
[#9010](#9010)
- update autofix-ci/action action to v1.3.3 by @renovate[bot] in
[#9015](#9015)
- update ubuntu:24.04 docker digest to 84e77de by @renovate[bot] in
[#9012](#9012)
- update actions/checkout action to v4.3.1 by @renovate[bot] in
[#9014](#9014)
- update ubuntu:26.04 docker digest to cc925e5 by @renovate[bot] in
[#9013](#9013)
- update rust crate tokio to v1.51.1 by @renovate[bot] in
[#9018](#9018)
- update rust crate zip to v8.5.1 by @renovate[bot] in
[#9019](#9019)
- update rust crate ctor to 0.9 by @renovate[bot] in
[#9024](#9024)
- update ubuntu docker tag to resolute-20260404 by @renovate[bot] in
[#9020](#9020)
- update dependency vitepress-plugin-tabs to ^0.8.0 by @renovate[bot] in
[#9023](#9023)
- update rust crate indexmap to v2.14.0 by @renovate[bot] in
[#9025](#9025)
- update rust crate nix to 0.31 by @renovate[bot] in
[#9030](#9030)
- update taiki-e/install-action digest to 7a4939c by @renovate[bot] in
[#9027](#9027)
- update dependency esbuild to v0.28.0 by @renovate[bot] in
[#9022](#9022)
- update rust crate rand to 0.10 by @renovate[bot] in
[#9031](#9031)
- update rust crate digest to 0.11.0 by @renovate[bot] in
[#9028](#9028)
- update rust crate confique to 0.4 by @renovate[bot] in
[#9026](#9026)
- update rust crate rattler to 0.40 by @renovate[bot] in
[#9034](#9034)
- lock file maintenance by @renovate[bot] in
[#8416](#8416)
- disable renovate for aws-config/aws-sdk-* crates by @jdx in
[#9052](#9052)
- update swatinem/rust-cache digest to e18b497 by @renovate[bot] in
[#9009](#9009)

### 📦 Registry

- remove broken tool tests by @jdx in
[#9017](#9017)
- update granted aqua backend repo by @risu729 in
[#9033](#9033)
- fix atlas-community test expected output by @jdx in
[#9054](#9054)

### Chore

- use deprecated_at! macro for ubi backend deprecation by @jdx in
[#9049](#9049)

### Security

- **(ci)** run test-tool inside Docker container by @jdx in
[#9055](#9055)
- **(ci)** avoid exposing MISE_GH_TOKEN to test-tool scripts by @jdx in
[#9053](#9053)

### New Contributors

- @bgeron made their first contribution in
[#9032](#9032)
- @salim-b made their first contribution in
[#9040](#9040)

## 📦 Aqua Registry Updates

#### Updated Packages (2)

-
[`cloudnative-pg/cloudnative-pg/kubectl-cnpg`](https://github.com/cloudnative-pg/cloudnative-pg/kubectl-cnpg)
- [`gleam-lang/gleam`](https://github.com/gleam-lang/gleam)
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.

1 participant