Skip to content

Commit

Permalink
Do not delete include directory.
Browse files Browse the repository at this point in the history
This avoids fed-gen race condition. It will lead to quadratically many
file writes in CI. It also allows users to put their own files in
the include directory if they like. I am not sure if this is a "feature"
that we actually want. We can discuss later.
  • Loading branch information
petervdonovan committed Mar 8, 2023
1 parent 9651e03 commit 5ef2fbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion org.lflang/src/org/lflang/generator/c/CGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ private void generateReactorDefinitions() throws IOException {
}

private void generateHeaders() throws IOException {
FileUtil.deleteDirectory(fileConfig.getIncludePath());
// Cannot delete existing header files directory because this would create a race condition in fed-gen
FileUtil.copyDirectoryFromClassPath(
fileConfig.getRuntimeIncludePath(),
fileConfig.getIncludePath(),
Expand Down

0 comments on commit 5ef2fbd

Please sign in to comment.