Skip to content

Fix a project's name if there are modules with the same name#1687

Merged
jdneo merged 2 commits intomicrosoft:developfrom
snjeza:issue-1659
Aug 6, 2025
Merged

Fix a project's name if there are modules with the same name#1687
jdneo merged 2 commits intomicrosoft:developfrom
snjeza:issue-1659

Conversation

@snjeza
Copy link
Contributor

@snjeza snjeza commented Aug 4, 2025

Fixes #1659

The PR adds the parent folder name to the project name if there are duplicate module names.

@ramazangirgin-check24 As to the reported circular dependencies, these messages are just a warning. You can ignore them.
The related issue - redhat-developer/vscode-java#718

Test project: testproject.zip
Test vsix: https://github.com/snjeza/vscode-test/raw/refs/heads/master/vscode-gradle-3.17.4.vsix https://github.com/snjeza/vscode-test/raw/refs/heads/master/vscode-gradle-3.17.5.vsix

Without the PR:
withoutthepr
With the PR:
withthepr

for (Entry<URI, List<BuildTarget>> entrySet : buildTargetMap.entrySet()) {
URI uri = entrySet.getKey();
String projectName = new File(uri).getName();
if (projectNames.contains(projectName)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

In case of big number of projects, is it better to use hashset for both projectNames and duplicatedProjectNames?

Copy link
Contributor Author

@snjeza snjeza Aug 5, 2025

Choose a reason for hiding this comment

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

Yes, it is. I have updated the PR.

@jdneo jdneo merged commit 89a1993 into microsoft:develop Aug 6, 2025
5 checks passed
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.

False reported circular dependencies in Cursor IDE

3 participants