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

How to prevent the extension from checking files in bin folder? #25

Open
felipecrs opened this issue Nov 29, 2021 · 7 comments
Open

How to prevent the extension from checking files in bin folder? #25

felipecrs opened this issue Nov 29, 2021 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@felipecrs
Copy link

I use Gradle in my project, and because of that, gradle generates some build output in a folder called bin. The extension wrongly sees my source files as being defined there as well:

Invalid duplicate class definition of class com.company.internal.river.jenkinssharedlibrary.MBReportJobStart : The sources /local/home/user/repos/jenkins-shared-library/src/com/company/internal/river/jenkinssharedlibrary/MBReportJobStart.groovy and /local/home/user/repos/jenkins-shared-library/bin/main/com/company/internal/river/jenkinssharedlibrary/MBReportJobStart.groovy each contain a class with the name com.company.internal.river.jenkinssharedlibrary.MBReportJobStart.
 @ line 11, column 1.
@shadycuz
Copy link
Member

shadycuz commented Jan 3, 2022

Hello @felipecrs,

As you can see my holiday break was very long 😎 but I'm back now.

This is a good ask and a problem I have also faced. I'm not sure yet if the fix is needed in the client or the server. Will take a look soon.

Thanks

@shadycuz shadycuz added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Jan 3, 2022
@felipecrs
Copy link
Author

Man, it's me who says thanks for the awesome initiative!

@shadycuz
Copy link
Member

Still working on this =/

microsoft/vscode-languageserver-node#920

@shadycuz
Copy link
Member

Probably going to have to fix it server side and not client side.

@shadycuz shadycuz reopened this Apr 15, 2022
@EmilySamantha80
Copy link

I'm facing this same issue with the bin folder being searched. Makes it unusable, unfortunately.

@sparrowt
Copy link

I also hit this - it seems to be the extension "Language Support for Java(TM) by RedHat" (redhat.java) which is creating these copies in bin/, see redhat-developer/vscode-java#634 (comment)

Until that is fixed, to avoid Groovy-Guru from flagging everything as a duplicate I added bin/** to the 'Files exclude' setting at the workspace scope, which is equivalent to adding the following in <workspace>/.vscode/settings.json

{
    "files.exclude": {
        "bin/**": true
    }
}

@m1lhaus
Copy link

m1lhaus commented Oct 10, 2023

I am having similar issue with duplicates in .svn folder (yes, our company still uses it). I have .svn folder excluded globally and also locally via solution suggested by @sparrowt, but I am still getting this 'Invalid duplicate class definition' warnings. Any more suggestions how to get around that? I am wondering why would the extension ignore global vscode setting for exclude locations in the first place (.git, .svn, etc folders).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants