stevedlawrence commented on code in PR #1057:
URL: https://github.com/apache/daffodil/pull/1057#discussion_r1342948977


##########
build.sbt:
##########
@@ -211,6 +212,43 @@ lazy val testStdLayout = 
Project("daffodil-test-stdLayout", file("test-stdLayout
   .dependsOn(tdmlProc % "test")
   .settings(commonSettings, nopublish)
 
+/* Workaround: certain reflection (used by JAXB) isn't allowed by default in 
JDK 17:
+ * 
https://docs.oracle.com/en/java/javase/17/migrate/migrating-jdk-8-later-jdk-releases.html#GUID-7BB28E4D-99B3-4078-BDC4-FC24180CE82B
+ *
+ * While we can handle this JVM quirk at build time, at runtime we won't know
+ * a user's JVM version. We'll provide documentation and an extension setting
+ * to add these flags to the extension-launched debugger backend.
+ */
+lazy val extraJvmOptions: Seq[String] =
+  if (scala.util.Properties.isJavaAtLeast("17"))
+    Seq(
+      "--add-opens",
+      "java.base/java.lang=ALL-UNNAMED",
+    )
+  else Seq()
+
+lazy val xjcSettings =
+  Seq(
+    libraryDependencies ++= Seq(
+      "com.sun.xml.bind" % "jaxb-impl" % "2.2.11",
+      "javax.activation" % "activation" % "1.1.1",
+      "org.glassfish.jaxb" % "jaxb-xjc" % "2.2.11",
+    ),
+    xjcCommandLine += "-nv",
+    xjcCommandLine += "-p",
+    xjcCommandLine += "org.apache.daffodil.tdml",

Review Comment:
   I am actually not able to reproduce the non-reproducable-build issue, either 
with or without the `-no-header` flag. So I'm not convinced that was the actual 
cause (which I think makes sense--I think we agree that comments shouldn't 
affect the class file).
   
   I do see the different header dates and sometimes different ordering of 
`@links`, but none of that seems to cause the class files to be different for 
me. Seems like there must be something else going on. I can't reproduce it so 
I'm not sure what the cause would be...
   
   The fact that sometimes `@links` show up in a different order or in 
different files makes me feel like maybe there is some source of randomness or 
ordering that *sometimes* does cause a change to the class file. Maybe 
no-header fixes that as a side-effect or maybe it's just not always 
reproducible, like I'm having trouble with now?



-- 
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]

Reply via email to