mbeckerle commented on code in PR #1022:
URL: https://github.com/apache/daffodil/pull/1022#discussion_r1217959524


##########
build.sbt:
##########
@@ -373,8 +375,23 @@ lazy val libManagedSettings = Seq(
       }
     cachedFun(filesToWatch).toSeq
   },
-  Compile / sourceGenerators += (Compile / genProps).taskValue,
-  Compile / resourceGenerators += (Compile / genSchemas).taskValue,
+  Compile / genVersion := {
+    val resourceDir = (Compile / resourceManaged).value
+    val outFile = resourceDir / "org" / "apache" / "daffodil" / "lib" / 
"VERSION"
+    if (!outFile.exists || IO.read(outFile) != version.value) {

Review Comment:
   I'm surprised you have to write this logic. Shouldn't sbt already have this 
kind of logic built in somewhere? 
   
   I mean if you overwrite a file with the exact same contents, sbt doesn't 
rebuild based on that normally does it? It's not purely date-based reasoning. I 
thought it created a hash value and only rebuilds if both the date and hash 
value changed. 
   



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