OpenLiberty / liberty-language-server

The Liberty Config Language Server provides language server features for Liberty server configuration files through any of the supported client IDEs.
Eclipse Public License 2.0
5 stars 11 forks source link

Features suggestions stop working after maven build #255

Open gcharters opened 9 months ago

gcharters commented 9 months ago

The suggestions for feature in the element in server.xml stop appearing after a maven build. They start working again after maven clean.

Environment:

**java -version**
openjdk version "17.0.6" 2023-01-17
IBM Semeru Runtime Open Edition 17.0.6.0 (build 17.0.6+10)
Eclipse OpenJ9 VM 17.0.6.0 (build openj9-0.36.0, JRE 17 Mac OS X aarch64-64-Bit 20230117_255 (JIT enabled, AOT enabled)
OpenJ9   - e68fb241f
OMR      - f491bbf6f
JCL      - 927b34f84c8 based on jdk-17.0.6+10)
 **mvn -version**
Apache Maven 3.9.5 (57804ffe001d7215b5e7bcb531cf83df38f93546)
Maven home: /opt/homebrew/Cellar/maven/3.9.5/libexec
Java version: 21.0.1, vendor: Homebrew, runtime: /opt/homebrew/Cellar/openjdk/21.0.1/libexec/openjdk.jdk/Contents/Home
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "14.1.1", arch: "aarch64", family: "mac"

MacOS version 14.1.1

I hadn't noticed the Java 21 for maven. I suspect brew pulled that down. I don't know if it's significant.

code -v 1.84.2 1a5daa3a0231a0fbba4f14db7ec463cf99d7768e arm64

Liberty Tools version 23.0.9

Steps to reproduce:

  1. Go to https://start.openliberty.io and generate a project with the following config:

    image
  2. Open the project in VS Code and edit the server.xml. Adding features should work fine, and show options

    image
  3. Start the server in dev mode so the maven build runs

  4. Edit the features and you should see that there are no longer suggestions:

    image
scottkurz commented 9 months ago

Just tried this on Windows 10 and VSCode with LT 23.0.9 and this scenario works fine for me.

@gcharters can you share the listing of your target/.libertyls directory when the problem occurs?

I just used the OL starter and it results in liberty-maven-plugin v3.9. Guessing you're using the same version?

gcharters commented 9 months ago

Hi @scottkurz, the tartget/.libertyls directory does not exists and never does.

cherylking commented 9 months ago

I don't know if it is relevant, but wanted to mention that our plugins do not support Java 21 yet. That is coming in the next release.

cherylking commented 9 months ago

@gcharters If you could include the contents of the logging from the language server, that would be helpful. You need to open the OUTPUT tab and select XML Support for the drop down.

TrevCraw commented 9 months ago

I also followed the steps to reproduce, but was not able to. I still see feature suggestions in my environment.

Windows 11 VS Code 1.84.2 Liberty Tools 23.0.9 Liberty Maven Plugin 3.9

Maven and Java info:

Apache Maven 3.9.5 (57804ffe001d7215b5e7bcb531cf83df38f93546)
Maven home: C:\Maven\apache-maven-3.9.5
Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: C:\Program Files\Eclipse Adoptium\jdk-17.0.5.8-hotspot
Default locale: en_CA, platform encoding: Cp1252
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"