Aliases
Paul Sandoz
paul.sandoz at oracle.com
Mon Sep 10 04:50:53 PDT 2012
I got the syntax wrong in my examples:
s/alias/provides
On Sep 10, 2012, at 12:44 PM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> On 10/09/2012 09:16, Paul Sandoz wrote:
>> Hi,
>>
>> Aliases, unlike views, currently have version numbers that can be independent of the version of the module itself.
>>
> The syntax does currently allow it but it's an open issue as to whether aliases will have them or not. Personally I think it will be needed for refactoring but it is problematic in that it's unlikely to map well to native packaging systems.
>
OK, as per http://cr.openjdk.java.net/~mr/jigsaw/notes/jigsaw-big-picture-01:
ISSUE: Should aliases have version numbers? The syntax currently allows them. They appear to be necessary to support refactoring by aggregation. In popular native packaging systems, however, the natural mapping of a module alias is to a virtual package, and virtual packages don’t have version numbers.
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.
More information about the jigsaw-dev
mailing list