jdx / mise

dev tools, env vars, task runner
https://mise.jdx.dev
MIT License
8.07k stars 211 forks source link

mise used --global shouldn't check the versions of local tools #2255

Closed bhollis closed 4 weeks ago

bhollis commented 1 month ago

It looks like when I run mise use -g <package> it's making a ToolRequestSet that still considers my local packages (from the repository's .mise.toml and trying to validate them, instead of just installing the one thing I asked for. Here's some output from our GitHub actions runner:

Run mise use --verbose -y -g cargo-binstall
  mise use --verbose -y -g cargo-binstall
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    CARGO_TARGET_DIR: /root/.cargo_target
    CARGO_HOME: /root/.cargo
    CARGO_INCREMENTAL: 0
    CARGO_TERM_COLOR: always
    MISE_LOG_LEVEL: info
    MISE_TRUSTED_CONFIG_PATHS: /home/scarecrow/actions-runner/_work/stately/stately
    MISE_YES: 1
[DEBUG] ARGS: mise use --verbose -y -g cargo-binstall
[DEBUG] Config {
    Config Files: [
        "/home/scarecrow/actions-runner/_work/stately/stately/.mise.toml",
        "/home/scarecrow/actions-runner/_work/stately/stately/.ruby-version",
        "/home/scarecrow/actions-runner/_work/stately/stately/.nvmrc",
        "/home/scarecrow/.config/mise/config.toml",
        "~/.config/mise/config.toml",
    ],
}
[DEBUG] ToolRequestSet.build(100.839µs): ToolRequestSet: cargo:cargo-binstall@latest node@20.13.1 ruby@3.3.0 go@1.22.3 java@temurin-21 cargo:cargo-cranky@0.3.0 cargo:protoc-gen-prost-crate@0.3.1 golangci-lint@1.58.1 go:github.com/segmentio/golines@0.12.2 go:github.com/drshriveer/gtools/genum/cmd/genum@v0.0.0-20240314218-40dccd828943 cargo:cross@0.2.5 cargo:wasm-bindgen-cli@0.2.92 buf@1.32.2 sccache@0.8.1 npm:ts-proto@1.176.1 npm:@bufbuild/protoc-gen-es@1.10.0 go:google.golang.org/protobuf/cmd/protoc-gen-go@1.34.1 go:github.com/planetscale/vtprotobuf/cmd/protoc-gen-go-vtproto@0.6.0 cargo:protoc-gen-prost-serde@0.3.0 cargo:protoc-gen-tonic@0.4.0 cargo:protoc-gen-prost@0.3.1
[DEBUG] $ npm view ts-proto versions --json
[DEBUG] $ go list -m -versions -json github.com/segmentio/golines
[DEBUG] $ npm view @bufbuild/protoc-gen-es versions --json
... etc ...
jdx commented 1 month ago

This probably can't change since one of the other tools may be an undefined dependency. I have no way to know which ones are dependencies.