Skip to content

Conversation

@Achal1607
Copy link
Member

Standalone issue:
There was a race condition, the Netbeans LS requested for run config options from the client but was not waiting for the response. It sent the response before the future completes, due to which it always returned false.

Gradle issue fixed by @sid-srini :

  1. For gradle projects, the CompilerOptionsQuery provides the required compiler arguments for a Source file/folder, not the project root. Thus, fixed the public LspServerTelemetryManager.isPreviewEnabled() methods to query the source roots of the current gradle project and sub-projects in order to check for the existence of the enable-preview compiler argument.
  2. Fixed LspServerTelemetryManger.getProjectType() to return "gradle" only when the project name contains "gradle". For other kinds of netbeans projects, not maven/gradle, the returned value is null. This avoids wrong metrics collected for unsupported project types, such as ant, openjdk, make etc.

Achal1607 and others added 5 commits August 25, 2025 14:22
1. For gradle projects, the CompilerOptionsQuery provides the required
   compiler arguments for a Source file/folder, not the project root.
   Thus, fixed the public LspServerTelemetryManager.isPreviewEnabled()
   methods to query the source roots of the current gradle project and
   sub-projects in order to check for the existence of the
   enable-preview compiler argument.
2. Fixed LspServerTelemetryManger.getProjectType() to return "gradle"
   only when the project name contains "gradle". For other kinds of
   netbeans projects, not maven/gradle, the returned value is null. This
   avoids wrong metrics collected for unsupported project types, such as
   ant, openjdk, make etc.
…-and-type

Fixed nb-telemetry isPreviewEnabled for gradle projects
@Achal1607 Achal1607 requested review from lahodaj and sid-srini August 25, 2025 10:44
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Aug 25, 2025
@Achal1607 Achal1607 added this to the JVSC 24.1.1 milestone Aug 25, 2025
Copy link
Member

@sid-srini sid-srini left a comment

Choose a reason for hiding this comment

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

Thanks a lot @Achal1607 for the fixes, and, applying the gradle fix for other projects like maven too. LGTM 👍

@sid-srini sid-srini merged commit 35e4b0a into oracle:main Aug 26, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants