Skip to content

fix(vfox): integrate parse_legacy_file into backend#6471

Merged
jdx merged 7 commits intojdx:mainfrom
malept:fix/vfox-backend-parse-legacy-file
Sep 28, 2025
Merged

fix(vfox): integrate parse_legacy_file into backend#6471
jdx merged 7 commits intojdx:mainfrom
malept:fix/vfox-backend-parse-legacy-file

Conversation

@malept
Copy link
Copy Markdown
Contributor

@malept malept commented Sep 28, 2025

Problem

When using a custom tool plugin, the ParseLegacyFile hook is not called when an idiomatic version file is used.

Steps to reproduce

Assumes that you're using a tool plugin written based off of the docs, where .foo-version is declared as in metadata.lua, as is the ParseLegacyFile lua hook.

mise.toml:

[alias]
foo = "/path/to/local/foo"

.foo-version:

1.2.3

Run:

mise install
  • Expected: foo@1.2.3 is installed
  • Actual: foo is not installed

Solution

Use the vfox crate's parse_legacy_file functionality in the VfoxBackend. The crate's functionality is async, so the corresponding functions in the Backend trait and its implementations needed to change to be async as well.


Note

Integrates vfox parse_legacy_file for idiomatic version files and converts idiomatic filename parsing to async across backends, config, and CLI.

  • Backends/API:
    • Make Backend methods async: idiomatic_filenames() and parse_idiomatic_file().
    • Update implementations across core plugins (node, python, ruby, go, java, rust, swift, deno, bun, zig) and asdf.
    • Vfox: VfoxBackend now fetches idiomatic filenames from vfox metadata and parses versions via vfox parse_legacy_file.
  • Vfox/Lua integration:
    • Add ctx.filename to Lua context; dummy hook validates .dummy-version and uses file.read.
    • Minor log prefix tweak: "[vfox] Getting metadata".
  • Config/CLI (async migration):
    • config_file::parse/parse_or_init, idiomatic detection, and IdiomaticVersionFile parsing are async; cascade updates to use, local, unuse, upgrade, prune, lock, and config generate.
    • Refactor config loading to async helpers (e.g., filename_is_idiomatic, async tests); adjust loops and error handling accordingly.

Written by Cursor Bugbot for commit 4094cf0. This will update automatically on new commits. Configure here.

@jdx
Copy link
Copy Markdown
Owner

jdx commented Sep 28, 2025

bugbot run

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.

✅ Bugbot reviewed your changes and found no bugs!


@jdx jdx enabled auto-merge (squash) September 28, 2025 22:13
@jdx jdx merged commit 01efa47 into jdx:main Sep 28, 2025
24 checks passed
@malept malept deleted the fix/vfox-backend-parse-legacy-file branch September 28, 2025 22:24
@jdx jdx mentioned this pull request Sep 28, 2025
jdx added a commit that referenced this pull request Sep 29, 2025
### 📦 Registry

- add ggshield by @TyceHerrman in
[#6435](#6435)
- add jaq by @TyceHerrman in
[#6434](#6434)

### 🚀 Features

- **(age)** support age encrypted env vars in mise.toml files by @jdx in
[#6463](#6463)

### 🐛 Bug Fixes

- **(vfox)** integrate `parse_legacy_file` into backend by @malept in
[#6471](#6471)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Bumps to 2025.9.24 with age‑encrypted env var support, registry
additions (ggshield, jaq, patterner), vfox fix, and lockfile/tooling
updates.
> 
> - **Release**
> - Bump version to `2025.9.24` across `Cargo.toml`, `Cargo.lock`,
`default.nix`, `packaging/rpm/mise.spec`, `README.md`, and shell
completions; update `CHANGELOG.md`.
> - **Features**
>   - Support age‑encrypted env vars in `mise.toml`.
> - **Registry**
> - Add `ggshield`, `jaq` entries; add `tailor-platform/patterner` in
`crates/aqua-registry/.../patterner/registry.yaml`.
> - **Bug Fixes**
>   - `(vfox)` integrate `parse_legacy_file` into backend.
> - **Dependencies/Tooling**
> - Update `mise.lock`: `usage-cli` → 2.3.2, `hk` → 1.15.7, `sops` →
3.11.0.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
0b0708b. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: mise-en-dev <release@mise.jdx.dev>
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