-
Type:
Enhancement
-
Resolution: Unresolved
-
Priority:
P4
-
None
-
Affects Version/s: None
-
Component/s: infrastructure
-
None
There seems to be no make target which cleans the cached build state for microbenchmakrs. I suggest clean-microbenchmark.
When a microbenchmark source file is renamed or deleted, the JMH annotation processor’s generated classes and BenchmarkList metadata survive in the build tree, causing ClassNotFoundException at runtime. The only reliable workaround is manually removing two directories:
rm -rf build/$CONF/support/test/micro build/$CONF/images/test/micro
make build-microbenchmark CONF=$CONF
An explicit target (parallel to build-microbenchmark) would make this less error-prone.
This issue might be endemic to "build-foo" targets, which have specialized make logic. The often have "install-foo" targets. Shouldn’t there be "clean" actions as well, generally speaking? Lacking them, it’s hard to reset during iterative development of a special component.
Today I noticed it with the micros, when I renamed the micro. The ghost of the old name haunted me even after I removed the source. And then the classfiles. And then the micro-jar. Something else (cached benchmark list?) was lurking. Eventually I removed enough folders to chase away the bugs.
When a microbenchmark source file is renamed or deleted, the JMH annotation processor’s generated classes and BenchmarkList metadata survive in the build tree, causing ClassNotFoundException at runtime. The only reliable workaround is manually removing two directories:
rm -rf build/$CONF/support/test/micro build/$CONF/images/test/micro
make build-microbenchmark CONF=$CONF
An explicit target (parallel to build-microbenchmark) would make this less error-prone.
This issue might be endemic to "build-foo" targets, which have specialized make logic. The often have "install-foo" targets. Shouldn’t there be "clean" actions as well, generally speaking? Lacking them, it’s hard to reset during iterative development of a special component.
Today I noticed it with the micros, when I renamed the micro. The ghost of the old name haunted me even after I removed the source. And then the classfiles. And then the micro-jar. Something else (cached benchmark list?) was lurking. Eventually I removed enough folders to chase away the bugs.