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

Flexpilot on NixOS #20

Open
oscar-schwarz opened this issue Jan 28, 2025 · 2 comments
Open

Flexpilot on NixOS #20

oscar-schwarz opened this issue Jan 28, 2025 · 2 comments

Comments

@oscar-schwarz
Copy link

I've been looking for a relatively light-weight LLM-extension for VSCode and I think Flexpilot is very promising. I tried to install it on my NixOS machine and due to its immutable nature Flexpilot crashes during startup:

2025-01-28 09:35:34.134 [info] StorageManager instance created
2025-01-28 09:35:34.134 [info] VS Code Version: 1.96.2
2025-01-28 09:35:34.134 [info] Node Version: v20.18.1
2025-01-28 09:35:34.134 [info] Platform: linux
2025-01-28 09:35:34.134 [info] CPU Architecture: x64
2025-01-28 09:35:34.134 [info] Extension ID: flexpilot.flexpilot-vscode-extension
2025-01-28 09:35:34.134 [info] Extension Version: 1.96.3
2025-01-28 09:35:34.134 [info] Extension Path: /home/osi/.vscode-oss/extensions/flexpilot.flexpilot-vscode-extension
2025-01-28 09:35:34.134 [info] Workspace Name: nixos
2025-01-28 09:35:34.134 [info] Workspace URI: file:///home/osi/nixos
2025-01-28 09:35:34.134 [info] Environment Variables: {REDACTED}
2025-01-28 09:35:34.134 [info] EventsSingleton instance created
2025-01-28 09:35:34.134 [info] StatusIconManager instance created
2025-01-28 09:35:34.134 [debug] Initializing status bar
2025-01-28 09:35:34.134 [debug] Status bar initialized
2025-01-28 09:35:34.134 [debug] Updating status bar icon
2025-01-28 09:35:34.134 [info] ModelProviderManager instance created
2025-01-28 09:35:34.134 [debug] New ModelProviderManager instance created
2025-01-28 09:35:34.134 [info] No provider found for location Inline Completion
2025-01-28 09:35:34.134 [debug] No provider found, setting status to disabled
2025-01-28 09:35:34.134 [debug] Getting global state for key: completions.disabled.languages
2025-01-28 09:35:34.134 [debug] Setting status to enabled
2025-01-28 09:35:34.134 [debug] New StatusIconManager instance created
2025-01-28 09:35:34.134 [debug] Getting global state for key: argv.path
2025-01-28 09:35:34.134 [debug] Extension ID: flexpilot.flexpilot-vscode-extension
2025-01-28 09:35:34.134 [debug] Set context: isLoaded = false
2025-01-28 09:35:34.134 [debug] Set context: isError = false
2025-01-28 09:35:34.134 [debug] Set context: isLoggedIn = false
2025-01-28 09:35:34.134 [debug] flexpilot.flexpilot-vscode-extension already in array
2025-01-28 09:35:34.134 [debug] flexpilot.flexpilot-vscode-extension=debug already in array
2025-01-28 09:35:34.134 [debug] Package JSON Path: file:///home/osi/.vscode-oss/extensions/flexpilot.flexpilot-vscode-extension/package.json
2025-01-28 09:35:34.220 [info] Successfully updated package with 'scm/inputBox'
2025-01-28 09:35:34.221 [info] Successfully updated package with 'enabledApiProposals'
2025-01-28 09:35:34.221 [info] Successfully updated package with 'scm/inputBox'
2025-01-28 09:35:34.428 [error] Unknown (FileSystemError) (FileSystemError): Error: EROFS: read-only file system, open '/home/osi/.vscode-oss/extensions/flexpilot.flexpilot-vscode-extension/package.json'
	at Ji._handleError (file:///nix/store/miz50cz7sn013pwbw6mldlyp0hz4anih-vscodium-1.96.2.24355/lib/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:115:11324)
	at Object.writeFile (file:///nix/store/miz50cz7sn013pwbw6mldlyp0hz4anih-vscodium-1.96.2.24355/lib/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:115:9790)
	at async /nix/store/bybrai0f99qs69b822n473ki0hrpmm2r-vscode-extension-flexpilot-flexpilot-vscode-extension-1.96.3/share/vscode/extensions/flexpilot.flexpilot-vscode-extension/out/277.extension.js:1:105178
	at async t.updateRuntimeArguments (/nix/store/bybrai0f99qs69b822n473ki0hrpmm2r-vscode-extension-flexpilot-flexpilot-vscode-extension-1.96.3/share/vscode/extensions/flexpilot.flexpilot-vscode-extension/out/277.extension.js:1:104329)
	at async t.activate (/nix/store/bybrai0f99qs69b822n473ki0hrpmm2r-vscode-extension-flexpilot-flexpilot-vscode-extension-1.96.3/share/vscode/extensions/flexpilot.flexpilot-vscode-extension/out/277.extension.js:1:29418)
	at async a.activate (/nix/store/bybrai0f99qs69b822n473ki0hrpmm2r-vscode-extension-flexpilot-flexpilot-vscode-extension-1.96.3/share/vscode/extensions/flexpilot.flexpilot-vscode-extension/out/extension.js:2:31394)
	at async Z_._activate (file:///nix/store/miz50cz7sn013pwbw6mldlyp0hz4anih-vscodium-1.96.2.24355/lib/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:115:5653)
	at async Z_._waitForDepsThenActivate (file:///nix/store/miz50cz7sn013pwbw6mldlyp0hz4anih-vscodium-1.96.2.24355/lib/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:115:5595)
	at async Z_._initialize (file:///nix/store/miz50cz7sn013pwbw6mldlyp0hz4anih-vscodium-1.96.2.24355/lib/vscode/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:115:4958)
2025-01-28 09:35:34.441 [debug] Set context: isError = true
2025-01-28 09:39:27.623 [debug] Updating status bar icon
2025-01-28 09:39:27.623 [info] No provider found for location Inline Completion
2025-01-28 09:39:27.623 [debug] No provider found, setting status to disabled
2025-01-28 09:39:27.623 [debug] Getting global state for key: completions.disabled.languages
2025-01-28 09:39:27.623 [debug] Setting status to enabled

Apparently it tries to update itself on startup. I haven't had something like this with any other extension I have installed. Can this be disabled somehow?

@oscar-schwarz
Copy link
Author

I noticed it tries to compile something into an /out dir in the nix store. Thats impossible because the store is immutable.

@mohankumarelec
Copy link
Contributor

Hi @oscar-schwarz,

The extension updates itself because it utilizes proposed APIs. When the enable-proposed-api field is set in package.json, publishing to the VS Code marketplace is blocked. To bypass this restriction, the extension updates its code after installation.

Unfortunately, there isn't a straightforward way to disable this behavior in the current implementation. However, you can manually apply the changes made by the extension during startup. To do this, you can remove the src/startup.ts script from the extension and create a custom build yourself.

Let me know if you need further clarification or assistance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants