Bug #1491
Every Java-Re-compile must lead to new Java component revision
Start date:
29.08.2013
Due date:
% Done:
0%
Estimated time:
origin:
Description
Problem¶
Currently there are two ways recompiles are triggered without updating the component revision:
- due to updated includes
- due to updated dependency components.
The side effect of these are problematic:
- compiled resources may be used by several z2 processes (incl. embedded in hadoop for example).
- jar caches (intentional / unintentional) stop functioning, once the files get overwritten without eviction from the cache
- on windows, overwrite due to the previous bullet point may even be prohibited.
Suggestion¶
This is not actually about the revision (which is compiled from the repository and can be introspected regardless of the component type), but rather about making sure we have cleanly separated gen generations. So here is the proposal:
- We introduce an instance concept: At startup a z2 home or an embedded z2 determines an instance number of 00 to 99 and locks it for as long as the process is up.
- This is the instance number of the z2 runtime and can be used as an additional runtime separating dimension
- For Java component resources this is used as follows:
- We leave the original resource folder for the revision untouched. The build process
prepares an instance specific resource folder as sibling to the original resource
folder. I.e. rev A has an instance folder A_00 and so on. - The "runtime resources" folder holds a copy of all original resources and may subsequently be modified by the compilation process.
- The "runtime resources" folder is available from the IJavaComponent API.
- We leave the original resource folder for the revision untouched. The build process
Doing these changes has some non-trivial impact on all tools that access java component generation resources. To this end, enhance the IJavaComponent to provide the latest gen generation folder.
Updates required in:
- JarRetriever
- Distribution Exporter
- Eclipsoid
Related issues
Updated by Henning Blohm over 11 years ago
- Subject changed from Java includes broken to Java include handling broken
Updated by Henning Blohm over 11 years ago
- Subject changed from Java include handling broken to Every Java-Re-compile must lead to new Java component revision
Updated by Henning Blohm over 10 years ago
- Target version changed from 2.3 to 3.0 - Experimental/Retired
Updated by Henning Blohm over 6 years ago
- Target version changed from 3.0 - Experimental/Retired to 2.7