Home > Mobile >  building scala from source
building scala from source

Time:01-19

I'm trying to figure out how to build scala from a source code archive. I see a build.sbt file but if I don't have scala installed, so how to do build scala?

I also see a Gemfile, implying that there are Ruby bindings. I checked the README.md but there isn't any information there sadly.

I don't know what to do to start building.

CodePudding user response:

this tool (https://scala-cli.virtuslab.org/) will let you easily download a working scala compiler & associated tools. they, in turn, will make it possible to build a compiler from the source tree. i'm assuming you've cloned https://github.com/lampepfl/dotty (scala 3)?

CodePudding user response:

I'm assuming that you're talking about Scala 2 https://github.com/scala/scala and not Scala 3 https://github.com/lampepfl/dotty since you mentioned Gemfile (https://github.com/scala/scala/blob/2.13.x/Gemfile).

The Gemfile is for Travis CI. So you can ignore it.

If you can see build.sbt then in order to build a project you need JVM and sbt installed, not Scala

https://docs.scala-lang.org/getting-started/index.html

I checked the README.md but there isn't any information there sadly.

Actually, there is all necessary information in README:

https://github.com/scala/scala#using-the-sbt-build

  • sbt dist/mkBin generates runner scripts (scala, scalac, etc) in build/quick/bin
  • sbt dist/mkPack creates a build in the Scala distribution format in build/pack
  • Related