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

Extension development not working? #913

Open
TheOddler opened this issue Jul 13, 2023 · 7 comments
Open

Extension development not working? #913

TheOddler opened this issue Jul 13, 2023 · 7 comments
Labels
os: nixos type: bug A bug or unintended effect

Comments

@TheOddler
Copy link

Your environment

Which OS do you use:

NixOS 23.05, VSCodium installed with HomeManager

Steps to reproduce

  1. Clone this repo
  2. Change something (I for example changed the Finding haskell-language-server message to HEY Finding haskell-language-server)
  3. Press F5
  4. The new editor shows up
  5. It doesn't have the updated extension (In my case still just shows Finding haskell-language-server in the console, without the extra HEY)

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 :(

@fendor
Copy link
Collaborator

fendor commented Jul 16, 2023

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?

@TheOddler
Copy link
Author

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

@fendor
Copy link
Collaborator

fendor commented Jul 17, 2023

You are on NixOS right? Does the provided nix expression work?

@TheOddler
Copy link
Author

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.

@fendor
Copy link
Collaborator

fendor commented Jul 18, 2023

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.

@TheOddler
Copy link
Author

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!

@fendor
Copy link
Collaborator

fendor commented May 10, 2024

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.

@fendor fendor added type: bug A bug or unintended effect os: nixos and removed status: needs triage labels May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os: nixos type: bug A bug or unintended effect
Projects
None yet
Development

No branches or pull requests

2 participants