You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2022/01/21 21:53:24 UTC
[GitHub] [daffodil] tuxji commented on a change in pull request #732: Add a global TDML CompileResult cache
tuxji commented on a change in pull request #732:
URL: https://github.com/apache/daffodil/pull/732#discussion_r790017012
##########
File path: daffodil-tdml-processor/src/main/scala/org/apache/daffodil/tdml/processor/Runtime2TDMLDFDLProcessor.scala
##########
@@ -113,6 +113,11 @@ final class Runtime2TDMLDFDLProcessorFactory private(
// Compile the generated code into an executable
val executable = generator.compileCode(codeDir)
+ // There is is no way to clean up TDMLDFDLProcessors, they are just garbage
+ // collected when no longer needed. So recursively mark all generated
+ // files as deleteOnExit so we at least clean them up when the JVM exits
+ os.walk.stream(tempDir).foreach { _.toIO.deleteOnExit() }
Review comment:
Have you tested that this line actually cleans up all temporary files used by runtime2 tests? If not, I'll still approve but I'll also check for left-over temporary files during my next work on runtime2 just in case.
In general, Daffodil tests aren't very good about removing temporary files. I always see a lot of Daffodil-created temporary files in /tmp after running "sbt test" and/or "sbt IntegrationTest/test".
--
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: commits-unsubscribe@daffodil.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org