julianpeeters / avrohugger

Generate Scala case class definitions from Avro schemas
Apache License 2.0
201 stars 120 forks source link

java.io.tmpdir is cleared after compilation #147

Closed mjadczak closed 2 years ago

mjadczak commented 3 years ago

a49e5f6e8142a09ea2d29d0b4fea18895726898f made a change which uses the java.io.tmpdir sys prop as a temporary working directory, instead of a SBT and Maven-specific /target directory. However, it seems that after compilation, the logic is still to clear out this temporary working directory, which is bad when the Java tmpdir is at its default, /tmp. In our case, running the tool ends up deleting some important files from /tmp causing the build overall to fail. Perhaps a better approach would be to create a temporary directory within java.io.tmpdir (perhaps timestamped to avoid duplication) and use that instead?

julianpeeters commented 2 years ago

thanks very much for the report