Ref b812e59#diff-bdf3fc0debecefebed7b56c142626381R11
What you were trying to do (and why)
Install sbt and use my existing Java installation.
What happened (include command output)
sbt is running with JDK 13.0.2.
Command output
$ sbt 'eval sys.props("java.version")'
[warn] No sbt.version set in project/build.properties, base directory: /private/tmp/foo
[info] Loading settings for project global-plugins from idea.sbt,vimquit.sbt,plugins.sbt,pgp.sbt ...
[info] Loading global plugins from /Users/eed3si9n/.sbt/1.0/plugins
[info] Set current project to foo (in build file:/private/tmp/foo/)
[info] ans: String = 13.0.2
The reason this is problematic for sbt is because it is a build tool, used to to build libraries and applications on JVM. Changing the JVM version suddenly is a breaking change itself, but the even bigger issue is that the JVM version has a transitive property ("contagious"). Once a library is published with JDK 13, then the consumer has to use JDK 13 too.
For tooling and library authors, this usually means sticking to the lowest stable JDK version. Even for application authors, upgrading from one JDK version to another is a decision we don't make lightly. Certainly not by brew upgrade accidents.
What you expected to happen
Use the JDK that's installed in the environment.
Step-by-step reproduction instructions (by running brew install commands)
# comment out sdkman or jenv in dotfiles
brew install sbt
java -version
sbt 'eval sys.props("java.version")'
notes
#50536
Ref b812e59#diff-bdf3fc0debecefebed7b56c142626381R11
ran
brew updateand can still reproduce the problem?ran
brew doctor, fixed all issues and can still reproduce the problem?ran
brew gist-logs <formula>(where<formula>is the name of the formula that failed) and included the output link?https://gist.github.com/16a70480726f125b3f962d52838e97bf
if
brew gist-logsdidn't work: ranbrew configandbrew doctorand included their output with your issue?What you were trying to do (and why)
Install sbt and use my existing Java installation.
What happened (include command output)
sbt is running with JDK 13.0.2.
Command output
The reason this is problematic for sbt is because it is a build tool, used to to build libraries and applications on JVM. Changing the JVM version suddenly is a breaking change itself, but the even bigger issue is that the JVM version has a transitive property ("contagious"). Once a library is published with JDK 13, then the consumer has to use JDK 13 too.
For tooling and library authors, this usually means sticking to the lowest stable JDK version. Even for application authors, upgrading from one JDK version to another is a decision we don't make lightly. Certainly not by
brew upgradeaccidents.What you expected to happen
Use the JDK that's installed in the environment.
Step-by-step reproduction instructions (by running
brew installcommands)notes
#50536