[modules-dev] Review request for 6605077, "jrepo dependencies"

Dave Bristor David.Bristor at Sun.COM
Tue Jul 8 18:31:02 PDT 2008


Hi folks,

This work adds a "dependencies" command to jrepo, which will show, via 
indentation, all the dependencies of a module.

http://bugs.sun.com/view_bug.do?bug_id=6605077
http://webrev.invokedynamic.info/bristor/6605077-01/

For example, here's the output from one of the testcases:

m1-1.1
     java.se-1.7
     m2-0.0-default
         java.se-1.7
         m4-1.6
             java.se-1.7
     m3-2.0
         java.se-1.7
         m4-1.6

That is, m1-1.1 depends on java.se-1.7, m2-0.0-default, and m3-2.0.  Cycles 
are handled.  The output does not include the imports of java.se; that is 
possible if one uses the '-j' flag.  The '-v' flag causes the source location 
of the containing repository to be printed.  With -j and -v, the above becomes:

ependencies for m1-1.1:
m1-1.1 
file:/java/tl/libs/bristor/ws/jrepo/jdk/test/java/module/modinit/tmp_mtest/version/version3.mtest/
     java.se-1.7 bootstrap
         java.se.core-1.7 bootstrap
         corba-3.0 bootstrap
             java.se.core-1.7 bootstrap
         javax.xml-1.4 bootstrap
             java.se.core-1.7 bootstrap
         javax.xml.bind-2.0 bootstrap
             java.se.core-1.7 bootstrap
         javax.xml.ws-2.0 bootstrap
             java.se.core-1.7 bootstrap
         javax.xml.soap-1.3 bootstrap
             java.se.core-1.7 bootstrap
         javax.annotation-1.0 bootstrap
             java.se.core-1.7 bootstrap
         javax.annotation.processing-1.0 bootstrap
             java.se.core-1.7 bootstrap
         javax.script-1.0 bootstrap
             java.se.core-1.7 bootstrap
         javax.tools-1.0 bootstrap
             java.se.core-1.7 bootstrap
     m2-0.0-default 
file:/java/tl/libs/bristor/ws/jrepo/jdk/test/java/module/modinit/tmp_mtest/version/version3.mtest/
         java.se-1.7 bootstrap
         m4-1.6 
file:/java/tl/libs/bristor/ws/jrepo/jdk/test/java/module/modinit/tmp_mtest/version/version3.mtest/
             java.se-1.7 bootstrap
     m3-2.0 
file:/java/tl/libs/bristor/ws/jrepo/jdk/test/java/module/modinit/tmp_mtest/version/version3.mtest/
         java.se-1.7 bootstrap
         m4-1.6 
file:/java/tl/libs/bristor/ws/jrepo/jdk/test/java/module/modinit/tmp_mtest/version/version3.mtest/

(That output might not paginate well in email; the source locations are on the 
same lines as the module names.)

The testing approach is to leverage RunMTest.  I've modified it to allow us to 
specify exactly what it means to "run a test".  By default, it uses the 
currently-checked-in behavior.  For testing "jrepo dependencies", it uses a 
different behavior; see JRepoDependenciesTest.MyFactory and 
JRepoDependenciesTest.MyTestDescription.

The testing is fairly simple, just comparing known-good output with what is 
generated on a test run.  I hope that one day SQE can do better ;-)

Unrelated, but there's fix to a typo in sun/module/repository/URLModuleInfo.java.

I have not yet integrated the latest API changes.  But neither have I seen a 
JPRT run on that integration, nor on the ServiceLoader changes I pushed 
yesterday.  Is our auto-JPRT script running?

Thanks,
	Dave



More information about the modules-dev mailing list