вівторок, 27 липня 2010 р.

JSR 45 : WTF, where my smap info ?

Design of JSR-45 supports usage of source-information in generated java bytecode, but not in generated sources. When most of java frameworks are over-designed, this is under-designed. Trivial case: producing of java source which is processed by standard javac, does not covered at all. This cause not only need of extra tool to install SMAP, but more painful issues: errors in generated java file does not handled by javac correctly. Therefore if you using tools, which generate plain java files (like javacc or our jpe), you still need look at generated source codes. Possible workaround: create a tool, which run javac, then substitute source files and line-numbers in javac error message using preprocessor-generated smap files.

Немає коментарів: