vscode-haskell
vscode-haskell copied to clipboard
Extension development not working?
Your environment
Which OS do you use:
NixOS 23.05, VSCodium installed with HomeManager
Steps to reproduce
- Clone this repo
- Change something (I for example changed the
Finding haskell-language-servermessage toHEY Finding haskell-language-server) - Press F5
- The new editor shows up
- It doesn't have the updated extension (In my case still just shows
Finding haskell-language-serverin the console, without the extraHEY)
I also tried just removing the extension from my global install, and if I then press F5 to test I still have no Haskell extension installed.
Expected behaviour
Get the updated extension for testing
Actual behaviour
I just have my normal setup, so I cannot test my changes to the extension :(
Hi, thank you for your bug report!
I am using the described workflow for development.
Building locally succeeds? E.g., yarn install; yarn run test?
Perhaps you have some logs to share, too?
Building does not work, I'll have a closer look tonight if I remember (as I'm working right now), but just running yarn install; yarn run test gives me:
❯ yarn install; yarn run test
yarn install v1.22.19
[1/6] Validating package.json...
warning [email protected]: The engine "vscode" appears to be invalid.
[2/6] Resolving packages...
success Already up-to-date.
Done in 0.10s.
yarn run v1.22.19
warning [email protected]: The engine "vscode" appears to be invalid.
$ tsc --alwaysStrict -p ./
$ node ./out/test/runTest.js
Found existing install in /home/pablo/Dev/vscode-haskell/.vscode-test/vscode-linux-x64-1.80.1. Skipping download
/home/pablo/Dev/vscode-haskell/.vscode-test/vscode-linux-x64-1.80.1/bin/code: line 62: /home/pablo/Dev/vscode-haskell/.vscode-test/vscode-linux-x64-1.80.1/bin/../code: cannot execute: required file not found
Test workspace: /home/pablo/Dev/vscode-haskell/test-workspace
Test error: Error: spawn /home/pablo/Dev/vscode-haskell/.vscode-test/vscode-linux-x64-1.80.1/code ENOENT
Exit code: -2
Failed
Failed to run tests
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The file /home/pablo/Dev/vscode-haskell/.vscode-test/vscode-linux-x64-1.80.1/code does exist though:
❯ ls -al /home/pablo/Dev/vscode-haskell/.vscode-test/vscode-linux-x64-1.80.1/code
-rwxr-xr-x 1 pablo users 155034840 Jun 23 04:45 /home/pablo/Dev/vscode-haskell/.vscode-test/vscode-linux-x64-1.80.1/code
You are on NixOS right? Does the provided nix expression work?
I am, thought I didn't realise there was a provided nix expression :o
So getting different errors now:
❯ nix-shell
copying path '/nix/store/yshjdvcj863vc0z7s5vbg4x11zv7fbii-yarn2nix-modules-1.0.0' from 'https://cache.nixos.org'...
copying path '/nix/store/bymals0w5sxqjg33zy3zhlfmk0z84f5x-nix-prefetch-git' from 'https://cache.nixos.org'...
... and lots more of that
❯ yarn install; yarn run test
yarn install v1.22.19
[1/6] Validating package.json...
warning [email protected]: The engine "vscode" appears to be invalid.
[2/6] Resolving packages...
success Already up-to-date.
Done in 0.10s.
yarn run v1.22.19
warning [email protected]: The engine "vscode" appears to be invalid.
$ tsc --alwaysStrict -p ./
$ node ./out/test/runTest.js
TimeoutError: @vscode/test-electron request timeout out after 15000ms
at EventTarget.<anonymous> (/home/pablo/Dev/vscode-haskell/node_modules/@vscode/test-electron/out/request.js:25:20)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:737:20)
at EventTarget.dispatchEvent (node:internal/event_target:679:26)
at abortSignal (node:internal/abort_controller:314:10)
at AbortController.abort (node:internal/abort_controller:344:5)
at TimeoutController.reject (/home/pablo/Dev/vscode-haskell/node_modules/@vscode/test-electron/out/request.js:60:23)
at listOnTimeout (node:internal/timers:569:17)
at process.processTimers (node:internal/timers:512:7)
Failed to run tests
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Oh, but when I run that again, the timeout error changes back to the original:
❯ yarn install; yarn run test
yarn install v1.22.19
[1/6] Validating package.json...
warning [email protected]: The engine "vscode" appears to be invalid.
[2/6] Resolving packages...
success Already up-to-date.
Done in 0.10s.
yarn run v1.22.19
warning [email protected]: The engine "vscode" appears to be invalid.
$ tsc --alwaysStrict -p ./
$ node ./out/test/runTest.js
Found existing install in /home/pablo/Dev/vscode-haskell/.vscode-test/vscode-linux-x64-1.80.1. Skipping download
/home/pablo/Dev/vscode-haskell/.vscode-test/vscode-linux-x64-1.80.1/bin/code: line 62: /home/pablo/Dev/vscode-haskell/.vscode-test/vscode-linux-x64-1.80.1/bin/../code: cannot execute: required file not found
Test workspace: /home/pablo/Dev/vscode-haskell/test-workspace
Test error: Error: spawn /home/pablo/Dev/vscode-haskell/.vscode-test/vscode-linux-x64-1.80.1/code ENOENT
Exit code: -2
Failed
Failed to run tests
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I checked on my nixos machine, nix-shell followed by yarn install succeeds and then I can open vscodium and press f5 to develop the extension.
Hmm, that's annoying that it doesn't for me :( I'll try again, see if I can figure it out. Thank you for checking though!
I just realised, the tests rely on ghcup to be on the path and usable, so it is no surprise that yarn run test doesn't work on NixOS out of the box.