Update your Scala dependencies (both libraries and plugins) interactively. Video Demo.
Homebrew (Mac Only)
brew install kitlangton/tap/scala-update
If you'd like slightly faster binaries on an M1 mac, install manually with GraalVM (the next step).
Manually with GraalVM
# See Java versions and pick a GraalVM version, for example 22.1.0.r17-grl
sdk list java
sdk install java 22.1.0.r17-grl
# If you haven't set grl version as default, set it for the current terminal session
sdk use java 22.1.0.r17-grl
native-image installed. You can install it with GraalVM updater.
gu install native-image
Building Native Image with GraalVM
- Build the native image with
sbt 'show graalvm-native-image:packageBin'
# [info] ~/code/sbt-interactive-update/target/graalvm-native-image/scala-update
- Move the generated binary onto your
PATH. For example (in project root directory)
# Might need to run with sudo
cp target/graalvm-native-image/scala-update /usr/local/bin
Run the command from within an sbt project folder.
The commands are displayed at the bottom of the interactive output.
Select the libraries you wish to update, then hit
Enter to update your build files to the selected versions.
If multiple dependencies share a single version, they will be grouped.
If a dependency has multiple possible update version—for instance, a new major version and a new minor version—then you can select which version to upgrade to.
How did you make the interactive CLI?
I have another library, zio-tui, for creating interactive command line programs just like this one.