sbt-assembly
sbt-assembly copied to clipboard
shading appears to mess with application.conf / reference.conf
I tried to shade Akka as well, and it appears that, in addition to the test in assembly issue, it also seems to mess with application.conf. In the stack trace below, Akka's init system is looking for a root config key of "sjs", because I had a rule to rename "akka.**" to "sjs.akka.@1".
Exception in thread "main" com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'sjs'
at com.typesafe.config.impl.SimpleConfig.findKey(SimpleConfig.java:124)
at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:147)
at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:159)
at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:164)
at com.typesafe.config.impl.SimpleConfig.getString(SimpleConfig.java:206)
at sjs.akka.actor.ActorSystem$Settings.<init>(ActorSystem.scala:168)
at sjs.akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:504)
at sjs.akka.actor.ActorSystem$.apply(ActorSystem.scala:141)
at sjs.akka.actor.ActorSystem$.apply(ActorSystem.scala:118)
at spark.jobserver.JobServer$$anonfun$main$1.apply(JobServer.scala:121)
Unfortunately I removed the commit from the PR because of this issue, the jar would not run. Perhaps the shader is too aggressive in changing strings also?
Hi velvia,
According to the doc of jarjar, it indeed changes string literals referencing class names ("moving resource files and transforming string literals").
I think that renaming the whole akka package is calling for trouble anyway. Unfortunately, renaming just the usual entry point into Akka, with is ActorSystem, doesn't work either (see #205)
I'm experiencing the same issue. I feel the need the shade akka to integrate it with flink 1.3.2 (although I know that the new flink 1.4.0 already incorporates the real akka 1.4.0).
I guess the solution would be to also "shade" programmatically the configuration keys. Is this in any way possible?