As of 2025-06-21, https://docs.scala-lang.org/getting-started/install-scala.html says:
Run the following command in your terminal, following the on-screen instructions:
brew install coursier && coursier setup
On the other hand, https://scala-lang.org/download/ says:
Run the following command in your terminal, following the on-screen instructions:
brew install coursier/formulas/coursier && cs setup
These formulae differ in terms of which JDK they use.
coursier is https://github.com/Homebrew/homebrew-core/blob/53ba3c136a0743af983e8bc63b2607e8ee68c1b5/Formula/c/coursier.rb, which uses the Homebrew managed OpenJDK.
coursier/formulas/coursier is https://github.com/coursier/homebrew-formulas/blob/1ded88c56c7091f79bbcde7c979488c9796ecba9/coursier.rb, which does not appear to use the Homebrew managed OpenJDK.
As it stands, following the advice in the docs to run brew install coursier && coursier setup results in the coursier binary being managed by Homebrew, and a separate cs binary using its own JDK which is not managed by Homebrew. In particular, this means that the coursier and cs commands are not fungible since they use different JDKs.
I'm new to Scala, so I'm not sure what history is regarding this, so I'm not sure which formula is the "best" one to use, but I think it would be a lot more clear if the documentation and homepage agreed on a single one.
As of 2025-06-21, https://docs.scala-lang.org/getting-started/install-scala.html says:
On the other hand, https://scala-lang.org/download/ says:
These formulae differ in terms of which JDK they use.
coursieris https://github.com/Homebrew/homebrew-core/blob/53ba3c136a0743af983e8bc63b2607e8ee68c1b5/Formula/c/coursier.rb, which uses the Homebrew managed OpenJDK.coursier/formulas/coursieris https://github.com/coursier/homebrew-formulas/blob/1ded88c56c7091f79bbcde7c979488c9796ecba9/coursier.rb, which does not appear to use the Homebrew managed OpenJDK.As it stands, following the advice in the docs to run
brew install coursier && coursier setupresults in thecoursierbinary being managed by Homebrew, and a separatecsbinary using its own JDK which is not managed by Homebrew. In particular, this means that thecoursierandcscommands are not fungible since they use different JDKs.I'm new to Scala, so I'm not sure what history is regarding this, so I'm not sure which formula is the "best" one to use, but I think it would be a lot more clear if the documentation and homepage agreed on a single one.