-
Notifications
You must be signed in to change notification settings - Fork 323
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
feat: include ubi into mise directly #2290
Conversation
I honestly don't understand the internals of mise well enough to know if this PR is done or not. |
65dc88b
to
d794d4c
Compare
it seems to be failing but it's unclear why:
|
This test replaces the |
Also, I think it'd be nice to add support for some other features, like telling
The other options I can think of are:
|
mise has support for tool config which should be documented more clearly: [tools]
# send arbitrary options to the plugin, passed as:
# MISE_TOOL_OPTS__VENV=.venv
python = { version = '3.10', virtualenv = '.venv' } which could be leveraged here. What's missing is a way to configure this on the command line in part because it's tricky to know how to be able to do that with multiple tools |
I pushed a commit that adds the ability to set "exe" and "matching" in the config file. I think it's ok if this is only available via the config file for now. |
d1ec7db
to
aacf069
Compare
Hello not sure if linked but i have some issue with existing ubi for now like #2429 |
@autarch let me know when you think this is in a good place for review (or if it's ready now) |
aacf069
to
23eecad
Compare
@jdx I think this is mostly ready, but it wouldn't hurt to add some additional e2e tests, I think. |
Also, there's an e2e test failure I don't understand - https://github.com/jdx/mise/actions/runs/10548662451/job/29222829250?pr=2290 |
I think we can remove that e2e test file entirely since it involves mocking out ubi which isn't possible anymore baking the CLI into the codebase. It's running this which fails as you would expect:
|
there's a couple more issues I'd like to see tackled before we include this, generally to avoid adding a ton of crates to increase the build complexity of mise further than it already is:
|
Not quite ready yet, so we need workarounds for: jdx/mise#2260 jdx/mise#2536 jdx/mise#2290
I had a tiny nit but I think this is ready. This is pretty exciting since we should be able to remove a bunch of asdf plugins and just use ubi as the backend! |
I just merged from your |
But now I'm getting a very confusing compilation error:
No idea what's going on here. |
jdx/mise#2290 is now done, yay!
Thanks for all the hard work that went into getting UBI built-in within mise :) I've now switched most things that can be installed with UBI over to using it in my own global config: jimeh/dotfiles@5f0330d |
Thanks @jimeh for your config, I was looking for a quick way to change |
@jimeh if you've verified these work we should probably replace the shorthands in registry.toml to use ubi by default |
@jdx do you have any minimum os/arch set of binaries provided in GitHub releases in mind before making ubi the default for a specific tool? Or does it maybe not matter, as most asdf plugins which ubi can replace are probably just downloading binaries from GitHub releases already? As for those in my config, I haven't tried executing all of them, but they all installed fine :) I only double-checked about 60% of the asdf plugins I switched away from to confirm that all they do is download GitHub release assets, as I just went straight to the relevant repo and looked at the most recent release for projects I'm quite familiar with. I'd be happy to go back and check them all though. All the asdf plugins left in my config download the binaries from somewhere other than GitHub releases. The semi-exception is |
yeah since we'd be replacing the asdf plugin the arch/os support will be identical with ubi
I think anything you're welcome to contribute here would be helpful, it'd definitely be nice to simplify and remove the asdf plugin where we can.
We actually have support for this because the registry supports multiple backends, e.g.: eza = ['ubi:eza/eza', 'cargo:eza'] People on esoteric architectures could then set |
That all makes sense. In that case I'll do a PR when I'm back on my computer :) Do you prefer separate PRs for each tool against |
oh just make 1 |
I've held off on the I also ran into issues with 403 errors from GitHub's API, which has led me to expose a GitHub token as an env var again, instead of having tools query it out of 1Password's CLI when they need it as I've been doing recently. I'll look at some other issues mentioning this when I have time, and see if I provide any useful suggestions. |
I took a stab at this using the
library-ize
branch ofubi
. It seems to work from my testing locally, and the test suite also passed locally.