mise icon indicating copy to clipboard operation
mise copied to clipboard

feat: new "enable-tools" option

Open zeitlinger opened this issue 9 months ago • 8 comments

Fixes https://github.com/jdx/mise/discussions/4777

zeitlinger avatar Apr 04 '25 15:04 zeitlinger

will need at least 1 e2e test

jdx avatar Apr 04 '25 15:04 jdx

will need at least 1 e2e test

added

running locally didn't work

Tasks test:e2e
[build] $ cargo build --all-features 
   Compiling rustls-native-certs v0.8.1
   Compiling mise v2025.4.0 (/home/gregor/source/mise)
   Compiling roff v0.2.2
    Building [=======================> ] 713/729: mise(build.rs), rustls-native-certs, roff                   
   Compiling hyper-rustls v0.27.5
   Compiling clap_mangen v0.2.26
   Compiling reqwest v0.12.15
   Compiling gix-transport v0.45.0
   Compiling xx v2.0.5
   Compiling self_update v0.42.0
   Compiling ubi v0.6.1
   Compiling vfox v1.0.1
   Compiling usage-lib v2.0.7
   Compiling gix-protocol v0.48.0
   Compiling gix v0.70.0
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 41.19s
[test:e2e] $ ~/source/mise/xtasks/test/e2e
~/source/mise/e2e ~/source/mise
./e2e/run_all_tests: line 10: fd: command not found
./e2e/run_all_tests: line 11: fd: command not found

zeitlinger avatar Apr 04 '25 16:04 zeitlinger

you need to install fd, which we could probably add to mise.toml

jdx avatar Apr 04 '25 16:04 jdx

you need to install fd, which we could probably add to mise.toml

I also get

E2E test backend/test_npm aborted: 'npm' is required but was not found in PATH
backend/test_npm: 0s
E2E test backend/test_npm failed: exited with status code 2
Test environment can be examined in /tmp/test_npm.my74rE

[test:e2e] ERROR task failed
 ✘ gregor@nevla  ~/source/mise   enable-tools ±  mise use npm     
mise ~/source/mise/mise.toml tools: [email protected]

zeitlinger avatar Apr 04 '25 16:04 zeitlinger

you need to install fd, which we could probably add to mise.toml

even though it's not working locally - the e2e test seems to be working

zeitlinger avatar Apr 04 '25 16:04 zeitlinger

@jdx can you take a look?

zeitlinger avatar Apr 07 '25 08:04 zeitlinger

@jdx can you help me fix the coverage report?

mise r test:coverage:

Error: 
   0: tools failed: aqua, bazel-watcher

Location:
   src/cli/test_tool.rs:108

Version:
   2025.4.0-DEBUG linux-x64 (2025-04-04)

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
[test:coverage] ERROR task failed
 ✘ gregor@nevla  ~/source/mise/e2e   enable-tools ±  mise use bazel-watcher
mise ERROR failed to install aqua:bazelbuild/[email protected]
mise ERROR HTTP status client error (404 Not Found) for url (https://api.github.com/repos/bazelbuild/bazel-watcher/releases/tags/0.26.0)
mise ERROR no asset found: ibazel_linux_amd64
Available assets:

zeitlinger avatar Apr 23 '25 12:04 zeitlinger

This is what I get with latest main now:

(npm is installed locally)

GitHub rate limit: 4792/5000 - resets at 2025-04-23 13:04:17
>>> E2E backend/test_npm
E2E test backend/test_npm aborted: 'npm' is required but was not found in PATH
backend/test_npm: 0s
E2E test backend/test_npm failed: exited with status code 2
Test environment can be examined in /tmp/test_npm.Y1dTQo

zeitlinger avatar Apr 23 '25 12:04 zeitlinger

@jdx not sure what you did - but I got it working now with the latest version :smile:

zeitlinger avatar May 15 '25 11:05 zeitlinger