Skip to content

Conversation

@snjeza
Copy link

@snjeza snjeza commented Oct 29, 2025

Fixes #14

cc @guw

@github-actions
Copy link

github-actions bot commented Oct 29, 2025

Test Results

 40 files  ±0   40 suites  ±0   16s ⏱️ -3s
 57 tests ±0   56 ✅ ±0   1 💤 ±0  0 ❌ ±0 
114 runs  ±0  103 ✅ ±0  11 💤 ±0  0 ❌ ±0 

Results for commit c0cb430. ± Comparison against base commit 9f8988a.

♻️ This comment has been updated with latest results.

if ((segments.length > (i + 1)) && "resources".equals(segments[i + 1])) {
path = path.append(segments[i + 1]);
}
return path;
Copy link
Member

Choose a reason for hiding this comment

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

This change seems unrelated to filegroup support. Please remove it. The java/resources structure is something that we did not intend to support automatically because it's uncommon and IntelliJ does not support it either. We should change the examples instead to not use this.

Copy link
Author

@snjeza snjeza Oct 30, 2025

Choose a reason for hiding this comment

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

The java/resources structure is something that we did not intend to support automatically because it's uncommon and IntelliJ does not support it either. We should change the examples instead to not use this.

I have tested the project that you created - module1/BUILD
The large contains 241 the java/resources folders.

This change seems unrelated to filegroup support. Please remove it.

If I remove that change the resources source folder in https://github.com/salesforce/bazel-ls-demo-project/blob/40a1357b6f0816fb46780710aa742b088e66b6fc/small/module1/BUILD#L8 won't be added. Bazel Eclipse shows the following error:
"Cannot nest 'module1/java/src' inside 'module1/java'. To enable the nesting exclude 'src/' from 'module1/java'"

I have removed the change and updated the small project - small

return toJavaSourceFileOrLabelEntry(src);
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

I like the idea of supporting filegroup within the same package. This should be doable. But we need to make it proper and figure out a way to add all possible sources that way. Just one might not be sufficient.

Copy link
Author

Choose a reason for hiding this comment

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

Do you have any example of such a source?

Copy link
Member

Choose a reason for hiding this comment

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

When the filegroup is a glob matching to multiple .java files. Bazel should give multiple entries as input in response.

Copy link
Author

Choose a reason for hiding this comment

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

Fixed.

@snjeza snjeza force-pushed the issue-14 branch 2 times, most recently from 94bf2bb to 0384f0c Compare November 2, 2025 17:24
@snjeza
Copy link
Author

snjeza commented Nov 2, 2025

@guw I have updated the PR.

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.

Bazel Eclipse doesn't recognize filegroup

2 participants