renaissance icon indicating copy to clipboard operation
renaissance copied to clipboard

JMH version doesnt build some time after rev e895d544ee7ddbd14caf975072fd51717224b509

Open ericcaspole opened this issue 5 years ago • 6 comments

Building the JMH version today gives an error:

$ tools/sbt/bin/sbt clean renaissanceJmh/jmh:assembly
...

[error] Caused by: java.lang.ClassNotFoundException: org.renaissance.dummy.Jmh_Dummy
[error] 	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
[error] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
...
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[error] 	at java.lang.Thread.run(Thread.java:748)
[error] (renaissanceJmh / Jmh / generateJmhSourcesAndResources) java.lang.NoClassDefFoundError: org/renaissance/dummy/Jmh_Dummy
[error] Total time: 203 s, completed Jul 15, 2019 4:01:09 PM

@tkrodriguez mentioned he also sees this error while building. Thanks, Eric

ericcaspole avatar Jul 15 '19 20:07 ericcaspole

Thanks @ericcaspole for the report. To avoid this to break again, we should add a Travis check that bundles the jmh jar and runs at least one iteration of one benchmark.

farquet avatar Jul 15 '19 20:07 farquet

Odd, we added a full JMH build to the CI, which also runs all the benchmarks. We should check what went wrong (on the plane atm).

axel22 avatar Jul 15 '19 20:07 axel22

@vhotspur could you look into it ? It may be related to the extra dummy benchmarks.

farquet avatar Jul 15 '19 20:07 farquet

JMH build seemed to have passed in the CI:

https://travis-ci.org/renaissance-benchmarks/renaissance/jobs/558938074#L537

axel22 avatar Jul 15 '19 23:07 axel22

I think this is a problem with the clean build target not cleaning up everything. If I purge my files using git clean -dxf . then my build works. Looking at the files that were left behind, It seems like the clean target doesn't clean up renaissance-jmh. It appears you have to do both clean and renaissanceJmh/jmh:clean to actually clean up after renaissanceJmh/jmh:assembly, which I guess makes sense, though it's odd that those 2 clean targets are completely independent.

tkrodriguez avatar Jul 16 '19 03:07 tkrodriguez

I am unable to reproduce this on a clean clone. From the error message I suspect this is because the clean target does not really clean everything (#137) and there was a file rename after e895d544ee7ddbd14caf975072fd51717224b509. So I think that SBT had a class file from previous run without a source file and still tried to recompile it?

As far as I can see, the only solution is to properly setup the clean command in SBT.

vhotspur avatar Jul 16 '19 07:07 vhotspur

Closing this issue as SBT underwent a major overhaul and this is probably already fixed/non-reproducible.

vhotspur avatar Dec 14 '23 20:12 vhotspur