jmod: RFE: incremental update

Jonathan Gibbons jonathan.gibbons at oracle.com
Thu May 20 15:26:43 PDT 2010


It would be nice to have a way to update a module in a library "if 
necessary".

For example, if I run
     jmod install HelloWorld.jmod
     jmod install HelloWorld.jmod

then it would be nice if the second occurrence was as close to a no-op 
as possible.

This mode of operation will be somewhat expected if and when we wrap 
jmod in an Ant task: in Ant, it is generally the task's responsibility 
to optimize away and redundant operations.

However, if we decide (for whatever reason) not to add that behavior 
into jmod, there is no way we can simulate the behavior externally. 
There does not currently appear to be a way to query jmod to ask "is 
this module file up to date?".  Thus, at the end of a build, the only 
way to ensure a library is up to date is to re-install all the modules, 
every time.

Note the same is /not/ true of jpkg, since the output of jpkg is a 
single file, and so it is possible to compare the time stamp of that 
file against the time stamps of any input files. Thus, although it is 
somewhat clumsy, you can use the Ant <uptodate> task to determine 
whether you need to run jpkg or not.  (I hope that in time we will wrap 
jpkg in an Ant task, and render the need for an explicit use of 
<uptodate> unnecessary.)

This sort of feature is going to become increasingly important as 
developers get to play with jigsaw-jdk, and expect fast incremental 
build times.

-- Jon





More information about the jigsaw-dev mailing list