Dotty: bin/dotc script always repackages dotty-interfaces

Created on 16 Jun 2016  路  5Comments  路  Source: lampepfl/dotty

It seems since commit a00a972c7425232432364bf991e118d248578f0d the dotc script doesn't correctly extract the dotty version

I would propose to use sbt for extracting the correct version. I can create a pull request for this, if desired.

bug

All 5 comments

I'd prefer not to use sbt for this, as it would add +1 sec to fastpath of compilation, increasing compilation time of hello world from 200ms to 1200ms.

How about a call to the same script that sbt uses? In scripts/build IIRC

not sure if by sed/bash foo is strong enough for this

Hi, I wanted to give dotty a try... and ran into this at the first glance.

What about defining a settings like baseVersion := 0.1 in sbt, grep this in bash and add a -* expansion to it ?

Current algorithm of how bash script works:

  1. bash script gets versions by sed\grep from build.scala;
  2. bash script discovers build artifacts in /target using the versions discovered at previous step;
  3. bash script checks if there are any files newer than build artifact and triggers rebuild if they are found;
  4. bash script runs java with correct classpath setup.

Proposed new algorithm:

  1. bash script checks for existance of file dotty/.versions, if it does not exists it runs sbt package;
  2. we make sbt output a file dotty/.packages containing full path to all packaged artifacts(in any format easily parsable in bash);
  3. bash script checks if there are any files newer than .version and triggers rebuild if they are found;
  4. bash script runs java with correct classpath setup

Advantages of new algorithm:

  • no need to parse build files by hand;
  • no need to change build file if we start packaging more artifacts.
Was this page helpful?
0 / 5 - 0 ratings