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

Need to prepare for Guava update in JDTLS #109

Closed
vorburger opened this issue Mar 20, 2024 · 9 comments
Closed

Need to prepare for Guava update in JDTLS #109

vorburger opened this issue Mar 20, 2024 · 9 comments

Comments

@vorburger
Copy link
Contributor

@guw it broke for me today (was working yesterday), I'm on v1.24.103200544, and .log has this, which is likely root cause:

!SESSION 2024-03-20 19:11:45.252 -----------------------------------------------
eclipse.buildId=unknown
java.version=17.0.10
java.vendor=Eclipse Adoptium
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  --pipe=/run/user/1000/lsp-7df9ef340a6a93b5a76e149d2c9f9d0d.sock
Command-line arguments:  -data /home/vorburger/.config/Code/User/workspaceStorage/5687ff7dea6a22a979f8c4dab8eb016b/redhat.java/jdt_ws --pipe=/run/user/1000/lsp-7df9ef340a6a93b5a76e149d2c9f9d0d.sock

!ENTRY com.salesforce.bazel.sdk 4 0 2024-03-20 19:11:46.180
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: com.salesforce.bazel.sdk [131]
  Unresolved requirement: Require-Bundle: com.salesforce.bazel.importedsource; bundle-version="2.0.0"
    -> Bundle-SymbolicName: com.salesforce.bazel.importedsource; bundle-version="2.0.0.v20240320-0533"
       com.salesforce.bazel.importedsource [130]
         Unresolved requirement: Import-Package: com.google.auto.value; resolution:="optional"
         Unresolved requirement: Import-Package: com.google.errorprone.annotations; resolution:="optional"
         Unresolved requirement: Import-Package: com.github.benmanes.caffeine.guava; version="3.1.8"
           -> Export-Package: com.github.benmanes.caffeine.guava; bundle-symbolic-name="com.github.ben-manes.caffeine.guava"; bundle-version="3.1.8"; version="3.1.8"; uses:="com.github.benmanes.caffeine.cache,com.google.common.cache"
              com.github.ben-manes.caffeine.guava [126]
                Unresolved requirement: Import-Package: com.google.common.cache; version="[32.1.0,33.0.0)"

	at org.eclipse.osgi.container.Module.start(Module.java:493)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:2073)
	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:143)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:2064)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:2004)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1967)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1883)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:341)

This is blocking me from working on my project. I'll check out if there's a way to revert to older extension versions? (I've never tried.)

@vorburger
Copy link
Contributor Author

FYI My current redhat.java is v1.29.2024032008 FWIW.

@vorburger
Copy link
Contributor Author

'll check out if there's a way to revert to older extension versions? (I've never tried.)

I've figured out how to do this (in UI, drop-down on Uninstall Extension; bit hidden)...

... but am still seeing it on 1.24.103111607 from 3/11/2024.

FYI My current redhat.java is v1.29.2024032008 FWIW.

It's probably the JDT that changed its Guava version? Trying...

@vorburger
Copy link
Contributor Author

It's probably the JDT that changed its Guava version? Trying...

Yeah, right; so with this extension back to its latest (as above) BUT redhat.java on (current) release v1.28.1 instead of pre-release, it's fine.

@vorburger vorburger reopened this Mar 20, 2024
@vorburger
Copy link
Contributor Author

Yeah, right; so with this extension back to its latest (as above) BUT redhat.java on (current) release v1.28.1 instead of pre-release, it's fine.

Wehl... actually, hang on - I think this means that this extension probably WILL break when Language Support for Java(TM) by Red Hat upgrades from v1.28.1 to v1.29? At that point, you'll have to bump your Guava version range in an OSGi MANIFEST as well? Perhaps you could leave it "open"? Or bundle Guava yourself, to avoid this? Just a thought / your call.

@guw
Copy link
Collaborator

guw commented Mar 20, 2024

Yes. We need to prepare for an update.

@guw guw changed the title Unresolved requirement: Import-Package: com.google.common.cache; version="[32.1.0,33.0.0)" Need to prepare for Guava update in JDTLS Mar 20, 2024
vorburger added a commit to vorburger/vorburger-dotfiles-bin-etc that referenced this issue Mar 20, 2024
@vorburger
Copy link
Contributor Author

I've just run into this problem again, with this extension on v1.24.104040818 (pre-release) and redhat.java v1.29.0.

this means that this extension probably WILL break when Language Support for Java(TM) by Red Hat upgrades from v1.28.1 to v1.29

@guw apparently this just (today?) happened...

I've figured out how to do this (in UI, drop-down on Uninstall Extension; bit hidden)...

Using this to downgrade redhat.java from their recent v1.29.0 release back down to 1.28.1 works around this problem.

vorburger added a commit to vorburger/vorburger-dotfiles-bin-etc that referenced this issue Apr 8, 2024
Note that redhat.java must stay at 1.28.1
and cannot bump to v1.29.0 (manually reverted), due to
salesforce/bazel-vscode-java#109.
@guw
Copy link
Collaborator

guw commented Apr 9, 2024

The problem has been fixed in the upstream library but not released yet.
ben-manes/caffeine#1160

Waiting on a Caffeine release with more relaxed OSGi headers

@ben-manes
Copy link

ben-manes commented Apr 9, 2024

Please remove your unnecessary usage of the guava adapter so the dependency isn’t needed, thus avoiding the problem entirely.

guw added a commit that referenced this issue Apr 10, 2024
Fixes #109

Signed-off-by: Gunnar Wagenknecht <gunnar@wagenknecht.org>
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 a pull request may close this issue.

3 participants