jdx / mise

dev tools, env vars, task runner
https://mise.jdx.dev
MIT License
8.03k stars 210 forks source link

Not specifying a version hardcodes `latest` #2297

Open jhogendorn opened 2 weeks ago

jhogendorn commented 2 weeks ago

Describe the bug If you install/use a tool, ie python, without specifying a version it installs it as 'latest'. so thats the version in the directory structure and in the config files etc.

Often the reason for this non-specified version is that you just want the current stable version, and then you want it to lock there until further notice.

supporting the concept of latest is an improvement over asdf but its lost the version locking aspect thats so important. its simliar to the mess you get yourself in when you do the latest label on a docker container and 6 months later, bleary eyed in some prod failure you cant figure out what version was actually installed and what got upgraded or changed etc.

To Reproduce mise install python inspect with which and mise config files etc.

Expected behavior latest is a tricky one. it should be an alias like lts etc. different projects treat the idea of 'latest' differently, so its hard to say whether there should be a stable, edge etc other labels. but it should definitely not pin the version as latest in paths and other places.

Additional context This is particularly vexatious when you get odd intertool dependencies. If you mise install python it just versions it as 'latest'. you dont really know what the version is. If you then install a python based tool like ansible-base, it will point to the python 'latest' version in its venv. so your downstream tools will potentially break unknowingly.