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

All features except syntax highlighting do not work #73

Open
dylanbob opened this issue Mar 30, 2023 · 15 comments
Open

All features except syntax highlighting do not work #73

dylanbob opened this issue Mar 30, 2023 · 15 comments
Labels

Comments

@dylanbob
Copy link

Hello and thank you for this vs code extension for the yang language server.

Having installed your extension on WSL Ubuntu (see details on versions below), I can see the syntax highlighting (NB: I have disabled all other YANG extensions and reloaded VS code), but I cannot see any other feature.

FYI I cannot use your extension directly on Windows because some corporate computer policy is blocking Java.

Do you have any idea what might be the cause?

Software versions:

  • Windows version: Windows 10 21H2 build 19044.2728
  • WSL Ubuntu version: 20.04.5 TLS
  • JRE: openjdk-11-jdk, version: 11.0.18+10-0ubuntu1~20.04.1
@dhuebner
Copy link
Member

@dylanbob
It looks like the language server was not started for some reason. Is there something logged in the vs-code logs?
What you could try to nail down the cause is to run the Yang LS executable in the terminal to see if some errors are logged.
The executable is normally in your ~/.vscode user folder.
Try to launch it in the terminal like this:
~/.vscode/extensions/typefox.yang-vscode-2.2.0/server/bin/yang-language-server

@dylanbob
Copy link
Author

dylanbob commented Mar 31, 2023

Hi @dhuebner. I Can launch it directly from the terminal indeed, with not output:
~/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/bin/yang-language-server

I can then see it in processes :

~ » pgrep -a java
 1282 java -classpath /home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/io.typefox.yang.diagram-0.7.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/io.typefox.yang.ide-0.7.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/io.typefox.yang-0.7.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.sprotty.xtext-0.12.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.xtext.ide-2.26.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.lsp4j-0.12.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.elk.alg.layered-0.7.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.sprotty.server-0.12.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.sprotty.layout-0.12.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.xtext-2.26.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.lsp4j.generator-0.12.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.lsp4j.jsonrpc-0.12.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/gson-2.8.6.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/xercesImpl-2.12.2.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.elk.alg.common-0.7.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.elk.core-0.7.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.sprotty-0.12.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/javax.websocket-api-1.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.xtext.util-2.26.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.xtend.lib-2.26.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/log4j-1.2.17.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.equinox.common-3.13.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.osgi-3.16.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.elk.graph-0.7.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.emf.ecore.xmi-2.16.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.emf.ecore.change-2.14.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.emf.ecore-2.20.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.emf.common-2.17.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/guice-5.0.1.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/antlr-runtime-3.2.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/javax.inject-1.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.xtend.lib.macro-2.26.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.xtext.xbase.lib-2.26.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/aopalliance-1.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/guava-30.1-jre.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/failureaccess-1.0.1.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/jsr305-3.0.2.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/checker-qual-3.5.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/error_prone_annotations-2.3.4.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/j2objc-annotations-1.3.jar io.typefox.yang.diagram.launch.YangServerLauncher

also, I will see it as well after opening a YANG file in VSC:

~ » pgrep -a java
2318 java -classpath /home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/io.typefox.yang.diagram-0.7.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/io.typefox.yang.ide-0.7.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/io.typefox.yang-0.7.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.sprotty.xtext-0.12.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.xtext.ide-2.26.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.lsp4j-0.12.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.elk.alg.layered-0.7.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.sprotty.server-0.12.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.sprotty.layout-0.12.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.xtext-2.26.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.lsp4j.generator-0.12.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.lsp4j.jsonrpc-0.12.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/gson-2.8.6.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/xercesImpl-2.12.2.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.elk.alg.common-0.7.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.elk.core-0.7.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.sprotty-0.12.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/javax.websocket-api-1.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.xtext.util-2.26.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.xtend.lib-2.26.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/log4j-1.2.17.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.equinox.common-3.13.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.osgi-3.16.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.elk.graph-0.7.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.emf.ecore.xmi-2.16.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.emf.ecore.change-2.14.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.emf.ecore-2.20.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.emf.common-2.17.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/guice-5.0.1.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/antlr-runtime-3.2.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/javax.inject-1.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.xtend.lib.macro-2.26.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.xtext.xbase.lib-2.26.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/aopalliance-1.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/guava-30.1-jre.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/failureaccess-1.0.1.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/jsr305-3.0.2.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/checker-qual-3.5.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/error_prone_annotations-2.3.4.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/j2objc-annotations-1.3.jar io.typefox.yang.diagram.launch.YangServerLauncher

I don't see any output in the "Problems", "Output" or "Debug console" VSC views.

I found these logs while searching with ctrlp+p:

2023-03-31 10:00:24.456 [info] Extension host with pid 2952 started
2023-03-31 10:00:24.580 [info] Lock '/home/XXXXXX/.vscode-server/data/User/workspaceStorage/e30b437bddb1ddefde7cc26189bf04f3/vscode.lock': Lock acquired.
2023-03-31 10:00:24.749 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onLanguage'
2023-03-31 10:00:24.755 [info] ExtensionService#_doActivateExtension typefox.yang-vscode, startup: false, activationEvent: 'onLanguage:yang'
2023-03-31 10:00:24.757 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: true, activationEvent: '*', root cause: vscode.git
2023-03-31 10:00:25.111 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '*'
2023-03-31 10:00:25.112 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*'
2023-03-31 10:00:25.663 [info] Eager extensions activated
2023-03-31 10:00:25.665 [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: false, activationEvent: 'onStartupFinished'
2023-03-31 10:00:25.666 [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished'
2023-03-31 10:00:25.667 [info] ExtensionService#_doActivateExtension GitLab.gitlab-workflow, startup: false, activationEvent: 'onStartupFinished'

Hope it helps...

@dhuebner
Copy link
Member

@dylanbob
I can not say why is it not working for you...
If you open a new empty yang file and trigger content assist, do you see template proposals like this?

Bildschirm­foto 2023-03-31 um 11 25 31

Does it work for you on Windows? Maybe it is a WSL problem?

@dylanbob
Copy link
Author

I cannot trigger anything :( apart from syntax highlighting, nothing seems to work. I cannot test simply on Windows either because technical corporate policies prevent java from running on my computer.

I never had an issue regarding vscode extensions on WSL, but the problem might still be related to it I guess.

@dhuebner
Copy link
Member

@dylanbob
I've asked a friend of my to try it out on Windows using WSL and Ubuntu 22. Everything worked as expected, also the Yang diagram view.
What you can probably also try is to connect to your Ubuntu using vs-code "Remote Development" extension. Otherwise I don't know how to help without having an error log.

@kaisalmen
Copy link

kaisalmen commented Mar 31, 2023

Hi @dylanbob Dennis asked me to perform the tests. If you are able to use vscode under Windows you can also as @dhuebner suggested use it to connect to a WSL instance.
Extension installed in a remote session run inside the WSL, means Java or any other software / compilers from the Linux systems are used:
image

But I also tested vscode running directly in Ubuntu and both scenarios work out of the box.
My Linux env:

# uname -a
Linux Defiant 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

# lsb_release  -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:        22.04
Codename:       jammy

# java --version
openjdk 11.0.18 2023-01-17
OpenJDK Runtime Environment (build 11.0.18+10-post-Ubuntu-0ubuntu122.04)
OpenJDK 64-Bit Server VM (build 11.0.18+10-post-Ubuntu-0ubuntu122.04, mixed mode, sharing)

@dylanbob
Copy link
Author

Thank both of you for your efforts. I just updated my kernel to get the same as you, and I am already using the exact same java version. I upgraded ubuntu to v22. vscode in running in WSL correctly. I also updated vs code to 1.77.0.

But... still the exact same behaviour, and nothing new in logs :-(

~/.vscode-server/data/logs/20230331T155130 » grep -i yang . -R
./exthost3/remoteexthost.log:2023-03-31 15:52:06.947 [info] ExtensionService#_doActivateExtension typefox.yang-vscode, startup: false, activationEvent: 'onLanguage:yang'

~/.vscode-server/data/logs/20230331T155130 » pgrep -a java
12627 java -classpath /home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/io.typefox.yang.diagram-0.7.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/io.typefox.yang.ide-0.7.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/io.typefox.yang-0.7.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.sprotty.xtext-0.12.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.xtext.ide-2.26.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.lsp4j-0.12.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.elk.alg.layered-0.7.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.sprotty.server-0.12.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.sprotty.layout-0.12.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.xtext-2.26.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.lsp4j.generator-0.12.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.lsp4j.jsonrpc-0.12.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/gson-2.8.6.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/xercesImpl-2.12.2.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.elk.alg.common-0.7.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.elk.core-0.7.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.sprotty-0.12.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/javax.websocket-api-1.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.xtext.util-2.26.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.xtend.lib-2.26.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/log4j-1.2.17.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.equinox.common-3.13.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.osgi-3.16.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.elk.graph-0.7.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.emf.ecore.xmi-2.16.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.emf.ecore.change-2.14.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.emf.ecore-2.20.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.emf.common-2.17.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/guice-5.0.1.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/antlr-runtime-3.2.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/javax.inject-1.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.xtend.lib.macro-2.26.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/org.eclipse.xtext.xbase.lib-2.26.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/aopalliance-1.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/guava-30.1-jre.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/failureaccess-1.0.1.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/jsr305-3.0.2.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/checker-qual-3.5.0.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/error_prone_annotations-2.3.4.jar:/home/XXXXXX/.vscode-server/extensions/typefox.yang-vscode-2.2.0/server/lib/j2objc-annotations-1.3.jar io.typefox.yang.diagram.launch.YangServerLauncher

image

@dhuebner
Copy link
Member

@dylanbob
You have really a lot yang models. Maybe the Yang LS runs out of memory, or just indexing all the models.
Did you tried to run a smaller example, like a folder and only one file? Just to make sure the Yengster extension works.

@dylanbob
Copy link
Author

Bingo! I managed to make it work with a simple file in a seperate folder, and opening only this folder. So this might be a memory problem like you said. I don't really know how Windows manages the WSL memory allocation...
How could we debug that deeper?

@dylanbob
Copy link
Author

dylanbob commented Apr 3, 2023

Hi. There was a 8GB RAM limit configured by default for WSL, as documented and as I could see with the free command. However, rising this limit (e.g. to 12GB) has no effect on the issue as vscode (or java, or the YANGster extension...) seems to limit itself to 2.5-3GiB according to the ps or htop commands. I cannot see any limit configured on vscode or ubuntu and I have not customised the openjdk11 configuration.

So I am not sure if that's actually a memory limit issue, or rather some bug making the extension or the language server unable to handle large directories ?

Could you try with these ? Nokia SR-OS Yang models

@dylanbob
Copy link
Author

hi @dhuebner. I understand that you are sharing your software freely without support and therefore owe me nothing. Hovewer, just so you do not forget about my issue, I must ask you again if you would please test that your plugin functions correctly with the provided YANG files. Thanks

@dhuebner
Copy link
Member

@dylanbob
I will look into it this week as soon as I get some free time

@dhuebner
Copy link
Member

@dylanbob
I was able to investigate what happens with your example project. It is not a bug or endless loop or similar, the Language Server is just to slow... Even if I remove the biggest 20M and 17M models it still take minutes to finish the initial workspace resolution. Without the initialization the LS doesn't respond on request so it seems like it is not working.

Long story short, one need much more time to find a solution to speed up the Type resolution and also make the scoping faster. What I also missing is a user feedback that indicates the server is currently running, at least a Log would be helpful here.

I will look into some low hanging fruits to speed up the workspace build. Also making it configurable, so one can disable the initial workspace indexing could help.

@dylanbob
Copy link
Author

@dhuebner
Thank you for your investigation. Your leads seem promising. The logs would be great too.

I do not understand how the whole thing works exactly but let suggest something too: maybe one other way to speed up the process would be to only process modules and submodules in opened files? (+ linked files targeted by imports and includes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants