Eclipse hangs org.sonarlint.eclipse.buildship.internal.GradleUtils

I recently updated the Sonarlint Eclipse plugin. Since updating, Eclipse has often been hanging. Often when saving files, setting debugger breakpoints, etc. In the UI freeze sample stacktrace, the below lines almost always appear:

at org.sonarlint.eclipse.buildship.internal.GradleUtils.getProjectConnection(GradleUtils.java:219)|
at org.sonarlint.eclipse.buildship.internal.GradleUtils.getExclusions(GradleUtils.java:177)|
at org.sonarlint.eclipse.buildship.internal.GradleProjectConfigurationExtension.getExclusions(GradleProjectConfigurationExtension.java:85)|

I’ve attached a set of sample stacktraces to this topic.

I’ve added these exclusions in the SonarLint “File Exclusion” settings:
**/.gradle
**/
.properties

But the freezing still occurs. Is there anyway to disable Sonarlint’s integration with Gradle without uninstalling Sonarlint completely?

Freeze 1 sample 3.txt (8.7 KB)
Freeze 1 sample 2.txt (7.7 KB)
Freeze 1 sample 1.txt (7.7 KB)
Freeze 1

  • Operating system: Windows 10
  • SonarLint plugin version: 10.7.0
  • Programming language you’re coding in: Java and Gradle
  • Is connected mode used: Yes
    • Connected to SonarCloud or SonarQube (and which version): Sonarqube 9.3.3

Hi @David.M,

thanks for reaching out. You’re using not the latest version for SonarLint for Eclipse, which is 10.8, but the behaviour won’t differ.

Would you be so kind as to provide me the full SonarLint logs in these cases as well as the thread dumps?

Could you also provide me some more information about your project please? Like the rough size and the number of sub-modules as well which Gradle version and Eclipse Buildship plug-in version you are using?

There is, currently no way to disable the Gradle integration, but I created a TICKET for it as we had similar requests to yours. I will tackle it for the next release.
Regarding the File Exclusions you have configured, they are only taking into account for the on-the-fly analysis. For this we also have a TICKET but I cannot promise that it will be tackled for the next release as it is a bit bigger.

I guess you have updated from 10.5 or lower? This was the last version before I added the exclusion/indexing logic into the our plug-in. If you want to downgrade in the meantime, feel free to use this Eclipse Update Site.

Best,
Tobias

Hi @David.M,

I’ve implemented the first ticket mentioned above regarding the option to opt out of the Gradle integration as you phrased it.
A build for testing is currently available via our SonarLint for Eclipse Dogfooding Update Site. This is not yet final, and the documentation has not yet been written, but you could give it a shot.

To opt-out, you have to configure it per project inside the workspace (where you want to opt-out) by opening the project properties, navigating to the SonarLint preferences, unchecking the specific checkbox, and restarting the IDE. If you ask in a multi-sub-project Gradle project why this has to be done multiple times and not only once, the answer is simple: We would have to use the Gradle integration to check which project is part of a Gradle hierarchy.

Feedback about the current implementation is most welcome!

Best,
Tobias

Hi @David.M,

we just released SonarLint for Eclipse 10.9, which contains the changes to opt out of the Gradle integration.

Best,
Tobias