nix-env-selector
nix-env-selector copied to clipboard
Have the extension output logs in the Output window
Hi!
I had a problem with my nix environment file, but I couldn’t find any error log in VS Code itself. AFAIK your extension doesn’t log anything anywhere at the moment. There exists an output window that extensions can use to send their log to. This would be useful to get feedback if something went wrong.
How to reproduce the behavior:
Open a folder on VS Code with a env.nix
file containing:
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/refs/tags/21.05.tar.gz") {} }:
pkgs.mkShell {
buildInputs = [
pkgs.npm
];
}
Open the command palette and use Nix-Env: select environment
to select env.nix
. The extension will hang on forever while trying to apply the environment.
Using nix-shell env.nix
in a terminal instead logs this error:
error: attribute 'npm' missing, at folder/env.nix:5:9
and terminate its process.
I’m kinda busy at the moment, but I can make a pull request if I find some free time if you would like. Thanks for your time!
I consider your issue completely valid. The topic has arisen in other discussions. If you will able to add logging it'll be awesome :) Thank you for your contribution 👍
I should have some free time in July!
Would love to see that as well!
Done in #84 by @nh2