You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
TMC extension is not working on NixOS, and doesn't let me login or choose courses with the extension.
To Reproduce
Steps to reproduce the behavior:
Download TMC plugin from the extensions
Click the TMC plugin menu to open it
Error appears in the output
Expected behavior
Normally the extension would let the user login to TMC.
Screenshots
Desktop (please complete the following information):
OS: NixOS 23.11.2217.d02d818f22c7 (Tapir) x86_64
VSCodium Version: 1.84.2
TMC Extension Version: 2.2.4
TMC Extension logs
[2024-01-06 10:45:34:090] [INFO] VSCodium version: 1.84.2
[2024-01-06 10:45:34:090] [INFO] moocfi.test-my-code version: 2.2.4
[2024-01-06 10:45:34:090] [INFO] Currently open workspace: CsharpProject
[2024-01-06 10:45:34:090] [INFO] Platform linux Arch x64
[2024-01-06 10:45:34:090] [INFO] TMC-Langs version: tmc-langs-cli-x86_64-unknown-linux-gnu-0.36.0
[2024-01-06 10:45:34:091] [INFO] Running "/home/jesse/.config/VSCodium/User/globalStorage/moocfi.test-my-code/cli/tmc-langs-cli-x86_64-unknown-linux-gnu-0.36.0" "tmc" "--client-name" "vscode_plugin" "--client-version" "2.2.4" "logged-in"
[2024-01-06 10:45:34:091] [DEBUG] Backend at https://tmc.mooc.fi
[2024-01-06 10:45:34:091] [DEBUG] Config dir at undefined
[2024-01-06 10:45:34:094] [DEBUG] stderr
Could not start dynamically linked executable: /home/jesse/.config/VSCodium/User/globalStorage/moocfi.test-my-code/cli/tmc-langs-cli-x86_64-unknown-linux-gnu-0.36.0
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
https://nix.dev/permalink/stub-ld
[2024-01-06 10:45:34:094] [ERROR] Failed to check if authenticated:
Langs process ended without result data.
[2024-01-06 10:45:34:094] [ERROR] The above error may have been caused by an interfering antivirus program. Please add an exception for the following folder:
/home/jesse/.config/VSCodium/User/globalStorage/moocfi.test-my-code/cli
[2024-01-06 10:45:34:095] [ERROR] Error during initialization: Empy Langs Response Error: Langs process ended without result data.
The text was updated successfully, but these errors were encountered:
The extension uses an additional CLI binary for some of its functionality (https://github.com/rage/tmc-langs-rust) and we haven't considered NixOS support for it before since it hasn't come up, but we'd like to support it if we can.
I was unable to find a good solution for distributing a precompiled binary for NixOS, though possibly just because I'm not familiar with Nix. Seems like the preferred method is to compile the programs yourself? I haven't come up with a good way to integrate that with the extension, if you're well versed with nix and have some thoughts let me know. Currently, we just identify the the platform the extension is running on and download the appropriate executable from our servers.
For now, I've committed a default.nix file for the CLI. If you clone the repository (https://github.com/rage/tmc-langs-rust), build it with nix and replace the executable at the path in the error message, it should hopefully work without issues. If something is off with the default.nix file, an issue or PR is appreciated too.
Starting from the next release of the CLI, we'll also publish a version of the binary that should work on NixOS, but will not work on Java extensions (the binary will be built targeting musl, which doesn't support dynamic linking which the Java support relies on). The next release of the extension after that would then add logic to download the musl build if NixOS is detected.
Describe the bug
TMC extension is not working on NixOS, and doesn't let me login or choose courses with the extension.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Normally the extension would let the user login to TMC.
Screenshots
Desktop (please complete the following information):
TMC Extension logs
The text was updated successfully, but these errors were encountered: