2

I noticed that when I updated xtend from 1.20 to 2.0, the .class file is significantly larger. One difference I saw is that there are debug information in the .class files which I do not really care for. There is also an additional entry in the .class file called SMAP.

I am using the MWE2 Workflow to generate the .class files. Is there a way to disable this?

chris yo
  • 1,187
  • 4
  • 13
  • 30
  • Is there a specific reason that you want to get rid of it? – JonK Jun 09 '15 at 08:09
  • How much time is it worth spending on this? If you are going to upgrade, perhaps you should be using Java 8 as Java 7 is End Of Public Updates. – Peter Lawrey Jun 09 '15 at 08:17

2 Answers2

4

You can compile with javac's -g:none parameter to generate no debugging information. This should also prevent Source Map from being generated.

Kayaman
  • 72,141
  • 5
  • 83
  • 121
0

Xtend 2.x is compiled to Java source code where Xtend 1.x was an interpreted language. Compiling to Java has the advantage of a significant performance improvement at runtime and seemless integration with other JVM languages. To allow debugging Xtend, SMAP information is installed into the bytecode, too. With that you can choose if you want to debug the generated Java sources or directly the Xtend code. If you focussing on smaller class files for some reason, you may want to install Xtend as the primary source information. This will remove the Java debug information and only keep a small portion of Xtend debug info. You may also want to remove all the synthetic local variables from the class files. Check you Eclipse compiler settings under Xtend -> compiler.

Sebastian Zarnekow
  • 6,609
  • 20
  • 23
  • how can I install xtend as the primary source information? my settings under xtend -> compiler -> ignore generated Java source when debugging is unticked. Hide synthetic local variables in the debugger is ticked but this is in gray (disabled). – chris yo Jun 10 '15 at 09:13
  • Ignore generated Java source has to be selected. Hiding synth vars is only possible if you ignore the java sources while debugging – Sebastian Zarnekow Jun 10 '15 at 13:11