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

Stuck applying environment #49

Closed
faldor20 opened this issue Mar 1, 2021 · 7 comments
Closed

Stuck applying environment #49

faldor20 opened this issue Mar 1, 2021 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@faldor20
Copy link

faldor20 commented Mar 1, 2021

Describe the bug
When i select my environment it just says applying environment forever

To Reproduce
Steps to reproduce the behavior:
1.Select envirnment
2.Select shell.nix
3.Wait forever??
Expected behavior
It loads the environment.

Environment:

  • OS: [nixos 20.09]
  • VS Code
  • Version 1.0.2

Additional context
My nix shell:

{ pkgs ? import <nixpkgs> {} }:

pkgs.mkShell {
  buildInputs = [
    pkgs.hello

    # keep this line if you use bash
    pkgs.bashInteractive
  ];
}
@faldor20 faldor20 added the bug Something isn't working label Mar 1, 2021
@cordarei
Copy link

cordarei commented Mar 2, 2021

I've been getting this same behavior recently; I tried downgrading to 0.1.2 and it works fine, so it looks like the issue is only with version 1.0.2. I am using VSCode on Windows inside a WSL2 environment.

@arrterian
Copy link
Owner

Should be fixed in v1.0.4

@arrterian
Copy link
Owner

@faldor20 can you confirm that the issue resolved?

@cordarei
Copy link

Not the issue author, but I can confirm that 1.0.4 is working for me.

@faldor20
Copy link
Author

Yeah sorry. I'm not setup with nix right now. I'll take @cordarei 's word for it :)

@Hjdskes
Copy link

Hjdskes commented Apr 17, 2021

I seem to be facing this on 1.0.7. I'm using the workspace feature as suggested elsewhere:

{
	"folders": [
		{
			"path": "."
		}
	],
	"settings": {
		"nixEnvSelector.suggestion": false,
		"nixEnvSelector.nixFile": "${workspaceRoot}/shell.nix"
	}
}

My shell.nix:

{ pkgs ? import ./haskell.nix
, hsPkgs ? import ./default.nix {} }:

let
  terraform = pkgs.terraform_0_14.withPlugins(p: [ p.aws ]);
in hsPkgs.shellFor {
  # Include only the *local* packages of your project.
  packages = ps: with ps;
    [ shiba ];

  # Builds a Hoogle documentation index of all dependencies,
  # and provides a "hoogle" command to search the index.
  withHoogle = true;

  # You might want some extra tools in the shell (optional).

  # Some common tools can be added with the `tools` argument
  tools = { cabal = "3.2.0.0"; hlint = "2.2.11"; stylish-haskell = "0.12.2.0"; };
  # See overlays/tools.nix for more details

  # Some you may need to get some other way.
  buildInputs = with hsPkgs.haskellPackages;
    [ terraform pkgs.awscli ];

  # Prevents cabal from choosing alternate plans, so that
  # *all* dependencies are provided by Nix.
  exactDeps = true;
}

It's a fairly standard haskell.nix setup. Let me know if you want me to open a new issue and if you need to see the rest of my nix files as well!

@arrterian
Copy link
Owner

@Hjdskes it seems there is not a related bug (I just miss error handling somewhere). Please, create a new issue with your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants