cvogt / cbt

CBT - fun, fast, intuitive, compositional, statically checked builds written in Scala
Other
489 stars 60 forks source link

building dotty with cbt #281

Open cvogt opened 7 years ago

cvogt commented 7 years ago

battle testing CBT by bootstrapping Dotty with CBT.

https://github.com/dotty-staging/dotty/blob/topic/restructure-attempt2/project/Build.scala#L213

felixmulder commented 7 years ago

Binaries to be released from project:

So for the bootstrap (COMP == scalac):

  1. Compile dotty-library with COMP
  2. Compile dotty-compiler w COMP depending on (1 and scala-library-2.11.5)
  3. Compile dotty-library w 2 (with scala-library-2.11.5 as only dep, no compiler on cp!)
  4. Compile dotty-compiler w 2 (with 3 and scala-librar-2.11.5 on cp, no compiler on cp!)

Once we snip the cord from scalac and release only bootstrapped versions, then COMP becomes the previous released compiler.

felixmulder commented 7 years ago

One thing to note is that currently the dotty compiler does weird things with the classpath that it takes from bootclasspath, i.e. it will currently automatically put its running classpath on the classpath of what is being compiled. This is bad and needs to go away asap.

cvogt commented 7 years ago

this merged PR now allows providing a custom Dotty compiler, which is necessary for bootstrapping: https://github.com/cvogt/cbt/pull/333

cvogt commented 7 years ago

PR that bootstraps Dotty is open in dotty-staging: https://github.com/lampepfl/dotty/pull/1964