You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "albilu (via GitHub)" <gi...@apache.org> on 2023/05/14 10:19:41 UTC

[GitHub] [netbeans] albilu opened a new issue, #5950: Issue using LS4J DAP client with the Netbeans LSP Client

albilu opened a new issue, #5950:
URL: https://github.com/apache/netbeans/issues/5950

   ### Apache NetBeans version
   
   Apache NetBeans 17
   
   ### What happened
   
   Using LSP4J for Debug Protocol i am getting this issue at:
   ```java
   Launcher<IDebugProtocolServer> launcher = DSPLauncher.createClientLauncher(client, in, out);
   ```
   
   
   ```
   java.lang.VerifyError: Bad return type
   Exception Details:
     Location:
       org/eclipse/lsp4j/jsonrpc/debug/adapters/DebugMessageTypeAdapter$Factory.create(Lcom/google/gson/Gson;Lcom/google/gson/reflect/TypeToken;)Lcom/google/gson/TypeAdapter; @26: areturn
     Reason:
       Type 'org/eclipse/lsp4j/jsonrpc/debug/adapters/DebugMessageTypeAdapter' (current frame, stack[0]) is not assignable to 'com/google/gson/TypeAdapter' (from method signature)
     Current Frame:
       bci: @26
       flags: { }
       locals: { 'org/eclipse/lsp4j/jsonrpc/debug/adapters/DebugMessageTypeAdapter$Factory', 'com/google/gson/Gson', 'com/google/gson/reflect/TypeToken' }
       stack: { 'org/eclipse/lsp4j/jsonrpc/debug/adapters/DebugMessageTypeAdapter' }
     Bytecode:
       0000000: 1203 2cb6 0004 b600 059a 0005 01b0 bb00
       0000010: 0659 2ab4 0002 2bb7 0007 b0            
     Stackmap Table:
       same_frame(@14)
   
   	at org.eclipse.lsp4j.jsonrpc.debug.json.DebugMessageJsonHandler.getDefaultGsonBuilder(DebugMessageJsonHandler.java:34)
   	at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.<init>(MessageJsonHandler.java:61)
   	at org.eclipse.lsp4j.jsonrpc.debug.json.DebugMessageJsonHandler.<init>(DebugMessageJsonHandler.java:26)
   	at org.eclipse.lsp4j.jsonrpc.debug.DebugLauncher$Builder.createJsonHandler(DebugLauncher.java:207)
   	at org.eclipse.lsp4j.jsonrpc.Launcher$Builder.create(Launcher.java:319)
   	at org.eclipse.lsp4j.jsonrpc.debug.DebugLauncher.createLauncher(DebugLauncher.java:64)
   	at org.eclipse.lsp4j.debug.launch.DSPLauncher.createClientLauncher(DSPLauncher.java:85)
   	
   ```
   
   After investigating a bit and also on [LSP4J team](https://github.com/eclipse-lsp4j/lsp4j/issues/730) it seems there is a **conflict between org.eclipse.lsp4j.jsonrpc comming from org-netbeans-modules-lsp-client and org.eclipse.lsp4j.jsonrpc.debug** as this class is not public in the module
   
   **Possible solution:**
   One solution could be to directly add 
   ```xml
   <dependency>
       <groupId>org.eclipse.lsp4j</groupId>
       <artifactId>org.eclipse.lsp4j.debug</artifactId>
       <version>0.13.0</version>
       <type>jar</type>
   </dependency>
   ```
   
   as dependency in LSP Client so that DAP is also supported.
   
   For information [DAP](https://microsoft.github.io/debug-adapter-protocol/overview) is similar to LSP and allow quick implementation with languages debugger
   
   
   
   
   ### How to reproduce
   
   1- Add org-netbeans-modules-lsp-client as implementation version in a module
   2- Add maven dependency of org.eclipse.lsp4j.debug to be able to use DAP Client
   3- Follow instruction available here https://github.com/eclipse-lsp4j/lsp4j/blob/main/documentation/README.md#implement-your-debug-adapter-client
   
   Here is an example of project pom
   [pom.xml.zip](https://github.com/eclipse-lsp4j/lsp4j/files/11470842/pom.xml.zip) to reproduce the issue.
   
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Any
   
   ### JDK
   
   Any
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   Allowing LSP Client to use not only the LSP Client but also the DAP Client is beneficial and provide full support offers by LSP4J
   
   ### Are you willing to submit a pull request?
   
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] matthiasblaesing closed issue #5950: Issue using LS4J DAP client with the Netbeans LSP Client

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing closed issue #5950: Issue using LS4J DAP client with the Netbeans LSP Client
URL: https://github.com/apache/netbeans/issues/5950


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists