jdx / mise

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

Add upgrade flag to update all tool versions to latest minor version #2717

Open tyilo opened 1 month ago

tyilo commented 1 month ago
$ mise ls
java    temurin-8.0.422+5                              
java    temurin-11.0.22+7                              
java    temurin-17.0.10+7                              
java    temurin-21.0.4+7.0.LTS                         
node    18.20.4                                        
node    20.18.0                                        
node    22.0.0                                                                           
python  3.11.9                                         
python  3.12.3
$ mise up
mise All tools are up to date

It would be nice if I could update all my tools versions to the latest minor version, without having to run

$ mise up java@temurin-8 java@temurin-11 java@temurin-17 java@temurin-21 node@18 node@20 node@22
...
$ mise ls
java    temurin-8.0.422+5                              
java    temurin-11.0.24+8                              
java    temurin-17.0.12+7                              
java    temurin-21.0.4+7.0.LTS                         
node    18.20.4                                        
node    20.18.0                                        
node    22.9.0                                                  
python  3.11.10                                        
python  3.12.7

Maybe something like mise up --minor.

xremming commented 1 month ago

Would be nice if outdated also supported showing tools which have a newer version than the one in your configuration. It would ease the upgrade process significantly.

jdx commented 1 month ago

Would be nice if outdated also supported showing tools which have a newer version than the one in your configuration. It would ease the upgrade process significantly.

there is a flag for that

roele commented 3 weeks ago

This does not seem to work well for Java, seems something is off with the fuzzy matching as it shows JRE

mise outdated -l
mise WARN  something weird happened with versioning, old: 21, new: , skipping
name  requested   current                  latest                source
java  temurin-21  temurin-21.0.5+11.0.LTS  temurin-jre-23.0.1+11 ~/.config/mise/config.toml

Filed #2797 to get this addressed.

jdx commented 3 weeks ago

what OP is asking for here I have no idea how we would build. mise up only looks at the current active versions, and this request would involve updating inactive versions. We either somehow would need to broaden mise up to upgrade inactive versions, or have it behave differently for a potential --minor flag. Either way, it seems like a lot of work to build and would also make the behavior of mise up confusing.

From the user's perspective, I do get it that you have maybe node@18, node@20, and node@22 and just want a single version of all of them and a single command to update all of them. I believe you can do this with mise install node@18 node@20 node@22 though but I don't know how we could figure this out across tools generally in a useful way.

It's also different for different tools, java has strange minor versions and so does python. mise doesn't have a concept of "minor" versions I don't think.