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

Unable to disable buildServer in settings #1593

Open
joshfriend opened this issue Aug 27, 2024 · 5 comments
Open

Unable to disable buildServer in settings #1593

joshfriend opened this issue Aug 27, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@joshfriend
Copy link

Extension Name: vscode-gradle
Extension Version: 3.16.2024082707
OS Version: macOS 14.6.1
VSCode version: 1.92.2

Describe the bug
Setting java.gradle.buildServer.enabled to "off" does not disable the buildserver. Gradle is still started to sync the project. It appears that gradle.autoDetect is ignored as well.

When I restarted VS code today, I noticed that since then this extension has been starting a gradle process which uses a LOT of CPU. I had previously used the default settings for the extension and don't recall seeing VS Code spawn gradle processes.

The latest version was published this morning:

image

I have tried disabling the buildserver in settings, but the option seems to be ignored. I also tried to disable gradle.autoDetect since resolving all configurations and tasks in a gradle project is very bad for performance and should not be the default behavior, but that seems to be ignored as well.

To Reproduce
Disable build server and task autoDetect in the extension settings, then open a gradle project. You'll see a daemon be started to sync the project.

Expected behavior
I don't actually remember installing this extension, but probably did so for better groovy syntax support. I typically use Android Studio for my IDE when I need autocomplete and debugging, but use VS Code frequently for search and minor editing. I don't at this time want to use the language server capabilities of the extension, so disabling them should result in no gradle processes running under VS Code. Until today things worked great, Not sure what recent change could have resulted in this odd behavior.

Additional context
Square's gradle project is extremely large and very sensitive to Gradle/IDE setup. We disable task detection during sync by necessity because the performance is so bad at our scale, but I believe it is generally not a good default anyways.

@joshfriend joshfriend added the bug Something isn't working label Aug 27, 2024
@jdneo
Copy link
Member

jdneo commented Aug 28, 2024

Do you mean that you want to leverage this extension to provide groovy language features, but do not want it to run the gradle task, import gradle projects?

@joshfriend
Copy link
Author

but do not want it to run the gradle task, import gradle projects?

Yep, I want to support folks using VS code for lightweight editing, but I need to be able to disable the build server feature in the project with project settings json, but haven't been able to make that work

@jdneo
Copy link
Member

jdneo commented Aug 29, 2024

What kind of lightweight editing do you want to support?

Editing java files or build.gradle?

@joshfriend
Copy link
Author

Just text editing with decent syntax highlighting. Not interested in any IDE-like features at this point, but since this extension gets recommended when you open a build.gradle file in VS Code, it would be nice if I could configure it in a way that doesn't grind everything to a halt 😆

@jdneo
Copy link
Member

jdneo commented Sep 5, 2024

If you just want to have syntax highlighting, you can set java.server.launchMode to Lightweight (If you installed redhat.java)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants