Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server multi restart issue fix #466

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

arunvenmany-ibm
Copy link
Contributor

No description provided.

Signed-off-by: Arun Venmany <Arun.Kumar.V.N@ibm.com>
@@ -4021,15 +4049,27 @@ private void initWatchLoop() throws IOException {
// initial source and test compile of upstream projects
if (isMultiModuleProject()) {
for (ProjectModule project : upstreamProjects) {
triggerUpstreamModuleCompile(project, false);
// if map is empty, should trigger compile
if (projectRecompileMap.isEmpty() || Boolean.TRUE.equals(projectRecompileMap.get(project.getProjectName())) ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When exactly can the map be empty? 1) When called from Gradle? If so, the info message at 4054 may be misleading? 2) When no project was identified as needing to be recompiled in Maven? If so, why would we do a recompile here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Map can be empty when passed from gradle.
Gradle is already using Gradle task state to check whether a recompile is required. Hence even if we always trigger compile from our end, it just returns task state as EVERYTHING UP-TO-DATE

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But can't it also be empty coming from Maven if no projects had compile errors?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And since the answer for 1 is yes, my comment about the misleading messages applies.

triggerMainModuleCompile(false);
// build file tracking of main project
// if map is empty, should trigger compile
if (projectRecompileMap.isEmpty()|| Boolean.TRUE.equals(projectRecompileMap.get(getProjectName())) ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment about what an empty projectRecompileMap means and how it should affect the info messages.

Signed-off-by: Arun Venmany <Arun.Kumar.V.N@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants