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

devenv test failing #1160

Open
jembishop opened this issue Apr 22, 2024 · 4 comments
Open

devenv test failing #1160

jembishop opened this issue Apr 22, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@jembishop
Copy link

jembishop commented Apr 22, 2024

I am trying to create a rust environment, and then run the devenv test command to verify it works on a CI job. When I set up the shell intitially it gave me this error:

 error:
       error: To use 'languages.rust.version', run the following command:

         $ devenv inputs add fenix github:nix-community/fenix --follows nixpkgs

So I ran the suggested command to get it to update the devenv.yaml and that seems to fix the devenv shell command.
However I still get this error when running devenv test, and I'm not sure how to fix it. Here is the version of devenv.yaml after the update:

inputs:
  fenix:
    url: github:nix-community/fenix
    inputs:
      nixpkgs:
        follows: nixpkgs
  nixpkgs:
    url: github:cachix/devenv-nixpkgs/rolling

Here is my devenv.nix

{ pkgs, lib, ... }:

{
  languages.rust = {
    enable = true;
    channel = "stable";

    components = [ "rustc" "cargo" "clippy" "rustfmt" "rust-analyzer" ];
  };
  enterShell = ''
     source <(just --completions bash)
  '';
  enterTest = ''
    just init-project
  '';
  packages = [pkgs.just pkgs.pre-commit];
}

Version
devenv 1.0.4 (aarch64-darwin)

@jembishop jembishop added the bug Something isn't working label Apr 22, 2024
@norbertwnuk
Copy link

norbertwnuk commented Apr 23, 2024

That seems to be a problem with imports in v1.0.4, like described here: #1149.
If that's the case, downgrade to v1.0.3 should resolve the problem:

nix profile list
nix profile remove X
nix profile install nixpkgs/e89cf1c932006531f454de7d652163a9a5c86668#devenv

@domenkozar
Copy link
Member

I'll release 1.0.5 today/tomorrow to fix this.

@norbertwnuk
Copy link

I confirm that v1.0.5 fixing #1149

@domenkozar
Copy link
Member

@jembishop can you confirm as well?

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

3 participants