Review Request: JDK-8174826 jlink does not provide support for linking in service provider modules

Mandy Chung mandy.chung at oracle.com
Thu Mar 23 18:07:21 UTC 2017


> On Mar 23, 2017, at 10:47 AM, Andrey Nazarov <andrey.x.nazarov at oracle.com> wrote:
> 
> Hi Mandy,
> 
> TaskHelper.java, JLinkTest and IntegrationTest need new copyright year.
> It’s unclear why do you need concept of “terminal” option
> 

It’s a low risk and expedient way to support options with optional argument (-—suggest-providers) until jlink command-line processing has to be enhanced to support optional argument.  

> Instead of "copy-paste" code to run Jlink in tests ProcessTools and OutputAnalyzer can be used from standard test library test/lib/share/classes/jdk/test/lib/process
> 

I agree that it’d be good to move it to a test library but this does not need to be the general one since it’s jlink-specific.  jlink has a test library under jdk/tests/tools/lib/tests that needs big cleanup.  At some point we should look at all jlink tests and see what makes sense. 

For these new tests, I can move the helper class to jdk/tests/tools/lib/tests. 

Mandy

> 
> —Andrey
> 
>> On 22 Mar 2017, at 22:11, Mandy Chung <mandy.chung at oracle.com> wrote:
>> 
>> Webrev:
>> http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8174826/webrev.00/
>> 
>> This is a proposal to resolve the open issue listed in JEP 282
>> about jlink and service binding.
>> 
>> jlink does not do service binding by default as it may be confusing
>> to the users. To link in service providers, users have to determine
>> the provider modules to be added at link time.
>> 
>> The proposal is to continue not to do service binding by default
>> since full service binding may possibly cause many modules to be
>> linked in, which would surprise many users.  Provide the following
>> jlink options to make it easier to cope with services when linking:
>> 
>> $ jlink --help
>> :
>>  --bind-services                   Do full service binding
>> 
>>  --suggest-providers [<name>,...]  Suggest providers of services used by
>>                                    the modules that would be linked, or
>>                                    of the given service types
>> 
>> -v, --verbose                         Enable verbose tracing
>> 
>> Some sample output that will show with and without —-bind-services
>> http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8174826/jlink.verbose.txt
>> http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8174826/jlink.suggested.providers.txt
>> - The providers are sorted by the service type name and then the 
>> provider's module name.
>> 
>> When —-bind-services is specified with —-suggest-providers, no
>> additional provider will be suggested.
>> 
>> Thanks
>> Mandy
> 



More information about the jigsaw-dev mailing list