From 474416f53901506169ea294355b2d58cdfa21409 Mon Sep 17 00:00:00 2001 From: jdx <216188+jdx@users.noreply.github.com> Date: Wed, 13 Nov 2024 20:21:34 -0600 Subject: [PATCH] feat: added more aqua tools (#3008) --- docs/configuration.md | 3 ++ docs/registry.md | 41 +++++++++---------- e2e/tools/test_tools_alias | 5 ++- registry.toml | 41 +++++++++---------- src/backend/mod.rs | 14 +++++-- src/cli/args/backend_arg.rs | 8 ++-- src/config/config_file/mise_toml.rs | 14 +++---- ...fig_file__mise_toml__tests__fixture-4.snap | 2 +- ...fig_file__mise_toml__tests__fixture-5.snap | 2 +- ...ile__mise_toml__tests__remove_alias-4.snap | 2 +- ..._file__mise_toml__tests__remove_alias.snap | 2 +- ...fig_file__mise_toml__tests__set_alias.snap | 4 +- src/config/mod.rs | 21 +++++++--- .../snapshots/mise__config__tests__load.snap | 2 +- 14 files changed, 90 insertions(+), 71 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index e200fd23a7..03d72af533 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -45,6 +45,9 @@ node = ['16', 'prefix:20', 'ref:master', 'path:~/.nodes/14'] python = 'https://github.com/asdf-community/asdf-python' [alias.node.versions] # project-local aliases +# use vfox:version-fox/vfox-nodejs when running `mise i node@backend` +backend = "vfox:version-fox/vfox-nodejs" +# install node-20.x when running `mise i node@my_custom_node` my_custom_node = '20' [tasks.build] diff --git a/docs/registry.md b/docs/registry.md index 30128b6df7..d377861b70 100644 --- a/docs/registry.md +++ b/docs/registry.md @@ -70,8 +70,7 @@ editLink: false | bbr-s3-config-validator | [asdf:vmware-tanzu/tanzu-plug-in-for-asdf](https://github.com/vmware-tanzu/tanzu-plug-in-for-asdf) | | benthos | [asdf:benthosdev/benthos-asdf](https://github.com/benthosdev/benthos-asdf) | | bfs | [asdf:virtualroot/asdf-bfs](https://github.com/virtualroot/asdf-bfs) | -| bin | [asdf:yozachar/asdf-bin](https://github.com/yozachar/asdf-bin) | -| binnacle | [asdf:Traackr/asdf-binnacle](https://github.com/Traackr/asdf-binnacle) | +| binnacle | [aqua:Traackr/binnacle](https://github.com/Traackr/binnacle) [asdf:Traackr/asdf-binnacle](https://github.com/Traackr/asdf-binnacle) | | bitwarden | [asdf:vixus0/asdf-bitwarden](https://github.com/vixus0/asdf-bitwarden) | | bitwarden-secrets-manager | [asdf:asdf-community/asdf-bitwarden-secrets-manager](https://github.com/asdf-community/asdf-bitwarden-secrets-manager) | | bombardier | [asdf:NeoHsu/asdf-bombardier](https://github.com/NeoHsu/asdf-bombardier) | @@ -88,7 +87,7 @@ editLink: false | bun | [core:bun](https://mise.jdx.dev/lang/bun.html) | | bundler | [asdf:jonathanmorley/asdf-bundler](https://github.com/jonathanmorley/asdf-bundler) | | cabal | [asdf:sestrella/asdf-ghcup](https://github.com/sestrella/asdf-ghcup) | -| caddy | [asdf:salasrod/asdf-caddy](https://github.com/salasrod/asdf-caddy) | +| caddy | [aqua:caddyserver/caddy](https://github.com/caddyserver/caddy) [asdf:salasrod/asdf-caddy](https://github.com/salasrod/asdf-caddy) | | calendarsync | [asdf:FeryET/asdf-calendarsync](https://github.com/FeryET/asdf-calendarsync) | | calicoctl | [asdf:TheCubicleJockey/asdf-calicoctl](https://github.com/TheCubicleJockey/asdf-calicoctl) | | camunda-modeler | [asdf:barmac/asdf-camunda-modeler](https://github.com/barmac/asdf-camunda-modeler) | @@ -103,7 +102,7 @@ editLink: false | cfssl | [asdf:mathew-fleisch/asdf-cfssl](https://github.com/mathew-fleisch/asdf-cfssl) | | chamber | [ubi:segmentio/chamber](https://github.com/segmentio/chamber) [asdf:mintel/asdf-chamber](https://github.com/mintel/asdf-chamber) | | changie | [ubi:miniscruff/changie](https://github.com/miniscruff/changie) [asdf:pdemagny/asdf-changie](https://github.com/pdemagny/asdf-changie) | -| cheat | [asdf:jmoratilla/asdf-cheat-plugin](https://github.com/jmoratilla/asdf-cheat-plugin) | +| cheat | [aqua:cheat/cheat](https://github.com/cheat/cheat) [asdf:jmoratilla/asdf-cheat-plugin](https://github.com/jmoratilla/asdf-cheat-plugin) | | checkov | [asdf:bosmak/asdf-checkov](https://github.com/bosmak/asdf-checkov) | | chezmoi | [ubi:twpayne/chezmoi](https://github.com/twpayne/chezmoi) [asdf:joke/asdf-chezmoi](https://github.com/joke/asdf-chezmoi) | | chezscheme | [asdf:asdf-community/asdf-chezscheme](https://github.com/asdf-community/asdf-chezscheme) | @@ -134,13 +133,13 @@ editLink: false | cocoapods | [asdf:ronnnnn/asdf-cocoapods](https://github.com/ronnnnn/asdf-cocoapods) | | codefresh | [asdf:gurukulkarni/asdf-codefresh](https://github.com/gurukulkarni/asdf-codefresh) | | codeql | [asdf:bored-engineer/asdf-codeql](https://github.com/bored-engineer/asdf-codeql) | -| coder | [asdf:mise-plugins/asdf-coder](https://github.com/mise-plugins/asdf-coder) | +| coder | [aqua:coder/coder](https://github.com/coder/coder) [asdf:mise-plugins/asdf-coder](https://github.com/mise-plugins/asdf-coder) | | colima | [ubi:abiosoft/colima](https://github.com/abiosoft/colima) [asdf:CrouchingMuppet/asdf-colima](https://github.com/CrouchingMuppet/asdf-colima) | | conan | [asdf:amrox/asdf-pyapp](https://github.com/amrox/asdf-pyapp) | | concourse | [asdf:mattysweeps/asdf-concourse](https://github.com/mattysweeps/asdf-concourse) | | conduit | [asdf:gmcabrita/asdf-conduit](https://github.com/gmcabrita/asdf-conduit) | | conform | [asdf:skyzyx/asdf-conform](https://github.com/skyzyx/asdf-conform) | -| conftest | [asdf:looztra/asdf-conftest](https://github.com/looztra/asdf-conftest) | +| conftest | [aqua:open-policy-agent/conftest](https://github.com/open-policy-agent/conftest) [asdf:looztra/asdf-conftest](https://github.com/looztra/asdf-conftest) | | consul | [asdf:asdf-community/asdf-hashicorp](https://github.com/asdf-community/asdf-hashicorp) | | container-diff | [asdf:cgroschupp/asdf-container-diff](https://github.com/cgroschupp/asdf-container-diff) | | container-structure-test | [asdf:FeryET/asdf-container-structure-test](https://github.com/FeryET/asdf-container-structure-test) | @@ -153,21 +152,21 @@ editLink: false | crane | [asdf:dmpe/asdf-crane](https://github.com/dmpe/asdf-crane) | | crc | [asdf:sqtran/asdf-crc](https://github.com/sqtran/asdf-crc) | | credhub | [asdf:vmware-tanzu/tanzu-plug-in-for-asdf](https://github.com/vmware-tanzu/tanzu-plug-in-for-asdf) | -| crictl | [asdf:FairwindsOps/asdf-crictl](https://github.com/FairwindsOps/asdf-crictl) | +| crictl | [aqua:kubernetes-sigs/cri-tools/crictl](https://github.com/kubernetes-sigs/cri-tools/crictl) [asdf:FairwindsOps/asdf-crictl](https://github.com/FairwindsOps/asdf-crictl) | | crossplane-cli | [asdf:joke/asdf-crossplane-cli](https://github.com/joke/asdf-crossplane-cli) | | crystal | [asdf:asdf-community/asdf-crystal](https://github.com/asdf-community/asdf-crystal) [vfox:yanecc/vfox-crystal](https://github.com/yanecc/vfox-crystal) | | ctlptl | [asdf:ezcater/asdf-ctlptl](https://github.com/ezcater/asdf-ctlptl) | | ctop | [ubi:bcicen/ctop](https://github.com/bcicen/ctop) [asdf:NeoHsu/asdf-ctop](https://github.com/NeoHsu/asdf-ctop) | -| cue | [asdf:asdf-community/asdf-cue](https://github.com/asdf-community/asdf-cue) | +| cue | [aqua:cue-lang/cue](https://github.com/cue-lang/cue) [asdf:asdf-community/asdf-cue](https://github.com/asdf-community/asdf-cue) | | cyclonedx | [asdf:xeedio/asdf-cyclonedx](https://github.com/xeedio/asdf-cyclonedx) | -| dagger | [asdf:virtualstaticvoid/asdf-dagger](https://github.com/virtualstaticvoid/asdf-dagger) | +| dagger | [aqua:dagger/dagger](https://github.com/dagger/dagger) [asdf:virtualstaticvoid/asdf-dagger](https://github.com/virtualstaticvoid/asdf-dagger) | | danger-js | [asdf:MontakOleg/asdf-danger-js](https://github.com/MontakOleg/asdf-danger-js) | | dapr | [asdf:asdf-community/asdf-dapr-cli](https://github.com/asdf-community/asdf-dapr-cli) | | dart | [asdf:PatOConnor43/asdf-dart](https://github.com/PatOConnor43/asdf-dart) [vfox:version-fox/vfox-dart](https://github.com/version-fox/vfox-dart) | -| dasel | [asdf:asdf-community/asdf-dasel](https://github.com/asdf-community/asdf-dasel) | +| dasel | [aqua:TomWright/dasel](https://github.com/TomWright/dasel) [asdf:asdf-community/asdf-dasel](https://github.com/asdf-community/asdf-dasel) | | datree | [asdf:lukeab/asdf-datree](https://github.com/lukeab/asdf-datree) | | daytona | [asdf:CrouchingMuppet/asdf-daytona](https://github.com/CrouchingMuppet/asdf-daytona) | -| dbmate | [asdf:juusujanar/asdf-dbmate](https://github.com/juusujanar/asdf-dbmate) | +| dbmate | [aqua:amacneil/dbmate](https://github.com/amacneil/dbmate) [asdf:juusujanar/asdf-dbmate](https://github.com/juusujanar/asdf-dbmate) | | deck | [asdf:nutellinoit/asdf-deck](https://github.com/nutellinoit/asdf-deck) | | delta | [ubi:dandavison/delta](https://github.com/dandavison/delta) [asdf:andweeb/asdf-delta](https://github.com/andweeb/asdf-delta) | | deno | [core:deno](https://mise.jdx.dev/lang/deno.html) [vfox:version-fox/vfox-deno](https://github.com/version-fox/vfox-deno) | @@ -175,7 +174,7 @@ editLink: false | dep | [asdf:paxosglobal/asdf-dep](https://github.com/paxosglobal/asdf-dep) | | depot | [asdf:depot/asdf-depot](https://github.com/depot/asdf-depot) | | desk | [asdf:endorama/asdf-desk](https://github.com/endorama/asdf-desk) | -| devspace | [asdf:NeoHsu/asdf-devspace](https://github.com/NeoHsu/asdf-devspace) | +| devspace | [aqua:devspace-sh/devspace](https://github.com/devspace-sh/devspace) [asdf:NeoHsu/asdf-devspace](https://github.com/NeoHsu/asdf-devspace) | | dhall | [asdf:aaaaninja/asdf-dhall](https://github.com/aaaaninja/asdf-dhall) | | difftastic | [ubi:wilfred/difftastic](https://github.com/wilfred/difftastic) [asdf:volf52/asdf-difftastic](https://github.com/volf52/asdf-difftastic) | | digdag | [asdf:jtakakura/asdf-digdag](https://github.com/jtakakura/asdf-digdag) | @@ -185,7 +184,7 @@ editLink: false | dmd | [asdf:sylph01/asdf-dmd](https://github.com/sylph01/asdf-dmd) | | docker-compose-v1 | [asdf:yilas/asdf-docker-compose-v1](https://github.com/yilas/asdf-docker-compose-v1) | | docker-slim | [asdf:xataz/asdf-docker-slim](https://github.com/xataz/asdf-docker-slim) | -| dockle | [asdf:mathew-fleisch/asdf-dockle](https://github.com/mathew-fleisch/asdf-dockle) | +| dockle | [aqua:goodwithtech/dockle](https://github.com/goodwithtech/dockle) [asdf:mathew-fleisch/asdf-dockle](https://github.com/mathew-fleisch/asdf-dockle) | | doctl | [ubi:digitalocean/doctl](https://github.com/digitalocean/doctl) [asdf:maristgeek/asdf-doctl](https://github.com/maristgeek/asdf-doctl) | | doctoolchain | [asdf:joschi/asdf-doctoolchain](https://github.com/joschi/asdf-doctoolchain) | | docuum | [ubi:stepchowfun/docuum](https://github.com/stepchowfun/docuum) [cargo:docuum](https://crates.io/crates/docuum) [asdf:bradym/asdf-docuum](https://github.com/bradym/asdf-docuum) | @@ -195,8 +194,8 @@ editLink: false | dotnet | [asdf:hensou/asdf-dotnet](https://github.com/hensou/asdf-dotnet) [vfox:version-fox/vfox-dotnet](https://github.com/version-fox/vfox-dotnet) | | dotnet-core | [asdf:emersonsoares/asdf-dotnet-core](https://github.com/emersonsoares/asdf-dotnet-core) | | dotty | [asdf:asdf-community/asdf-dotty](https://github.com/asdf-community/asdf-dotty) | -| dprint | [asdf:asdf-community/asdf-dprint](https://github.com/asdf-community/asdf-dprint) | -| draft | [asdf:kristoflemmens/asdf-draft](https://github.com/kristoflemmens/asdf-draft) | +| dprint | [aqua:dprint/dprint](https://github.com/dprint/dprint) [asdf:asdf-community/asdf-dprint](https://github.com/asdf-community/asdf-dprint) | +| draft | [aqua:Azure/draft](https://github.com/Azure/draft) [asdf:kristoflemmens/asdf-draft](https://github.com/kristoflemmens/asdf-draft) | | driftctl | [asdf:nlamirault/asdf-driftctl](https://github.com/nlamirault/asdf-driftctl) | | drone | [ubi:harness/drone-cli](https://github.com/harness/drone-cli) [asdf:virtualstaticvoid/asdf-drone](https://github.com/virtualstaticvoid/asdf-drone) | | dt | [asdf:so-dang-cool/asdf-dt](https://github.com/so-dang-cool/asdf-dt) | @@ -206,7 +205,7 @@ editLink: false | dvc | [asdf:fwfurtado/asdf-dvc](https://github.com/fwfurtado/asdf-dvc) | | dyff | [asdf:https://gitlab.com/wt0f/asdf-dyff](https://gitlab.com/wt0f/asdf-dyff) | | dynatrace-monaco | [asdf:nsaputro/asdf-monaco](https://github.com/nsaputro/asdf-monaco) | -| earthly | [asdf:YR-ZR0/asdf-earthly](https://github.com/YR-ZR0/asdf-earthly) | +| earthly | [aqua:earthly/earthly](https://github.com/earthly/earthly) [asdf:YR-ZR0/asdf-earthly](https://github.com/YR-ZR0/asdf-earthly) | | ecspresso | [asdf:kayac/asdf-ecspresso](https://github.com/kayac/asdf-ecspresso) | | editorconfig-checker | [asdf:gabitchov/asdf-editorconfig-checker](https://github.com/gabitchov/asdf-editorconfig-checker) | | ejson | [asdf:cipherstash/asdf-ejson](https://github.com/cipherstash/asdf-ejson) | @@ -225,12 +224,12 @@ editLink: false | esc | [asdf:fxsalazar/asdf-esc](https://github.com/fxsalazar/asdf-esc) | | esy | [asdf:asdf-community/asdf-esy](https://github.com/asdf-community/asdf-esy) | | etcd | [asdf:particledecay/asdf-etcd](https://github.com/particledecay/asdf-etcd) [vfox:version-fox/vfox-etcd](https://github.com/version-fox/vfox-etcd) | -| evans | [asdf:goki90210/asdf-evans](https://github.com/goki90210/asdf-evans) | +| evans | [aqua:ktr0731/evans](https://github.com/ktr0731/evans) [asdf:goki90210/asdf-evans](https://github.com/goki90210/asdf-evans) | | eza | [asdf:lwiechec/asdf-eza](https://github.com/lwiechec/asdf-eza) | | fd | [ubi:sharkdp/fd](https://github.com/sharkdp/fd) [asdf:https://gitlab.com/wt0f/asdf-fd](https://gitlab.com/wt0f/asdf-fd) | | ffmpeg | [asdf:acj/asdf-ffmpeg](https://github.com/acj/asdf-ffmpeg) | | figma-export | [asdf:younke/asdf-figma-export](https://github.com/younke/asdf-figma-export) | -| fillin | [asdf:ouest/asdf-fillin](https://github.com/ouest/asdf-fillin) | +| fillin | [aqua:itchyny/fillin](https://github.com/itchyny/fillin) [asdf:ouest/asdf-fillin](https://github.com/ouest/asdf-fillin) | | firebase | [asdf:jthegedus/asdf-firebase](https://github.com/jthegedus/asdf-firebase) | | fission | [asdf:virtualstaticvoid/asdf-fission](https://github.com/virtualstaticvoid/asdf-fission) | | flamingo | [asdf:log2/asdf-flamingo](https://github.com/log2/asdf-flamingo) | @@ -258,10 +257,10 @@ editLink: false | ghc | [asdf:sestrella/asdf-ghcup](https://github.com/sestrella/asdf-ghcup) | | ghidra | [asdf:Honeypot95/asdf-ghidra](https://github.com/Honeypot95/asdf-ghidra) | | ghorg | [asdf:gbloquel/asdf-ghorg](https://github.com/gbloquel/asdf-ghorg) | -| ghq | [asdf:kajisha/asdf-ghq](https://github.com/kajisha/asdf-ghq) | +| ghq | [aqua:x-motemen/ghq](https://github.com/x-motemen/ghq) [asdf:kajisha/asdf-ghq](https://github.com/kajisha/asdf-ghq) | | ginkgo | [asdf:jimmidyson/asdf-ginkgo](https://github.com/jimmidyson/asdf-ginkgo) | -| git-chglog | [asdf:GoodwayGroup/asdf-git-chglog](https://github.com/GoodwayGroup/asdf-git-chglog) | -| git-cliff | [asdf:jylenhof/asdf-git-cliff](https://github.com/jylenhof/asdf-git-cliff) | +| git-chglog | [aqua:git-chglog/git-chglog](https://github.com/git-chglog/git-chglog) [asdf:GoodwayGroup/asdf-git-chglog](https://github.com/GoodwayGroup/asdf-git-chglog) | +| git-cliff | [aqua:orhub/git-cliff](https://github.com/orhub/git-cliff) [asdf:jylenhof/asdf-git-cliff](https://github.com/jylenhof/asdf-git-cliff) | | gitconfig | [asdf:0ghny/asdf-gitconfig](https://github.com/0ghny/asdf-gitconfig) | | github-cli | [ubi:cli/cli](https://github.com/cli/cli) [asdf:bartlomiejdanek/asdf-github-cli](https://github.com/bartlomiejdanek/asdf-github-cli) | | github-markdown-toc | [asdf:skyzyx/asdf-github-markdown-toc](https://github.com/skyzyx/asdf-github-markdown-toc) | diff --git a/e2e/tools/test_tools_alias b/e2e/tools/test_tools_alias index e8ebfd7c64..79c8cafc67 100644 --- a/e2e/tools/test_tools_alias +++ b/e2e/tools/test_tools_alias @@ -1,15 +1,18 @@ #!/usr/bin/env bash cat <mise.toml +tools.node = "100.0.0" tools.mytool = "2" tools.mytool-lts = "lts" +alias.node = "asdf:tiny" alias.mytool = "asdf:tiny" [alias.mytool-lts] -full = "asdf:tiny" +backend = "asdf:tiny" versions = {lts = "1.0.1"} EOF +assert_contains "mise x node -- rtx-tiny" "rtx-tiny: v100.0.0" assert_contains "mise x mytool -- rtx-tiny" "rtx-tiny: v2.1.0" assert_contains "mise x mytool-lts -- rtx-tiny" "rtx-tiny: v1.0.1" diff --git a/registry.toml b/registry.toml index 2f9236f6d4..afd95a8b8e 100644 --- a/registry.toml +++ b/registry.toml @@ -69,8 +69,7 @@ bbr.backends = ["asdf:vmware-tanzu/tanzu-plug-in-for-asdf"] bbr-s3-config-validator.backends = ["asdf:vmware-tanzu/tanzu-plug-in-for-asdf"] benthos.backends = ["asdf:benthosdev/benthos-asdf"] bfs.backends = ["asdf:virtualroot/asdf-bfs"] -bin.backends = ["asdf:yozachar/asdf-bin"] -binnacle.backends = ["asdf:Traackr/asdf-binnacle"] +binnacle.backends = ["aqua:Traackr/binnacle", "asdf:Traackr/asdf-binnacle"] bitwarden.backends = ["asdf:vixus0/asdf-bitwarden"] bitwarden-secrets-manager.backends = ["asdf:asdf-community/asdf-bitwarden-secrets-manager"] bombardier.backends = ["asdf:NeoHsu/asdf-bombardier"] @@ -86,7 +85,7 @@ buildpack.backends = ["asdf:johnlayton/asdf-buildpack"] bun.backends = ["core:bun", "vfox:ahai-code/vfox-bun"] bundler.backends = ["asdf:jonathanmorley/asdf-bundler"] cabal.backends = ["asdf:sestrella/asdf-ghcup"] -caddy.backends = ["asdf:salasrod/asdf-caddy"] +caddy.backends = ["aqua:caddyserver/caddy", "asdf:salasrod/asdf-caddy"] calendarsync.backends = ["asdf:FeryET/asdf-calendarsync"] calicoctl.backends = ["asdf:TheCubicleJockey/asdf-calicoctl"] camunda-modeler.backends = ["asdf:barmac/asdf-camunda-modeler"] @@ -101,7 +100,7 @@ cf.backends = ["asdf:mattysweeps/asdf-cf"] cfssl.backends = ["asdf:mathew-fleisch/asdf-cfssl"] chamber.backends = ["ubi:segmentio/chamber", "asdf:mintel/asdf-chamber"] changie.backends = ["ubi:miniscruff/changie", "asdf:pdemagny/asdf-changie"] -cheat.backends = ["asdf:jmoratilla/asdf-cheat-plugin"] +cheat.backends = ["aqua:cheat/cheat", "asdf:jmoratilla/asdf-cheat-plugin"] checkov.backends = ["asdf:bosmak/asdf-checkov"] chezmoi.backends = ["ubi:twpayne/chezmoi", "asdf:joke/asdf-chezmoi"] chezscheme.backends = ["asdf:asdf-community/asdf-chezscheme"] @@ -132,13 +131,13 @@ cockroach.backends = ["asdf:salasrod/asdf-cockroach"] cocoapods.backends = ["asdf:ronnnnn/asdf-cocoapods"] codefresh.backends = ["asdf:gurukulkarni/asdf-codefresh"] codeql.backends = ["asdf:bored-engineer/asdf-codeql"] -coder.backends = ["asdf:mise-plugins/asdf-coder"] +coder.backends = ["aqua:coder/coder", "asdf:mise-plugins/asdf-coder"] colima.backends = ["ubi:abiosoft/colima", "asdf:CrouchingMuppet/asdf-colima"] conan.backends = ["asdf:amrox/asdf-pyapp"] concourse.backends = ["asdf:mattysweeps/asdf-concourse"] conduit.backends = ["asdf:gmcabrita/asdf-conduit"] conform.backends = ["asdf:skyzyx/asdf-conform"] -conftest.backends = ["asdf:looztra/asdf-conftest"] +conftest.backends = ["aqua:open-policy-agent/conftest", "asdf:looztra/asdf-conftest"] consul.backends = ["asdf:asdf-community/asdf-hashicorp"] container-diff.backends = ["asdf:cgroschupp/asdf-container-diff"] container-structure-test.backends = ["asdf:FeryET/asdf-container-structure-test"] @@ -151,28 +150,28 @@ coursier.backends = ["asdf:jiahuili430/asdf-coursier"] crane.backends = ["asdf:dmpe/asdf-crane"] crc.backends = ["asdf:sqtran/asdf-crc"] credhub.backends = ["asdf:vmware-tanzu/tanzu-plug-in-for-asdf"] -crictl.backends = ["asdf:FairwindsOps/asdf-crictl"] +crictl.backends = ["aqua:kubernetes-sigs/cri-tools/crictl", "asdf:FairwindsOps/asdf-crictl"] crossplane-cli.backends = ["asdf:joke/asdf-crossplane-cli"] crystal.backends = ["asdf:asdf-community/asdf-crystal", "vfox:yanecc/vfox-crystal"] ctlptl.backends = ["asdf:ezcater/asdf-ctlptl"] ctop.backends = ["ubi:bcicen/ctop", "asdf:NeoHsu/asdf-ctop"] -cue.backends = ["asdf:asdf-community/asdf-cue"] +cue.backends = ["aqua:cue-lang/cue", "asdf:asdf-community/asdf-cue"] cyclonedx.backends = ["asdf:xeedio/asdf-cyclonedx"] -dagger.backends = ["asdf:virtualstaticvoid/asdf-dagger"] +dagger.backends = ["aqua:dagger/dagger", "asdf:virtualstaticvoid/asdf-dagger"] danger-js.backends = ["asdf:MontakOleg/asdf-danger-js"] dapr.backends = ["asdf:asdf-community/asdf-dapr-cli"] dart.backends = ["asdf:PatOConnor43/asdf-dart", "vfox:version-fox/vfox-dart"] -dasel.backends = ["asdf:asdf-community/asdf-dasel"] +dasel.backends = ["aqua:TomWright/dasel", "asdf:asdf-community/asdf-dasel"] datree.backends = ["asdf:lukeab/asdf-datree"] daytona.backends = ["asdf:CrouchingMuppet/asdf-daytona"] -dbmate.backends = ["asdf:juusujanar/asdf-dbmate"] +dbmate.backends = ["aqua:amacneil/dbmate", "asdf:juusujanar/asdf-dbmate"] deck.backends = ["asdf:nutellinoit/asdf-deck"] delta.backends = ["ubi:dandavison/delta", "asdf:andweeb/asdf-delta"] deno.backends = ["core:deno", "vfox:version-fox/vfox-deno"] dep.backends = ["asdf:paxosglobal/asdf-dep"] depot.backends = ["asdf:depot/asdf-depot"] desk.backends = ["asdf:endorama/asdf-desk"] -devspace.backends = ["asdf:NeoHsu/asdf-devspace"] +devspace.backends = ["aqua:devspace-sh/devspace", "asdf:NeoHsu/asdf-devspace"] dhall.backends = ["asdf:aaaaninja/asdf-dhall"] difftastic.backends = ["ubi:wilfred/difftastic[exe=difft]", "asdf:volf52/asdf-difftastic"] digdag.backends = ["asdf:jtakakura/asdf-digdag"] @@ -182,7 +181,7 @@ djinni.backends = ["asdf:cross-language-cpp/asdf-djinni"] dmd.backends = ["asdf:sylph01/asdf-dmd"] docker-compose-v1.backends = ["asdf:yilas/asdf-docker-compose-v1"] docker-slim.backends = ["asdf:xataz/asdf-docker-slim"] -dockle.backends = ["asdf:mathew-fleisch/asdf-dockle"] +dockle.backends = ["aqua:goodwithtech/dockle", "asdf:mathew-fleisch/asdf-dockle"] doctl.backends = ["ubi:digitalocean/doctl", "asdf:maristgeek/asdf-doctl"] doctoolchain.backends = ["asdf:joschi/asdf-doctoolchain"] docuum.backends = ["ubi:stepchowfun/docuum", "cargo:docuum", "asdf:bradym/asdf-docuum"] @@ -192,8 +191,8 @@ dotenv-linter.backends = ["ubi:dotenv-linter/dotenv-linter", "asdf:wesleimp/asdf dotnet.backends = ["asdf:hensou/asdf-dotnet", "vfox:version-fox/vfox-dotnet"] dotnet-core.backends = ["asdf:emersonsoares/asdf-dotnet-core"] dotty.backends = ["asdf:asdf-community/asdf-dotty"] -dprint.backends = ["asdf:asdf-community/asdf-dprint"] -draft.backends = ["asdf:kristoflemmens/asdf-draft"] +dprint.backends = ["aqua:dprint/dprint", "asdf:asdf-community/asdf-dprint"] +draft.backends = ["aqua:Azure/draft", "asdf:kristoflemmens/asdf-draft"] driftctl.backends = ["asdf:nlamirault/asdf-driftctl"] drone.backends = ["ubi:harness/drone-cli[exe=drone]", "asdf:virtualstaticvoid/asdf-drone"] dt.backends = ["asdf:so-dang-cool/asdf-dt"] @@ -203,7 +202,7 @@ dust.backends = ["ubi:bootandy/dust", "asdf:looztra/asdf-dust"] dvc.backends = ["asdf:fwfurtado/asdf-dvc"] dyff.backends = ["asdf:https://gitlab.com/wt0f/asdf-dyff"] dynatrace-monaco.backends = ["asdf:nsaputro/asdf-monaco"] -earthly.backends = ["asdf:YR-ZR0/asdf-earthly"] +earthly.backends = ["aqua:earthly/earthly", "asdf:YR-ZR0/asdf-earthly"] ecspresso.backends = ["asdf:kayac/asdf-ecspresso"] editorconfig-checker.backends = ["asdf:gabitchov/asdf-editorconfig-checker"] ejson.backends = ["asdf:cipherstash/asdf-ejson"] @@ -221,12 +220,12 @@ erlang.backends = ["core:erlang", "asdf:asdf-vm/asdf-erlang", "vfox:version-fox/ esc.backends = ["asdf:fxsalazar/asdf-esc"] esy.backends = ["asdf:asdf-community/asdf-esy"] etcd.backends = ["asdf:particledecay/asdf-etcd", "vfox:version-fox/vfox-etcd"] -evans.backends = ["asdf:goki90210/asdf-evans"] +evans.backends = ["aqua:ktr0731/evans", "asdf:goki90210/asdf-evans"] eza.backends = ["asdf:lwiechec/asdf-eza"] fd.backends = ["ubi:sharkdp/fd", "asdf:https://gitlab.com/wt0f/asdf-fd"] ffmpeg.backends = ["asdf:acj/asdf-ffmpeg"] figma-export.backends = ["asdf:younke/asdf-figma-export"] -fillin.backends = ["asdf:ouest/asdf-fillin"] +fillin.backends = ["aqua:itchyny/fillin", "asdf:ouest/asdf-fillin"] firebase.backends = ["asdf:jthegedus/asdf-firebase"] fission.backends = ["asdf:virtualstaticvoid/asdf-fission"] flamingo.backends = ["asdf:log2/asdf-flamingo"] @@ -253,10 +252,10 @@ getenvoy.backends = ["asdf:asdf-community/asdf-getenvoy"] ghc.backends = ["asdf:sestrella/asdf-ghcup"] ghidra.backends = ["asdf:Honeypot95/asdf-ghidra"] ghorg.backends = ["asdf:gbloquel/asdf-ghorg"] -ghq.backends = ["asdf:kajisha/asdf-ghq"] +ghq.backends = ["aqua:x-motemen/ghq", "asdf:kajisha/asdf-ghq"] ginkgo.backends = ["asdf:jimmidyson/asdf-ginkgo"] -git-chglog.backends = ["asdf:GoodwayGroup/asdf-git-chglog"] -git-cliff.backends = ["asdf:jylenhof/asdf-git-cliff"] +git-chglog.backends = ["aqua:git-chglog/git-chglog", "asdf:GoodwayGroup/asdf-git-chglog"] +git-cliff.backends = ["aqua:orhub/git-cliff", "asdf:jylenhof/asdf-git-cliff"] gitconfig.backends = ["asdf:0ghny/asdf-gitconfig"] github-cli.aliases = ["gh"] github-cli.backends = ["ubi:cli/cli[exe=gh]", "asdf:bartlomiejdanek/asdf-github-cli"] diff --git a/src/backend/mod.rs b/src/backend/mod.rs index befeb3c982..0744a20fdf 100644 --- a/src/backend/mod.rs +++ b/src/backend/mod.rs @@ -22,7 +22,7 @@ use crate::ui::progress_report::SingleReport; use crate::{dirs, env, file, lock_file, plugins, versions_host}; use backend_type::BackendType; use console::style; -use eyre::{bail, eyre, Result, WrapErr}; +use eyre::{bail, eyre, WrapErr}; use indexmap::IndexSet; use itertools::Itertools; use once_cell::sync::Lazy; @@ -99,7 +99,7 @@ pub fn load_tools() { let tools: BackendMap = tools .into_iter() - .map(|backend| (backend.id().to_string(), backend)) + .map(|backend| (backend.ba().short.clone(), backend)) .collect(); *memo_tools = Some(tools.clone()); time!("load_tools done"); @@ -131,6 +131,12 @@ pub fn get(ba: &BackendArg) -> Option { } } +pub fn remove(short: &str) { + let mut m = TOOLS.lock().unwrap(); + let backends = m.as_mut().unwrap(); + backends.remove(short); +} + pub fn arg_to_backend(ba: BackendArg) -> Option { match ba.backend_type() { BackendType::Core => CORE_PLUGINS.get(&ba.short).cloned(), @@ -182,8 +188,8 @@ pub trait Backend: Debug + Send + Sync { .collect(); let dep_backends = deps .iter() - .map(|ba| ba.backend()) - .collect::>>()?; + .flat_map(|ba| ba.backend()) + .collect::>(); for dep in dep_backends { // TODO: pass the right tvr let tvr = ToolRequest::System(dep.id().into(), ToolSource::Unknown); diff --git a/src/cli/args/backend_arg.rs b/src/cli/args/backend_arg.rs index 1989030bb4..4fbe24809d 100644 --- a/src/cli/args/backend_arg.rs +++ b/src/cli/args/backend_arg.rs @@ -127,18 +127,18 @@ impl BackendArg { } pub fn full(&self) -> String { - if let Some(full) = &self.full { - return full.clone(); - } if config::is_loaded() { if let Some(full) = CONFIG .all_aliases .get(&self.short) - .and_then(|a| a.full.clone()) + .and_then(|a| a.backend.clone()) { return full; } } + if let Some(full) = &self.full { + return full.clone(); + } unalias_backend(&self.short).to_string() } } diff --git a/src/config/config_file/mise_toml.rs b/src/config/config_file/mise_toml.rs index 124f0be3c6..9199b8c2f7 100644 --- a/src/config/config_file/mise_toml.rs +++ b/src/config/config_file/mise_toml.rs @@ -167,7 +167,7 @@ impl MiseToml { } if let Some(aliases) = self.alias.get_mut(&fa.short) { aliases.versions.swap_remove(from); - if aliases.versions.is_empty() && aliases.full.is_none() { + if aliases.versions.is_empty() && aliases.backend.is_none() { self.alias.swap_remove(&fa.short); } } @@ -423,7 +423,7 @@ impl ConfigFile for MiseToml { Ok(( k.clone(), Alias { - full: v.full.clone(), + backend: v.backend.clone(), versions, }, )) @@ -970,7 +970,7 @@ impl<'de> de::Deserialize<'de> for Alias { E: de::Error, { Ok(Alias { - full: Some(v.to_string()), + backend: Some(v.to_string()), ..Default::default() }) } @@ -979,12 +979,12 @@ impl<'de> de::Deserialize<'de> for Alias { where M: de::MapAccess<'de>, { - let mut full = None; + let mut backend = None; let mut versions = IndexMap::new(); while let Some(key) = map.next_key::()? { match key.as_str() { - "full" => { - full = Some(map.next_value()?); + "backend" => { + backend = Some(map.next_value()?); } "versions" => { versions = map.next_value()?; @@ -995,7 +995,7 @@ impl<'de> de::Deserialize<'de> for Alias { } } } - Ok(Alias { full, versions }) + Ok(Alias { backend, versions }) } } diff --git a/src/config/config_file/snapshots/mise__config__config_file__mise_toml__tests__fixture-4.snap b/src/config/config_file/snapshots/mise__config__config_file__mise_toml__tests__fixture-4.snap index 010da43598..d8cce1a9b6 100644 --- a/src/config/config_file/snapshots/mise__config__config_file__mise_toml__tests__fixture-4.snap +++ b/src/config/config_file/snapshots/mise__config__config_file__mise_toml__tests__fixture-4.snap @@ -5,7 +5,7 @@ snapshot_kind: text --- { "node": Alias { - full: None, + backend: None, versions: { "my_custom_node": "18", }, diff --git a/src/config/config_file/snapshots/mise__config__config_file__mise_toml__tests__fixture-5.snap b/src/config/config_file/snapshots/mise__config__config_file__mise_toml__tests__fixture-5.snap index 2a4e40ca96..9018b6f81d 100644 --- a/src/config/config_file/snapshots/mise__config__config_file__mise_toml__tests__fixture-5.snap +++ b/src/config/config_file/snapshots/mise__config__config_file__mise_toml__tests__fixture-5.snap @@ -13,7 +13,7 @@ MiseToml(~/fixtures/.mise.toml): ToolRequestSet: terraform@1.0.0 node@18 node@pr ], alias: { "node": Alias { - full: None, + backend: None, versions: { "my_custom_node": "18", }, diff --git a/src/config/config_file/snapshots/mise__config__config_file__mise_toml__tests__remove_alias-4.snap b/src/config/config_file/snapshots/mise__config__config_file__mise_toml__tests__remove_alias-4.snap index 4726bb64b3..fd3f06b69d 100644 --- a/src/config/config_file/snapshots/mise__config__config_file__mise_toml__tests__remove_alias-4.snap +++ b/src/config/config_file/snapshots/mise__config__config_file__mise_toml__tests__remove_alias-4.snap @@ -7,7 +7,7 @@ MiseToml(~/cwd/.test.mise.toml): ToolRequestSet: { alias: { "node": Alias { - full: None, + backend: None, versions: { "18": "18.0.0", }, diff --git a/src/config/config_file/snapshots/mise__config__config_file__mise_toml__tests__remove_alias.snap b/src/config/config_file/snapshots/mise__config__config_file__mise_toml__tests__remove_alias.snap index 300293703c..408e4f446c 100644 --- a/src/config/config_file/snapshots/mise__config__config_file__mise_toml__tests__remove_alias.snap +++ b/src/config/config_file/snapshots/mise__config__config_file__mise_toml__tests__remove_alias.snap @@ -5,7 +5,7 @@ snapshot_kind: text --- { "node": Alias { - full: None, + backend: None, versions: { "18": "18.0.0", }, diff --git a/src/config/config_file/snapshots/mise__config__config_file__mise_toml__tests__set_alias.snap b/src/config/config_file/snapshots/mise__config__config_file__mise_toml__tests__set_alias.snap index 92d1258a6e..2ba8478963 100644 --- a/src/config/config_file/snapshots/mise__config__config_file__mise_toml__tests__set_alias.snap +++ b/src/config/config_file/snapshots/mise__config__config_file__mise_toml__tests__set_alias.snap @@ -5,7 +5,7 @@ snapshot_kind: text --- { "node": Alias { - full: None, + backend: None, versions: { "16": "16.0.0", "18": "18.0.1", @@ -13,7 +13,7 @@ snapshot_kind: text }, }, "python": Alias { - full: None, + backend: None, versions: { "3.10": "3.10.0", }, diff --git a/src/config/mod.rs b/src/config/mod.rs index 125d6e3763..a995d641bd 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -54,7 +54,7 @@ pub struct Config { #[derive(Debug, Clone, Default)] pub struct Alias { - pub full: Option, + pub backend: Option, pub versions: IndexMap, } @@ -125,6 +125,15 @@ impl Config { install_state::add_plugin(plugin, plugin_type)?; } + for (short, _) in config + .all_aliases + .iter() + .filter(|(_, a)| a.backend.is_some()) + { + // we need to remove aliased tools so they get re-added with updated "full" values + backend::remove(short); + } + Ok(config) } pub fn env_maybe(&self) -> Option> { @@ -179,7 +188,7 @@ impl Config { let plugin_name = self .all_aliases .get(plugin_name) - .and_then(|a| a.full.clone()) + .and_then(|a| a.backend.clone()) .unwrap_or(plugin_name.to_string()); let plugin_name = plugin_name.strip_prefix("asdf:").unwrap_or(&plugin_name); let plugin_name = plugin_name.strip_prefix("vfox:").unwrap_or(plugin_name); @@ -253,8 +262,8 @@ impl Config { for (short, plugin_aliases) in &self.aliases { let alias = aliases.entry(short.clone()).or_default(); - if let Some(full) = &plugin_aliases.full { - alias.full = Some(full.clone()); + if let Some(full) = &plugin_aliases.backend { + alias.backend = Some(full.clone()); } for (from, to) in &plugin_aliases.versions { alias.versions.insert(from.clone(), to.clone()); @@ -770,8 +779,8 @@ fn load_aliases(config_files: &ConfigMap) -> Result { for config_file in config_files.values() { for (plugin, plugin_aliases) in config_file.aliases()? { let alias = aliases.entry(plugin.clone()).or_default(); - if let Some(full) = plugin_aliases.full { - alias.full = Some(full); + if let Some(full) = plugin_aliases.backend { + alias.backend = Some(full); } for (from, to) in plugin_aliases.versions { alias.versions.insert(from, to); diff --git a/src/config/snapshots/mise__config__tests__load.snap b/src/config/snapshots/mise__config__tests__load.snap index 7375c64aa3..522f9de98a 100644 --- a/src/config/snapshots/mise__config__tests__load.snap +++ b/src/config/snapshots/mise__config__tests__load.snap @@ -11,7 +11,7 @@ Config { ], Aliases: { "tiny": Alias { - full: None, + backend: None, versions: { "my/alias": "3.0", },