Skip to content

Conversation

@rli
Copy link
Contributor

@rli rli commented Apr 23, 2025

In certain IDE environments, for example when user has the latest Scala plugin, Amazon Q attempts to load lsp4j through
transitive optional dependencies instead of through the IDE.

Ideally we do not bundle the library, but this is not possible until JetBrains can guarantee stronger isolation between plugins

As part of this we optimistically exclude Gson in hopes that it does not have the same issue. SLF4J is additionally packaged due to the same linkage error, though it seems to be pulling in an older version from somewhere else.

We also need to bump the Kotlin version, since there is a bug where Kotlin compiler runs out of memory for some reason if we exclude Gson from the distribution bundle.

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@rli rli requested a review from a team as a code owner April 23, 2025 19:25
@github-actions
Copy link

github-actions bot commented Apr 23, 2025

Qodana Community for JVM

1 new problem were found

Inspection name Severity Problems
Unnecessary type argument ◽️ Notice 1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

tree,
false,
Function<TreePath, String> { obj ->
Function<TreePath, String?> { obj ->

Check notice

Code scanning / QDJVMC

Unnecessary type argument Note

Remove explicit type arguments
@rli rli requested a review from a team as a code owner April 24, 2025 18:03
// Make sure we exclude stuff we either A) ships with IDE, B) we don't use to cut down on size
runtimeClasspath {
exclude(group = "org.slf4j")
exclude(group = "com.google.code.gson")
Copy link
Contributor

Choose a reason for hiding this comment

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

This package is included only in certain environments right but we exclude it in all?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah it does not hurt

@rli rli merged commit 9109943 into main Apr 24, 2025
14 of 16 checks passed
@rli rli deleted the rli/aaaaaaaaaaaaaaaa-scala branch April 24, 2025 21:27
rli added a commit that referenced this pull request Apr 28, 2025
By bundling slf4j-api, it is loaded under our classloader, which subsequently picks the Noop logger since there is no logging implementation available.

Fix by providing an implementation as well.
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.

2 participants