ModuleLayer#layers() and Configuration#configurations() produces non-topological ordering
Alan Bateman
Alan.Bateman at oracle.com
Fri Jun 15 14:50:14 UTC 2018
On 15/06/2018 04:37, Luke Hutchison wrote:
> :
>
> This code represents a preorder DFS. The resulting order is *not* a
> topological sort ordering. This can lead to an ancestral layer being listed
> in the final ordering before a descendant layer. For example, consider
> these four layer -> parent relationships:
>
> A -> [ B, C ]
> B -> [ D ]
> C -> [ D ]
> D -> [ ]
>
> The ordering code as given in ModuleLayer will produce the order [ A, B, D,
> C ], causing the layers D and C to be out of order.
Multi parent configurations is a somewhat niche area but it is specified
to be DFS. If there someone in spec that has lead to you to assume the
above is incorrect? I'm just wondering if there is wording that need to
be improved or fixed somewhere.
-Alan
More information about the jigsaw-dev
mailing list