gittup / tup

Tup is a file-based build system.
http://gittup.org/tup/
GNU General Public License v2.0
1.18k stars 145 forks source link

Request: asdf/mise plugin #499

Open AndydeCleyre opened 6 months ago

AndydeCleyre commented 6 months ago

Hello, and thanks for tup!

Unfortunately many distros have only pretty old releases packaged in their repos, while new releases have some important and appreciated features. To make it easier to install new versions across distros, it would be super handy to have a plugin available for asdf/mise, so this is a a request for such a plugin.

gittup commented 6 months ago

I haven't heard of asdf/mise before - do distros use them to update packages? I haven't been involved in the packaging-things-on-distros side of the equation, and largely leave that up to interested users of those distros to package tup for them. However, I'm not at all opposed to including things in tup that make that easier (eg: the contrib/debian/ set of files). Can you clarify what you're looking for here? Or is there something tup should model itself after?

AndydeCleyre commented 6 months ago

do distros use them to update packages?

Rather, users use them to manage development runtimes independently of whatever versions are available in the distro repos. So a git repo or individual user might have a text file .tool-versions with a single line:

python 3.12 3.11 3.10 3.9 3.8 3.7

Other lines could be added for other runtimes (node, go, make, etc.).

If they are using the asdf or mise shell plugins, shims or the PATH will be updated when they are inside the containing folder, so that the runtimes are installed and at those expected versions, regardless of the larger system/distro versions.

Mise has an alternative file format, .mise.toml.

Mise is newer and in my opinion much better than asdf, but they use the same "plugin" format and ecosystem. Here's an example of setting up a newer-than-distro-repo make for a new project:

$ mkdir newproj && cd newproj
$ which make && make --version
/usr/bin/make
GNU Make 4.3
$ mise use make@latest
mise ⚠️ make is a community-developed plugin
mise url: https://github.com/yacchi/asdf-make
 Would you like to install make? Yes
mise plugin:make ✓ https://github.com/yacchi/asdf-make.git#2f12c4d                                                                                            mise ~/Code/newproj/.mise.toml tools: make@4.4.1
$ which make && make --version
/home/andy/.local/share/mise/installs/make/latest/bin/make
GNU Make 4.4.1
$ cat .mise.toml
[tools]
make = "latest"

These configuration files can also be used by CI systems.