Proguard 在 Scala 代码上崩溃,具体取决于 Multiverse STM
我正在尝试优化一些依赖于带有 Proguard 的 Multiverse STM (0.6.2) 的 Scala 代码。我将 STM 与 akka 结合使用。当我尝试这样做时,出现以下错误:
Unexpected error while inlining subroutines:
Class = [org/multiverse/transactional/refs/BasicRef]
Method = [<init>()V]
Exception = [java.lang.ArrayIndexOutOfBoundsException] (-1)
我正在使用以下标志进行优化:
-forceprocessing
-libraryjars ${java.home}/lib/rt.jar
-injars ${jar.name}
-outjars ${jar.opt.name}
-dontobfuscate
-dontnote
-dontwarn
-ignorewarnings
-keepattributes
-keepclasseswithmembers public class * {
public static void main(java.lang.String[]);
}
您知道此问题的解决方法吗(除了明显的 -dontoptimize 之外)?
提前致谢!
I'm trying to optimize some Scala code which relies on the Multiverse STM (0.6.2) with Proguard. I'm using the STM in conjunction with akka. As I try to do so, I get the following error:
Unexpected error while inlining subroutines:
Class = [org/multiverse/transactional/refs/BasicRef]
Method = [<init>()V]
Exception = [java.lang.ArrayIndexOutOfBoundsException] (-1)
I'm optimizing with the following flags:
-forceprocessing
-libraryjars ${java.home}/lib/rt.jar
-injars ${jar.name}
-outjars ${jar.opt.name}
-dontobfuscate
-dontnote
-dontwarn
-ignorewarnings
-keepattributes
-keepclasseswithmembers public class * {
public static void main(java.lang.String[]);
}
Do you know of a workaround for this problem (besides the obvious -dontoptimize)?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 proguard 上花费了更多时间试图解决同样的问题后,我切换到了 one-jar ( https:// github.com/retronym/sbt-onejar )并且第一次就成功了。我建议除非您需要 proguard 中的某些特定内容(收缩、字节码混淆),否则只需使用 one-jar。
每当我必须配置 proguard 时,我都会发现自己陷入了一场战斗。通常,在配置 sbt 时,我也会发现自己陷入了一场战斗。把它们放在一起就会引发麻烦。
祝你好运。
-安迪
After losing even more hours on proguard trying to fix this same problem, I switched to one-jar ( https://github.com/retronym/sbt-onejar ) and poof it worked first time. I suggest that unless there is something specific that you need from proguard ( shrinkage, bytecode obfuscation ) just use one-jar.
Anytime I have to configure proguard I find myself in a battle. Often when configuring sbt I also find myself in a battle. Put them together and it's a recipe for trouble.
Good luck.
-Andy