Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Ensure dependencies are available for alternative backends #2532

Merged
merged 4 commits into from
Sep 2, 2024

Conversation

xavdid
Copy link
Contributor

@xavdid xavdid commented Sep 2, 2024

When installing a tool via one of the experimental backends (npm, pipx, etc), the install would fail if the backend was managed by mise itself.

When setting up the paths for the installation command (npm install tldr) to run, mise wasn't making the backends specified in get_dependencies available to the subshell. So, they'd fail with a cryptic error:

No such file or directory (os error 2)

This was because npm wasn't in the path, despite it being installed.

I restructured some existing code to make creating a Toolset for a backend's dependents simple, then prepended those paths to the resulting command. I've confirmed locally that installations commands that fail without the

I also added a line to an e2e test, but I wasn't able to get those running locally in docker, so it's worth double checking that works as intended before merge.


fixes #2174
fixes #2315
fixes #2457
fixes #2458

@xavdid xavdid changed the title Ensure dependencies are available for alternative backends fix: Ensure dependencies are available for alternative backends Sep 2, 2024
@jdx jdx merged commit 0fd5c11 into jdx:main Sep 2, 2024
11 checks passed
@jdx
Copy link
Owner

jdx commented Sep 3, 2024

I believe this has caused a failure in e2e/backend/test_go_install_slow (which doesn't run on PRs), currently investigating why

@xavdid
Copy link
Contributor Author

xavdid commented Sep 3, 2024

Looks like that release branch was failing before this was merged (based on this CI run), which makes me think it's #2524 instead. The test uses a symlink and that changed how symlinks are handled across a number of operations.

Like I said, I wasn't able to get the e2e tests running locally using docker (mise wouldn't compile; mise run docker:cargo test worked fine though), so it's possible it's here! But nothing in this PR would have touched go- only the changed backends are affected at all.

@jdx
Copy link
Owner

jdx commented Sep 3, 2024

yep you are correct, verified via bisect

triarius pushed a commit to triarius/mise that referenced this pull request Sep 18, 2024
…2532)

* ensure dependencies are loaded for experimental backends

* fix cargo-binstall

* fix test

* simplicy e2e test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants