Actions
Architecture #11781
closedsealerate should be scoped "provided"
Status:
Released
Priority:
N/A
Assignee:
Category:
Architecture - Dependencies
Target version:
Fix check:
Regression:
Description
I just tested with the following source:
object Main { def main(args: Array[String]): Unit = { println(s"Hello! Direction are: ${Direction.values.map(_.name).mkString(",")}") } sealed trait Direction { def name: String } object Direction { final case object East extends Direction { val name = "Est" } final case object South extends Direction { val name = "Sud" } final case object West extends Direction { val name = "Ouest" } final case object North extends Direction { val name = "Nord" } def values = ca.mrvisser.sealerate.values[Direction] } }
And the runtime exec is the same, but with a BIG difference in package size:
% mvn package -q % ls -lah target ... -rw-r--r-- 1 fanf fanf 5.1M Nov 24 14:56 test-0.0.1-SNAPSHOT-jar-with-dependencies.jar % java -jar target/test-0.0.1-SNAPSHOT-jar-with-dependencies.jar Hello! Direction are: Est,Sud,Ouest,Nord % sed -i -e "s/provided/compile/" pom.xml % mvn clean package -q % ls -lah target ... -rw-r--r-- 1 fanf fanf 19M Nov 24 14:57 test-0.0.1-SNAPSHOT-jar-with-dependencies.jar % java -jar target/test-0.0.1-SNAPSHOT-jar-with-dependencies.jar Hello! Direction are: Est,Sud,Ouest,Nord
This is normal, as sealerate is just a compile time macro. But it hold a "compile" dependency toward scala-reflect/compiler, which accounts for ~12Mo.
We won't get the size reduction until all transitive dep toward scala-compiler are removed, but this one is a easy one to break.
Updated by François ARMAND almost 7 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Vincent MEMBRÉ
- Pull Request set to https://github.com/Normation/rudder-parent-pom/pull/49
Updated by François ARMAND almost 7 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset parent-pom|d89203df66f08f3aca484c1405e550948664bb2d.
Updated by Vincent MEMBRÉ almost 7 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 4.1.9 and 4.2.3 which were released today.
- 4.1.9: Announce Changelog
- 4.2.3: Announce Changelog
- Download: https://www.rudder-project.org/site/get-rudder/downloads/
Actions