Skip to content

fix: prefer offline when executing shims#5195

Merged
jdx merged 3 commits into
mainfrom
prefer-offline
May 26, 2025
Merged

fix: prefer offline when executing shims#5195
jdx merged 3 commits into
mainfrom
prefer-offline

Conversation

@jdx

@jdx jdx commented May 26, 2025

Copy link
Copy Markdown
Owner

No description provided.

@jdx jdx force-pushed the prefer-offline branch 2 times, most recently from 5d15b35 to 26f77bd Compare May 26, 2025 14:16
@jdx jdx force-pushed the prefer-offline branch from 26f77bd to 6910b9e Compare May 26, 2025 14:18
@github-actions

github-actions Bot commented May 26, 2025

Copy link
Copy Markdown

e2e/perf/test_many_tasks

  • NUM_TASKS: 2000
  • NUM_TOOLS: 200
Command Uncached mise Cached mise Uncached mise-2025.5.13 Cached mise-2025.5.13
install 1646ms 194ms 830ms 197ms
ls 692ms 80ms 694ms 81ms
bin-paths 822ms 71ms 693ms 75ms
task-ls 10017ms 10016ms 2095ms 313ms

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.5.13 x -- echo 52.1 ± 0.9 49.8 57.6 1.11 ± 0.03
mise x -- echo 47.0 ± 1.1 45.8 61.0 1.00

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.5.13 env 51.7 ± 1.7 48.9 82.2 1.12 ± 0.05
mise env 46.2 ± 1.2 44.8 67.6 1.00

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.5.13 hook-env 51.6 ± 1.3 49.1 64.0 1.12 ± 0.03
mise hook-env 45.9 ± 0.4 44.5 47.4 1.00

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.5.13 ls 58.6 ± 0.6 57.0 63.4 1.02 ± 0.01
mise ls 57.4 ± 0.4 56.4 59.8 1.00

@jdx jdx force-pushed the prefer-offline branch 2 times, most recently from 3431ead to 7be8e8c Compare May 26, 2025 14:43
@jdx jdx force-pushed the prefer-offline branch 2 times, most recently from b1f1a0d to c700ab4 Compare May 26, 2025 15:11
@jdx jdx force-pushed the prefer-offline branch from c700ab4 to e89e107 Compare May 26, 2025 15:12
@jdx jdx merged commit 140fdac into main May 26, 2025
17 checks passed
@jdx jdx deleted the prefer-offline branch May 26, 2025 15:57
jdx pushed a commit that referenced this pull request May 26, 2025
### 🐛 Bug Fixes

- installing tools with postinstall hooks fails by
[@roele](https://github.com/roele) in
[#5191](#5191)
- prefer offline when executing shims by [@jdx](https://github.com/jdx)
in [#5195](#5195)
- multi-line task output is shown in bold by
[@roele](https://github.com/roele) in
[#5197](#5197)

### ⚡ Performance

- improve tool loading performance in async code by
[@jdx](https://github.com/jdx) in
[#5198](#5198)
jdx pushed a commit that referenced this pull request Jul 11, 2025
Aligns the version resolution logic (from canonicalised version to
GitHub tag) in `list_bin_paths` with the one in `install_version_`.

I think this doesn't change the behaviour for offline introduced in
#5195.

> TODO: instead of caching it would probably be better to create this as
part of installation

Regarding this TODO, I agreed with it and tried to work on it, but was
not sure how to.
I'd like to ask for some advice.

I thought of storing `bin_paths.msgpack.z` in the installation path,
`tv.install_path()`, while the installation, and reading it when
`list_bin_paths` is called.
Not to break the installations with old versions, or just in case
`bin_paths.msgpack.z` is removed somehow, I think we need to fall back
to the current implementation if it's not found.

However, then it would be the same as the current implementation, except
that `list_bin_paths` is called in the installation and the cache is
created.
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