Alpha testers needed

Hi all,

I have played around with webpack, which is a tool for bundling javascript apps.

INSERT MANY NERDY LINES OF TECHNICAL EXPLANATIONS HERE

Long story short:

It will optimize the extension size, hopefully optimize the loading behavior of the extension in vscode and last but not least Microsoft recommends it for large extensions and we are a large extensions after quite some commits like LSP server.

What i already can see is, that space usage optimization had a big impact.

Before webpack:
image

After webpack:
image

I hope that loading time will also decrease significant now.

Here’s your part

I would love to get some feedback, if the extension can be installed,
works basically and has now major flaws.

Please have in mind that there may been fixed bugs, but still open ones in there.
Also you may give me some feedback to the new hover feature which should be also included in this version.

Make sure to backup your extension settings before installing this one

You can get the Alpha version as a zip in my webpack pull request.

Thanks ins advance for testing it out. :slight_smile:

7 Likes

Here we go:

Test environment: openHAB Snapshot #1665 (basically Milestone 3)
Manual installation on Debian Buster (VirtualBox VM)

java -version
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (Zulu 8.40.0.25-CA-linux64) (build 1.8.0_222-b10)
OpenJDK 64-Bit Server VM (Zulu 8.40.0.25-CA-linux64) (build 25.222-b10, mixed mode)

VSC 1.39.2, clean install
Config: “openhab.host”: “192.168.2.211”

First thing I noticed is an error on startup:

error on startup
internal/modules/cjs/loader.js:586
    throw err;
    ^

Error: Cannot find module 'vscode-languageserver'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:584:15)
    at Function.Module._load (internal/modules/cjs/loader.js:510:25)
    at Module.require (internal/modules/cjs/loader.js:640:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (c:\Users\Sigi\.vscode\extensions\openhab.openhab-0.5.1\serverJS\src\Server.js:8:5)
    at Object.<anonymous> (c:\Users\Sigi\.vscode\extensions\openhab.openhab-0.5.1\serverJS\src\Server.js:119:3)
    at Module._compile (internal/modules/cjs/loader.js:693:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:704:10)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
[Info  - 09:28:07] Connection to server got closed. Server will restart.
internal/modules/cjs/loader.js:586
    throw err;
    ^

Error: Cannot find module 'vscode-languageserver'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:584:15)
    at Function.Module._load (internal/modules/cjs/loader.js:510:25)
    at Module.require (internal/modules/cjs/loader.js:640:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (c:\Users\Sigi\.vscode\extensions\openhab.openhab-0.5.1\serverJS\src\Server.js:8:5)
    at Object.<anonymous> (c:\Users\Sigi\.vscode\extensions\openhab.openhab-0.5.1\serverJS\src\Server.js:119:3)
    at Module._compile (internal/modules/cjs/loader.js:693:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:704:10)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
[Info  - 09:28:08] Connection to server got closed. Server will restart.
internal/modules/cjs/loader.js:586
    throw err;
    ^

Error: Cannot find module 'vscode-languageserver'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:584:15)
    at Function.Module._load (internal/modules/cjs/loader.js:510:25)
    at Module.require (internal/modules/cjs/loader.js:640:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (c:\Users\Sigi\.vscode\extensions\openhab.openhab-0.5.1\serverJS\src\Server.js:8:5)
    at Object.<anonymous> (c:\Users\Sigi\.vscode\extensions\openhab.openhab-0.5.1\serverJS\src\Server.js:119:3)
    at Module._compile (internal/modules/cjs/loader.js:693:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:704:10)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
[Info  - 09:28:08] Connection to server got closed. Server will restart.
internal/modules/cjs/loader.js:586
    throw err;
    ^

Error: Cannot find module 'vscode-languageserver'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:584:15)
    at Function.Module._load (internal/modules/cjs/loader.js:510:25)
    at Module.require (internal/modules/cjs/loader.js:640:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (c:\Users\Sigi\.vscode\extensions\openhab.openhab-0.5.1\serverJS\src\Server.js:8:5)
    at Object.<anonymous> (c:\Users\Sigi\.vscode\extensions\openhab.openhab-0.5.1\serverJS\src\Server.js:119:3)
    at Module._compile (internal/modules/cjs/loader.js:693:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:704:10)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
[Info  - 09:28:08] Connection to server got closed. Server will restart.
internal/modules/cjs/loader.js:586
    throw err;
    ^

Error: Cannot find module 'vscode-languageserver'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:584:15)
    at Function.Module._load (internal/modules/cjs/loader.js:510:25)
    at Module.require (internal/modules/cjs/loader.js:640:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (c:\Users\Sigi\.vscode\extensions\openhab.openhab-0.5.1\serverJS\src\Server.js:8:5)
    at Object.<anonymous> (c:\Users\Sigi\.vscode\extensions\openhab.openhab-0.5.1\serverJS\src\Server.js:119:3)
    at Module._compile (internal/modules/cjs/loader.js:693:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:704:10)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
[Error - 09:28:08] Connection to server got closed. Server will not be restarted.

After a while I get the usual [Error - 09:29:49] Connection to server is erroring. Shutting down server.

Hover over items works:
grafik
(also for groups)

Except the code completion feature because of the LSP error everything seems to be working.
Thx a lot :+1:

1 Like

Sounds good so far.

I will check the languageserver error, but not invest too much time on it.
We will have to get that lsp thingy running on a deeper level anyways in the future.
If the extension is working stable besides this, we can investigate it while we are already using the benefit from webpack live.

Edit:

It seems that extension is running in some problems now.
I will come back when i have found a solution in my environment.

1 Like

OK here we go.

I have a working extension again and also worked through the whole build scripts, which showed some errors.

This one looks really promising and doesn’t throw any errors on startup for me:

OLD - Don't downlaod

https://github.com/openhab/openhab-vscode/files/3774817/openhab-0.5.1_webpack.zip

Edit again:
It seems that it can’t find the internal LSP Server in my production environment.
Heres another version, that produses ithe “server shutting down” notice but seems to work stable for the other functions.
https://github.com/openhab/openhab-vscode/files/3774830/openhab-0.5.1_webpack.zip

1 Like

Hi Jerome,

Thanks for picking up the big task of improving the VS Code extension!

Just installed the extension. Some initial observations:

  • It immediately reports ‘[Error - 3:39:02 PM] Connection to server is erroring. Shutting down server.’ in the output window.
  • Hoovering doesn’t work for me.
  • The intellisense for OH config file syntax (Items, etc. seems to work fine).

That’s it for my first quick check.

Thanks for testing it out.
Sounds good so far.

This one is known and existing since before this change, so that’s “fine”. (At least in context of testing the webpack change. We have to investigate and hopefully solve this in the future)

Did you try different Items and do you have restApi enabled?

Ah, I just moved to M4 and have not yet added that. Of course
 :no_mouth:

1 Like

Just installed on my Macbook. No issues so far (other than the broken LSP). Hover working well.

1 Like

Same here.

1 Like

Thanks all for testing.
I can’t see any issues except from the already known unsolved once, so webpack should be ready for a wider audience and come in the next release.

2 Likes