mulesoft-labs / data-weave-language-server

The DataWeave Language Server
BSD 3-Clause "New" or "Revised" License
13 stars 1 forks source link

Issues with vscode extension when on Java 11 #44

Open alexandramartinez opened 2 years ago

alexandramartinez commented 2 years ago

Someone reported an issue with the vscode extension and it got fixed after changing from java 11 to java 8.

Here's the project's zip: example.zip

Details before changing to java 8:

cflesher@AC0080 example % mvn -v
Apache Maven 3.6.2 (40f52333136460af0dc0d7232c0dc0bcf0d9e117; 2019-08-27T10:06:16-05:00)
Maven home: /Users/cflesher/.asdf/installs/maven/3.6.2
Java version: 11.0.16.1, vendor: Eclipse Adoptium, runtime: /Users/cflesher/.asdf/installs/java/adoptopenjdk-11.0.16+101
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "12.6", arch: "x86_64", family: "mac"

Screenshots of the error:

Screen Shot 2022-10-13 at 8 48 28 AM Screen Shot 2022-10-13 at 9 22 44 AM

pedes commented 1 year ago

Hi @alexandramartinez ,

seems that with the new version of dataweave plugin v1.2.15 and using Java 11 it does work.

I've found that the editor works better if we indicate the java version as a maven property at the pom.xml

    <properties>
        <java.version>11</java.version>
        <maven.compiler.target>11</maven.compiler.target>
        <maven.compiler.source>11</maven.compiler.source>
    </properties>
Screenshot 2023-03-09 at 20 13 35
alexandramartinez commented 1 year ago

Thank you so much! I'll let them know about it :)