File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed
compiler/src/dotty/tools/dotc/fromtasty Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -37,19 +37,19 @@ object Debug {
3737 val fromTastyOut = Files .createDirectory(tmpOut.resolve(" from-tasty" ))
3838
3939 val extensions = List (" tasty" , " hasTasty" ).map(_.toLowerCase)
40- val classes = Directory (fromSourcesOut).walk.filter(x => x.isFile && extensions.exists(_ == x.extension.toLowerCase)).map { x =>
41- val source = x.toString
42- // transform foo/bar/Baz.hasTasty into foo.bar.Baz
43- source.substring(fromSourcesOut.toString.length + 1 , source.length - x.extension.length - 1 ).replace( '/' , '.' )
44- } .toList
40+ val tastyFiles =
41+ Directory (fromSourcesOut).walk
42+ .filter(x => x.isFile && extensions.exists(_ == x.extension.toLowerCase))
43+ .map(_.toString )
44+ .toList
4545
4646 val fromTastyArgs =
4747 " -from-tasty" ::
4848 " -d" :: fromTastyOut.toString ::
4949 insertClasspathInArgs(args.filterNot(_.endsWith(" .scala" )).toList, fromSourcesOut.toString) :::
50- classes
50+ tastyFiles
5151
52- println(" Compiling TASTY from .class sources" )
52+ println(" Compiling from .tasty sources" )
5353 val compilation2 = dotc.Main .process(fromTastyArgs.toArray)
5454
5555 if (compilation2.hasErrors) {
@@ -58,6 +58,8 @@ object Debug {
5858 // In this case we do not delete the generated class files to allow further debugging.
5959 // For example `dotc -decompile` on one of the intermediate class files.
6060 sys.exit(1 )
61+ } else {
62+ println(" Recompilation successful" )
6163 }
6264
6365 Directory (tmpOut).deleteRecursively()
Original file line number Diff line number Diff line change @@ -48,6 +48,9 @@ rm $OUT/A.scala
4848" $SBT " " scalac -classpath $OUT1 -d $OUT1 $OUT /B.scala" > " $tmp " 2>&1 || echo " ok"
4949grep -qe " B.scala:2:7" " $tmp "
5050
51+ echo " testing -Ythrough-tasty"
52+ clear_out " $OUT "
53+ " $SBT " " ;scalac -Ythrough-tasty $SOURCE "
5154
5255# # Disabled because of flakeyness, should be changed to not depend on sbt
5356# echo "running Vulpix meta test"
You can’t perform that action at this time.
0 commit comments