8000 Tool dependencies · Issue #2536 · jdx/mise · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Tool dependencies #2536

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

Closed
davidkuridza opened this issue Sep 3, 2024 · 2 comments · Fixed by #3227
Closed

Tool dependencies #2536

davidkuridza opened this issue Sep 3, 2024 · 2 comments · Fixed by #3227

Comments

@davidkuridza
Copy link

I came across a tool dependency issue and didn't find it documented anywhere. Please let me know if this is an expected behaviour and how to solve it.

I would like to have all the dependencies defined in .mise.toml and installed with mise install. Trying to add a Python package, for example yamllint, pipx has to be available on the system or installed with mise as documented. Is there a way to do it with a single command?

An alternative approach is to use a plugin. I found a community plugin, but it relies on other tools as well, for example, jq. With both jq and yamllint in .mise.toml, I assume it should be possible to run mise install but it fails due to missing jq even though it's installed before yamllint. Is there a way to specify dependencies between tools?

Thank you.

@jdx
Copy link
Owner
jdx commented Sep 3, 2024

sort of but they're hardcoded into mise right now:

"poetry" | "pipenv" | "pipx" => vec!["python"],

we could probably add jq as a dependency against everything except jq itself to that list

@davidkuridza
Copy link
Author

I forgot to include this in the post above:

❯ cat .mise.toml
[settings]
experimental = true

[tools]
"python" = "latest"
"jq" = "latest"
"yamllint" = "latest"

# first run fails
❯ mise install
... snip
/root/.local/share/mise/plugins/yamllint/lib/common.sh: line 74: jq: command not found
/root/.local/share/mise/plugins/yamllint/lib/common.sh: line 75: jq: command not found
/root/.local/share/mise/plugins/yamllint/lib/common.sh: line 76: jq: command not found
... snip
mise python@3.12.5 ✓ installed
mise jq@1.7.1 ✓ installed
mise ~/.local/share/mise/plugins/yamllint/bin/download exited with non-zero status: exit code 3
mise Run with --verbose or MISE_VERBOSE=1 for more information

# second run works since dependencies exist
❯ mise install
mise yamllint@1.35.1 ✓ installed

If there's a missing dependency, mise install fails for the dependent one (in this case, jq and python are installed, yamllint fails). Running mise install again works since the dependency is available. Running it several times locally is an inconvenience, not really an issue, but it is a bit cumbersome when trying to run in the CI.

I'm using jq and yamllint as an example here, but it could be any other tool, including other backends. Is there a way to instruct mise about the tools' dependencies?

liskin added a commit to liskin/dotfiles that referenced this issue Sep 16, 2024
jdx added a commit that referenced this issue Nov 27, 2024
@jdx jdx closed this as completed in #3227 Nov 27, 2024
jdx added a commit that referenced this issue Nov 27, 2024
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 a pull request may close this issue.

2 participants
0