Aliases

Paul Sandoz paul.sandoz at oracle.com
Mon Sep 10 08:05:06 PDT 2012


On Sep 10, 2012, at 4:15 PM, Alan Bateman <Alan.Bateman at oracle.com> wrote:

> On 10/09/2012 12:50, Paul Sandoz wrote:
>> :
>> 
>> 
>> I don't grok the virtual packaging stuff, but aggregation makes sense:
>> 
>> module x at 1 {
>> }
>> 
>> module y at 2 {
>> }
>> 
>> module z at 3 {
>> }
>> 
>> Aggregate:
>> 
>> module agg at 1 {
>>   provides x at 1;
>>   provides y at 2;
>>   provides z at 3;
>> }
>> 
>> There by implying range of the alias version should to be taken into account. Hmm... that complicates matters :-)
>> 
>> I wonder if the following constraint should apply:
>> 
>> Given modules x at 1 and x at 2, then any aliases declared in x at 1 must have versions less than or equal to corresponding aliases, if any, declared in x at 2.
>> 
>> Paul.
> I think aliases having versions will be complicated. It also implies a policy or someway of dealing with the possibility that there is more than one module that provides x at 1 (that policy may be like what we have now which is to disallow more than one).
> 

Yes, perhaps even a pre-filtering step.


> For purposes of the resolver maybe it could be treated as:
> 
> agg at 1 => x at 1, y at 2, z at 3
> 
> x at 1 => agg at 1
> 
> y at 2 => agg at 1
> 
> z at 3 => agg at 1
> 

I have found that the latter is sufficient alias => module (same for views). The slightly tricky bit is the handling of the version ranges to optimise for a lower or upper bound.

Paul.


More information about the jigsaw-dev mailing list