In https://github.com/jdx/mise/issues/2289 I was trying to use mise link to add a binary that already exists in the filesystem to mise, which would allow me to use mise to manage different versions of tools that I am building locally via Makefiles.
This would allow for more efficient iteration and testing across versions while developing a tool. But it would also open further options to mise, such as being able to manage tool versions that are installed via apt, brew, or anything else.
I was notified that link doesn't really work that way - it is more built on top of asdf plugins, i think (its still not quite clear to me how it works).
It was suggested that I leverage the backends mechanism for this, so I made a kludgy proof of concept for it by copying the directory and .mise.backend.json structure for the go backend (probably could work with other backends as well).
It seems to work, but is far from ideal. I will try to make a mise task that will do all of this and share it in another comment, but even that would not be ideal.
Request/Proposal
I think it would be great to have a built-in mechanism for installing binaries that already exist in the filesystem (be it from make, apt, or any other source - it shouldn't be relevant to mise where they came from.
I'm not sure what the best implementation would be. Some ideas:
mise link --local name@version /binary/path option which can symlink to the binary, wherever it is.
However, I can see it being useful to copy the binary into .local/share/mise/installs, rather than symlink, so that different versions of the binaries could be built wherever/however they normally are, and then persisted in mise.
so perhaps something like a local backend would work. mise install local:[toolname@version] [/binary/path]. This would copy the binary to .local/share/mise/installs
And a link option to symlink rather than copy mise install --link local:[toolname@version] [/binary/path]
We could then use the tool like mise use local:tool@version. Or, if #2293 can be implemented, then just mise use tool@version
Any thoughts and collaboration would be appreciated!
Background
In https://github.com/jdx/mise/issues/2289 I was trying to use
mise link
to add a binary that already exists in the filesystem to mise, which would allow me to use mise to manage different versions of tools that I am building locally via Makefiles.This would allow for more efficient iteration and testing across versions while developing a tool. But it would also open further options to mise, such as being able to manage tool versions that are installed via apt, brew, or anything else.
I was notified that
link
doesn't really work that way - it is more built on top of asdf plugins, i think (its still not quite clear to me how it works).It was suggested that I leverage the backends mechanism for this, so I made a kludgy proof of concept for it by copying the directory and
.mise.backend.json
structure for the go backend (probably could work with other backends as well).contents of
.mise.backend.json
It seems to work, but is far from ideal. I will try to make a
mise task
that will do all of this and share it in another comment, but even that would not be ideal.Request/Proposal
I think it would be great to have a built-in mechanism for installing binaries that already exist in the filesystem (be it from
make
,apt
, or any other source - it shouldn't be relevant to mise where they came from.I'm not sure what the best implementation would be. Some ideas:
mise link --local name@version /binary/path
option which can symlink to the binary, wherever it is..local/share/mise/installs
, rather than symlink, so that different versions of the binaries could be built wherever/however they normally are, and then persisted in mise.mise install local:[toolname@version] [/binary/path]
. This would copy the binary to.local/share/mise/installs
mise install --link local:[toolname@version] [/binary/path]
We could then use the tool like
mise use local:tool@version
. Or, if #2293 can be implemented, then justmise use tool@version
Any thoughts and collaboration would be appreciated!