BuildGlobalContext.sources is a HashSet, which is directly populated from user's interaction with BuildAction.
This unfortunately means the order in which sources are processed is not predictable, and further the lifecycle is not explicit – when we execute build(), we really do not want to allow any sources to be added, ever.
The way this should work is that BuildAction uses a ImmutableSet.Builder, which retains insertion order, and we push the sources down when we do build().
The second part is that all of the UT infra must be updated to randomize the order in which it calls Builder.addSource(), unless explicitly requested to retain order – that way we get fuzzing in UT, while YANGTOOLS-1474 tests will request an explicit order (and thus will not have to be repeated).
- relates to
-
YANGTOOLS-1474 Fail to process augmentation with empty grouping
- Resolved