sdkman / sdkman-cli

The SDKMAN! Command Line Interface
https://sdkman.io
Apache License 2.0
6.14k stars 631 forks source link

Feature: Per project installation of SDK #1184

Open MateuszKubuszok opened 1 year ago

MateuszKubuszok commented 1 year ago

Feature request

GraalVM besides providing JDK API also adds polyglot applications. Not all languages are embedded in a standard installation so one might need to run:

# gu comes from GraalVM after it's been installed and set up by e.g. sdkman
gu install native-image
gu install python
gu install ruby
$JAVA_HOME/languages/ruby/lib/truffle/post_install_hook.sh
gu rebuild-images --verbose polyglot python ruby

The problem is that these are modifying the global installation of a GraalVM, so if 2 projects wanted to have different things installed, the user would have to explicitly use different versions of GraalVM to make sure that they aren't accidentally using features are not explicitly requiring by their project.

Ideally, sdkman could create a separate sdk name for e.g. GrallVM in some particular version with some extra languages installed and their images rebuild, but it might be easier to make sdk man install sdk in some directory local to project (and defining this directory wth sdkman env file) allowing it to modify it freely without installing components for the whole system.

linghengqian commented 2 months ago
MateuszKubuszok commented 2 months ago

Hmm, my original use case was using several languages inside the same VM, e.g. calling Pygments or KaTeX libraries from withing JVM, and GraalVM allowed me to do it, although it required running gu. If I needed to use several package managers inside a single project, I would probably rather use other libraries and/or reimplement functionalities I need myself.

linghengqian commented 2 months ago

Now, gu is no longer in graalvm-ce. I don't see the way forward for the current issue.