scala-cli
scala-cli copied to clipboard
Bloop doesn't "unload" compiler plugins
When enabling Scala.JS or Scala Native, it seems bloop doesn't disable them if we don't enable them later on:
$ rm -rf examples/utest/.scala utest-j*.jar
$ /mill -i cli.run package examples/utest --library -o utest-jvm.jar
$ unzip -l utest-jvm.jar
Archive: utest-jvm.jar
Length Date Time Name
--------- ---------- ----- ----
25 06-10-2021 16:51 META-INF/MANIFEST.MF
1338 06-10-2021 16:51 MyTests.class
3912 06-10-2021 16:51 MyTests$.class
--------- -------
5275 3 files
$ ./mill -i cli.run package examples/utest --library -o utest-js.jar --js
$ unzip -l utest-js.jar
Archive: utest-js.jar
Length Date Time Name
--------- ---------- ----- ----
25 06-10-2021 16:58 META-INF/MANIFEST.MF
1338 06-10-2021 16:58 MyTests.class
1067 06-10-2021 16:58 MyTests.sjsir
3441 06-10-2021 16:58 MyTests$.sjsir
3912 06-10-2021 16:58 MyTests$.class
--------- -------
9783 5 files
$ ./mill -i cli.run package examples/utest -o utest-native.jar --native --library
$ unzip -l utest-native.jar
Archive: utest-native.jar
Length Date Time Name
--------- ---------- ----- ----
25 06-10-2021 16:59 META-INF/MANIFEST.MF
1338 06-10-2021 16:59 MyTests.class
1067 06-10-2021 16:58 MyTests.sjsir
3441 06-10-2021 16:58 MyTests$.sjsir
3912 06-10-2021 16:59 MyTests$.class
15987 06-10-2021 16:59 MyTests$.nir
1596 06-10-2021 16:59 MyTests$$$Lambda$4.nir
1599 06-10-2021 16:59 MyTests$$$Lambda$5.nir
1906 06-10-2021 16:59 MyTests$$$Lambda$1.nir
1906 06-10-2021 16:59 MyTests$$$Lambda$2.nir
1182 06-10-2021 16:59 MyTests$$SN$ReflectivelyInstantiate$.nir
1596 06-10-2021 16:59 MyTests$$$Lambda$3.nir
--------- -------
35555 12 files
$ ./mill -i cli.run package examples/utest --library -o utest-jvm-after-js-and-native.jar
$ unzip -l utest-jvm-after-js-and-native.jar
Archive: utest-jvm-after-js-and-native.jar
Length Date Time Name
--------- ---------- ----- ----
25 06-10-2021 17:01 META-INF/MANIFEST.MF
1338 06-10-2021 17:01 MyTests.class
1067 06-10-2021 16:58 MyTests.sjsir
3441 06-10-2021 16:58 MyTests$.sjsir
3912 06-10-2021 17:01 MyTests$.class
15987 06-10-2021 16:59 MyTests$.nir
1596 06-10-2021 16:59 MyTests$$$Lambda$4.nir
1599 06-10-2021 16:59 MyTests$$$Lambda$5.nir
1906 06-10-2021 16:59 MyTests$$$Lambda$1.nir
1906 06-10-2021 16:59 MyTests$$$Lambda$2.nir
1182 06-10-2021 16:59 MyTests$$SN$ReflectivelyInstantiate$.nir
1596 06-10-2021 16:59 MyTests$$$Lambda$3.nir
--------- -------
35555 12 files
That's in spite of scala clearing the class output directory before each run. (bloop seems to copy the .sjsir and .nir files from its internal class directory).