Set a Max Length on Class Names of a Dependency?

19 views
Skip to first unread message

Kevin Meredith

unread,
Oct 10, 2015, 11:09:10 PM10/10/15
to scala-user
I'm using the https://github.com/sbt/sbt-assembly SBT plug-in to deploy a fat JAR.

I modified my project's build.sbt to limit the max length of a class's name:

 "-Xmax-classfile-name", "75"


Then, I run `sbt assembly` to get the fat JAR.


After unzipping its contents, I find that a few class names' lengths exceed 255:


$cd explodedJar

$find . -type f | awk 'length>255' | wc -l

9


Is it possible to set the maximum length of all of a project's and its dependencies' file names?


As I observed, the above demonstration showed that the -Xmax-classfile-name scalac flag only limits a project's class names' lengths, not its dependencies too.

Reply all
Reply to author
Forward
0 new messages