Vertispan / j2clmavenplugin

Maven plugin to launch new J2CL compilation
https://vertispan.github.io/j2clmavenplugin/
Apache License 2.0
53 stars 26 forks source link

gwt3BuildCache may contain duplicates with different hash (minor) #136

Open xamde opened 2 years ago

xamde commented 2 years ago

I have no details yet how to reproduce this one, but it happened. After multiple invocations of j2cl:build I have this directory structure: gwt3BuildCache\0.19-SNAPSHOT\de.xam.example.math-math-lib-0.1.0-SNAPSHOT contains

3faff01fcf435dae5718c1c698944a0f-unpack
27490c19e8c1a115494417bf531d90c9-stripped_sources
81530cd3f20bcb563b15c5898cd1fe95-stripped_sources <-- DUPE?
238d7dba27542bca440dd3b223d307e4-stripped_bytecode
3881fa2374ad5dcea9a455073d1d1ced-stripped_bytecode_headers
b1554b3195bed595c9077f939713228f-bytecode
ee1f0c6f324f3aa34eb023b4f7df2d55-bytecode <-- DUPE?
7f2aa944e56246e671a5448d52d28d54-transpiled_js
399f9ce1f6028bf0485af562cf47d4d9-transpiled_js <-- DUPE?

So it seems the unpack-phase was successfully cached and reused, but lead to two different stripped_sources. The stripped sources do not differ. Also, the code in unpack (in my case) contains no @GwtIncompatible, hence the stripped sources are the same content as the sources.

What else goes into the hash? Timestamps? For best caching it should be a pure content hash.

xamde commented 2 years ago

I suspect building at the same time from command line but also (without realizing) from IntelliJ might be a cause of this issue