Skip to content

Commit

Permalink
lastBuildFileChange will be updated only when a recompile is needed
Browse files Browse the repository at this point in the history
Signed-off-by: Arun Venmany <[email protected]>
  • Loading branch information
arunvenmany-ibm committed Jan 16, 2025
1 parent a2c3832 commit b21d776
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4055,14 +4055,16 @@ private void initWatchLoop() throws IOException {
if (projectRecompileMap == null) {
info("Recompile " + project.getProjectName());
triggerUpstreamModuleCompile(project, false);
// build file tracking of upstream projects
lastBuildFileChange.put(project.getBuildFile(), System.currentTimeMillis());
} else if (Boolean.TRUE.equals(projectRecompileMap.get(project.getProjectName()))) {
info("Recompile " + project.getProjectName() + " due to an earlier compilation error");
triggerUpstreamModuleCompile(project, false);
// build file tracking of upstream projects
lastBuildFileChange.put(project.getBuildFile(), System.currentTimeMillis());
} else {
info("Recompile skipped for " + project.getProjectName() + " since earlier compilation is successful");
}
// build file tracking of upstream projects
lastBuildFileChange.put(project.getBuildFile(), System.currentTimeMillis());
}
}

Expand All @@ -4071,14 +4073,16 @@ private void initWatchLoop() throws IOException {
if (projectRecompileMap == null) {
info("Recompile " + getProjectName());
triggerMainModuleCompile(false);
// build file tracking of main project
lastBuildFileChange.put(buildFile, System.currentTimeMillis());
} else if (Boolean.TRUE.equals(projectRecompileMap.get(getProjectName()))) {
info("Recompile " + getProjectName() + " due to an earlier compilation error");
triggerMainModuleCompile(false);
// build file tracking of main project
lastBuildFileChange.put(buildFile, System.currentTimeMillis());
} else {
info("Recompile skipped for " + getProjectName() + " since earlier compilation is successful");
}
lastBuildFileChange.put(buildFile, System.currentTimeMillis());
}

private void processFileChanges(
Expand Down

0 comments on commit b21d776

Please sign in to comment.