arrterian / nix-env-selector

Allows switch environment for Visual Studio Code using Nix Package Manager.
MIT License
220 stars 29 forks source link

TypeError when applying nix environment in Remote SSH #81

Open siddharth-krishna opened 1 year ago

siddharth-krishna commented 1 year ago

Describe the bug I am using this extension from VS Code on my macbook, and using the Remote SSH extension to open a workspace on a remote Ubuntu server. The wokspace has nix flakes set up. When I try to select a nix environment using this extension, the message "Applying environment" appears forever, but in the "Extension Host (Remote)" output pane I see the error:

2023-06-27 07:25:22.142 [error] TypeError: c.call is not a function
    at /home/sid/.vscode-server/extensions/arrterian.nix-env-selector-1.0.9/dist/main.js:2538:310

To Reproduce Steps to reproduce the behavior:

  1. Open a remote workspace.
  2. Use the "Nix-Env: Select environment" command to select flake.nix
  3. Open the Outputs pane and go to "Extension Host (Remote)"
  4. See error

Expected behavior I expect the nix environment to be activated so that I can use HLS for my project.

Environment:

nh2 commented 11 months ago

@arrterian Could I sponsor some work on this one? Let me know!

arrterian commented 7 months ago

@nh2 I've been juggling a lot since I joined the Ukrainian Armed Forces. So, there is no chance to work on the extension any soon. You have done amazing work in previous PR. If you can contribute to this one, it will be awesome.

nh2 commented 7 months ago

juggling a lot since I joined the Ukrainian Armed Forces. So, there is no chance to work on the extension any soon.

@arrterian That is very understandable. I hope it goes well!


I already had some look into c.call is not a function when I first found this issue.

Unfortunately, my understanding of Clojure and its transpilation to JavaScript is very low. I cannot tell whether this is a bug in the code, or a bug in the transpiler.

The fact that the whole thing is untyped all the way through makes it difficult to figure out on which level things are going wrong. I suspect TypeScript might make this extension simpler to contribute to.