No isolation was: Minor incompatible changes

Jesse Glick jesse.glick at oracle.com
Wed Jan 4 08:01:23 PST 2012


On 01/04/2012 04:13 AM, Jaroslav Tulach wrote:
> If Jigsaw decides to support no isolation [...] it means that every usage of a module is
> counted as re-export [...]. Sort of like saying that every
> class name in the system should represent unique class.

Exactly. And while I appreciate the sentiment of trying to solve the 90% use case by omitting support for more advanced scenarios - parallel loading of an older module 
version - that design decision seems to clash with the requirement of automatically resolving a valid configuration out of a multiversion repository.

> Singleton module maps to module which every other module with dependency on it "re-exports"

Yes, you can handle it this way and keep the resolver simple. I am still unsure what effect this will have on scenarios like my java.awt <- java.beans example, assuming 
java.awt is a singleton. (Again I am not _advocating_ an incompatible change in java.awt, but such minor API cleanups are common in the field and the system needs to be 
robust in the face of them.) Say

singleton module java.awt @ 1.8 {
  // has java.awt.List.delItems(int,int)
}
singleton module java.awt @ 2.0 {
   // java.awt.List no longer has delItems(int,int)
}
module java.beans @ 1.8 {
   // java.awt.Component in public API, but optional, so:
   requires optional java.awt @ [1.8,2);
}
module java.beans @ 1.8.3 {
   // did not use delItems, so give a lax dep
   requires optional java.awt @ [1.8,3);
}
module webserver @ 1 {
   // does not use java.awt in any way
   requires java.beans @ [1.8,2);
}
module webserver @ 2 {
   // routine dep upgrade
   requires java.beans @ [1.8.3,2);
}
module sheet @ 1 {
   requires java.beans @ [1.8,2);
   // really uses java.beans.PropertyEditor.getCustomEditor()
   requires java.awt @ [1.8,2);
}
module sheet @ 2 {
   // routine dep upgrade
   requires java.beans @ [1.8.3,2);
   // did not use delItems
   requires java.awt @ [1.8,3);
}
module app @ 1 {
   // remote access
   requires webserver @ 1;
   // admin GUI
   requires sheet @ 2;
}

Clearly sheet at 2 should be fine, and sheet at 1 is out of luck. webserver at 2 should be fine; but what about app at 1? Will java.awt at 2.0 be used, or java.awt at 1.8, or will the 
system complain about a spurious conflict?



More information about the jigsaw-dev mailing list