-
|
Hello, lately I was playing around with Mill. My plan was to adapt the build process a bit. My idea: I wanted to limit the size of the output jar by filtering the class files needed by some classes only. Therefore, I inspected the bytecode of my class files with Apache Commons BCEL, a library I had never used before, but it seemed like a good fit to me. Strangely, my first steps using BCEL were behaving differently when I compiled it with Mill or IntelliJ. Then I tried Maven, and Maven behaved the same way as IntelliJ. I tried it using different JDK versions (Temurin) and also on my Mac... same result. I'm not so sure if Mill has really something to do with that; it's not a compiler, but I find it strange anyway: Here is my example setup using Java only: Has anyone an idea, whats the problem? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
|
Mill is using Zinc to compile Java code, by default. It should produce the same bytecode as if you would invoke the JDK compiler directly, but maybe, you found a bug? As you didn't provide a description of the actual problem, I just assume you mean the failing test case |
Beta Was this translation helpful? Give feedback.
Update: I found the problem ... maven seems to set by default a compiler flag "-g" which mill+sbt does not. I added the compiler flag manually in my build.sbt and the problem is solved (same result after fixing my build.mill file).
https://docs.oracle.com/en/java/javacard/3.1/guide/setting-java-compiler-options.html