stevedlawrence opened a new issue, #1142:
URL: https://github.com/apache/daffodil-vscode/issues/1142
Steps to reproduce:
```base
sbt clean resources xjc
cp -R debugger/target/scala-2.12/src_managed_cxf/ /tmp
sbt clean resources xjc
diff -rq debugger/target/scala-2.12/src_managed_cxf/ /tmp/src_managed_cxf
```
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:
```diff
diff -Naur
debugger/target/scala-2.12/src_managed_cxf/org/apache/daffodil/tdml/DFDLBaseType.java
/tmp/src_managed_cxf/org/apache/daffodil/tdml/DFDLBaseType.java
---
debugger/target/scala-2.12/src_managed_cxf/org/apache/daffodil/tdml/DFDLBaseType.java
2024-12-06 10:09:30.318167823 -0500
+++ /tmp/src_managed_cxf/org/apache/daffodil/tdml/DFDLBaseType.java
2024-12-06 10:09:16.896018288 -0500
@@ -24,10 +24,10 @@
* <extension base="{http://www.ogf.org/dfdl/dfdl-1.0/}DFDLType">
* <sequence>
* </sequence>
- * <attGroup ref="{http://www.ogf.org/dfdl/dfdl-1.0/}MarkupAG"/>
- * <attGroup ref="{http://www.ogf.org/dfdl/dfdl-1.0/}CommonAG"/>
* <attGroup
ref="{http://www.ogf.org/dfdl/dfdl-1.0/}AlignmentAG"/>
* <attGroup ref="{http://www.ogf.org/dfdl/dfdl-1.0/}BaseAG"/>
+ * <attGroup ref="{http://www.ogf.org/dfdl/dfdl-1.0/}MarkupAG"/>
+ * <attGroup ref="{http://www.ogf.org/dfdl/dfdl-1.0/}CommonAG"/>
* <anyAttribute processContents='lax'
namespace='urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:int
urn:ogf:dfdl:2013:imp:daffodil.apache.org:2018:ext
http://www.w3.org/XML/1998/namespace
http://www.ibm.com/xmlns/dfdl/testData'/>
* </extension>
* </complexContent>
@@ -52,6 +52,36 @@
...
```
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]