You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So far I've been able to pretty easily reproduce this on Java 8 (OpenJDK Runtime Environment (Temurin)(build 1.8.0_432-b06)) and less likely but still reproducible on Java 11 (OpenJDK Runtime Environment Temurin-11.0.25+9 (build 11.0.25+9)) and so far not at all on Java 21. Not sure if this is a Java version issue, or some versions just make it more/less likely for some reason.
An example of a diff usually start with something like this:
It looks like however xjc outputs attribute groups, it outputs their generated comments, members, and methods in a random order, instead of the order they are defined in the schema. This doesn't technically affect anything since the the order of attribute groups and their members/functions don't matter, but it does mean the compiled .class files have members/methods in a different order, which leads to non-reproducibility.
The text was updated successfully, but these errors were encountered:
So unlikely we are doing something wrong, but unfortunately there may not be an easy workaround. Maybe there's a linter or something that we can post process the generated xjc files to sort the methods and members?
Another option, it might be the case that all the incorrectly generated classes are related to objects that represent embedded schemas (DFDLChoiceType, DFDLElementTYpe, DFDLGroupType, SimpleType, etc). We probably don't need those objects at all. If we JAXB sources could treat the contents of <tdml:defineSchema> as an opaque blob of XML, then that might avoid the issue by just not generating things like DFDLChoiceType. We potentially have the issue with TDML related objects, but maybe it uses attributeGroups in a way that leads to deterministic output.
Steps to reproduce:
Repeat lines 3 and 4 until it shows a diff.
So far I've been able to pretty easily reproduce this on Java 8 (
OpenJDK Runtime Environment (Temurin)(build 1.8.0_432-b06)
) and less likely but still reproducible on Java 11 (OpenJDK Runtime Environment Temurin-11.0.25+9 (build 11.0.25+9)
) and so far not at all on Java 21. Not sure if this is a Java version issue, or some versions just make it more/less likely for some reason.An example of a diff usually start with something like this:
It's always related to attribute groups.
It looks like however xjc outputs attribute groups, it outputs their generated comments, members, and methods in a random order, instead of the order they are defined in the schema. This doesn't technically affect anything since the the order of attribute groups and their members/functions don't matter, but it does mean the compiled .class files have members/methods in a different order, which leads to non-reproducibility.
The text was updated successfully, but these errors were encountered: