Replies: 15 comments 46 replies
-
nice! This actually wasn't too bad: #1452 |
Beta Was this translation helpful? Give feedback.
-
Swift Package Manager doesn't have an API that users can leverage to add tasks to their projects. However, it supports adding plugin dependencies, for example this one to generate documentation, which extend |
Beta Was this translation helpful? Give feedback.
-
I would strongly prefer to use a more clear prefix than the dash. e.g. When considering Go, I'd prefer native Lastly, very go-specific as I'm considering implementing that, Go uses import paths a lot. Where with cargo and npm developers have to 'reserve' their name, with Go it's possible to use any domain name to create an 'import path'. For example How would we translate this to rtx? A couple of options:
I prefer the first one because it differs the least from original go usage. Need to look into implementation though. TOML will need quoting, but already needs it IF using the |
Beta Was this translation helpful? Give feedback.
-
I am most looking forward to Thus solving the pain point of writing asdf plugins which boil down to string manipulating the So maybe some process like
Or maybe allow for Note that another challenge may be other files inside of release archives. For example, I want to use mise to install slack's Nebula https://github.com/slackhq/nebula/releases Other repos ship with other files that aren't just the binary files. Idk the best way to solve this some tools similar to eget just look for the largest file in the archive, etc. So yea to two main issues are:
|
Beta Was this translation helpful? Give feedback.
-
Not sure when I'll be able to get around to doing more of these, if someone wanted to help and had a particular backend they want, they're actually really easy to write though since I have refactored the codebase to allow for backends, here is npm: 8d678e0 I think the next problem might be how to deal with urls/repo names. I think it'll work out of the box but that might require some (probably minor) modifications. Also, within the codebase, I've settled on calling these "forges"—the idea being they stamp out instances of "tools". A "forge" is something like This was important in the codebase where "plugin" has been an overloaded term. These should not be thought of as plugins. In the future, a plugin may provide one or many forges or none at all in the case of a plugin for tasks and environments. I have not made this change in anything user-facing (perhaps in some error messages) but that probably should be done at some point—though when that happens the change should be made everywhere at the same time for consistency. Part of the reason is I'm still a little undecided if "forge" should be the final name—and you all know how I can be about naming things :). It will make explaining mise a bit harder since right now there is a 1:1 mapping between plugins and forges but that will need to change. |
Beta Was this translation helpful? Give feedback.
-
Edit: Totally just assumed this is how it worked but jdx implemented it how I thought it should be already my bad for not trying it first. Also for the It would be great for mise to be the tool that makes behavior consistent and pins things in the path when installed via mise. So in other words if I installed a npm based tool using mise I would expect it to ensure it is always on the path, regardless of which version of node is on my path at that time. This is your tool so it is up to you, but I feel liek having mise just call commands of other tools direcly like this with no extra handling isn't super useful, and may even may mise more confusing to use. As a user who may only know 1-2 of the 20 possible backend tools I would have no idea what command I should run, esp when many may actually work but have large tradeoffs. If I use |
Beta Was this translation helpful? Give feedback.
-
When bootstrapping a new system and running As a concrete example, if I have this in global or project settings and run
If homebrew/nix/apt are also in the mix, perhaps they should also precede backends like pipx/cargo etc, as that's how some users install pipx. |
Beta Was this translation helpful? Give feedback.
-
Go is done as of #1470 |
Beta Was this translation helpful? Give feedback.
-
Installing in a special path with a special cache, |
Beta Was this translation helpful? Give feedback.
-
As far as I can tell, |
Beta Was this translation helpful? Give feedback.
-
I think ruby gems would be a good one to add to this list as well. I think |
Beta Was this translation helpful? Give feedback.
-
A backend for Elixir's |
Beta Was this translation helpful? Give feedback.
-
I'm glad to see rtx going in the right direction, hot damn there's a lot going on since I was last in the loop! Homebrew is going in the other direction with the python changes...sigh (and here I am as a result)
Backend is...ehhh. Framework is easily #1 to me. Some others that come to mind:
That is, if you/team doesn't want to slide those kinda dependencies into the chaos 😂 (^ above was definitely a Mac-only problem...IIRC if I could hardlink, I could've worked around it. I'm also not proficient let alone an expert in code world.)
Cargo, Web PM (anything besides npm, but pref. a flat-packer, whatever is next-gen pnpm, Deno? Bun? IDK), Python/Pip(x) should be #1 priorities for sure!
Tanx for the amazing work you do JDX! |
Beta Was this translation helpful? Give feedback.
-
HI, I am concerned about downloading binaries through third parties plugins. Any help needed ? Would help if I can. |
Beta Was this translation helpful? Give feedback.
-
I've just skimmed through this thread and I think I have a use case that has not been mentioned before. I would like to be able to have something akin to what This is needed for tools that come with their own plugins (e.g. tailwindcss plugins, postcss plugins etc.) I don't have time myself to investigate and implement. But I thought I'd leave the idea here. |
Beta Was this translation helpful? Give feedback.
-
One of the most common feature requests for a long time is to support being able to directly install tools without having an asdf plugin for it. As an example:
mise use -g cargo-eza
ormise use -g npm-@antfu/ni
maybe even homebrew?I'm going to try to use this discussion as a central place to manage my solution which I've started spiking on.
Supported Backends
These are in rough order of priority:
cargo install
npm i -g
cargo binstall
)go build
OR https://gobinaries.com/cargo binstall
Syntax
Right now I'm going with a dash to separate the backend from the tool name. I know this isn't great
because you could have tools with dashes in them, but it's really the only delimiter we can use in TOML
without needing to add quotes. I want to avoid something like this:
It works fine, just looks ugly.
Alternatives considered:
mise use -g cargo:eza
mise use -g cargo/eza
mise use -g cargo#eza
mise use -g cargo!eza
mise use -g cargo|eza
Runtime/compiler selection
For v1, I'm simply going to call whichever
cargo
ornpm
is on PATH. That may be something you've defined in your.mise.toml
. It may be something in your system, just depends on how it is configured. This does mean you will need to manually setup cargo/npm/whatever ahead of time.I think for v1 that's fine and possibly long-term as well. I think later if we detect the compiler/package manager isn't installed we can prompt to install it.
The runtime selection is a harder problem I think. If I install something with node-18, then run it with node-20, will it work ok? If memory serves, you actually need to run
npm install
again to get it to rebuild the right files (but I think there may have been a slightly easier command). Maybe that's better in more modern node? In any case, I'm jus talking about node here but I could see this being a problem for any scripting language. As you jump between projects the CLIs need to keep working.I hope not but I may need to put a shim in place to detect if the runtime version changed and if so run whatever command I need to patch it for the current version.
Storage
Related to the above point is storage. I think these should just be like any asdf-plugin installed thing inside of
~/.local/share/mise/installs/cargo-eza
—note the "cargo-" prefix to prevent the scenario where you have 2 things installed via different tools.Scoped packages in node may be a problem. I'm not sure how mise will handle
~/.local/share/mise/installs/npm-@antfu/ni
. Perhaps we should slugify that to~/.local/share/mise/installs/npm-@antfu-ni
. I actually think users will prefer this. I don't think they'll want to have npm CLIs grouped into individual directories.An outstanding question (my spike will address) is how exactly I install something like this.
npm install --into
is the non-existent (at least I think non-existent) command I think I need.My biggest question is
Questions
Existing issues/discussions
Beta Was this translation helpful? Give feedback.
All reactions