xzfc / cached-nix-shell

Instant startup time for nix-shell
https://xzfc.github.io/cached-nix-shell/cached-nix-shell.1
The Unlicense
195 stars 16 forks source link

Cache is incorrectly invalidated on changes in the current directory #10

Closed expipiplus1 closed 4 years ago

expipiplus1 commented 4 years ago

Take for example the following derivation

{ pkgs ? import <nixpkgs> { } }:

pkgs.stdenv.mkDerivation {
  name = "foo";
  src = ./foo;
}

To reproduce:

expipiplus1 commented 4 years ago

This doesn't happen if cached-nix-shell is given the argument default.nix explicitly.

expipiplus1 commented 4 years ago

I guess this is happening because nix-shell is checking the current directory for the presence of default.nix or shell.nix

expipiplus1 commented 4 years ago

Perhaps the title isn't fair, it's correctly invalidated because indeed the contents of the directory have changed, however it would be possible to be more specific here.

expipiplus1 commented 4 years ago

How embarrassing, I seem to be unable to reproduce this, sorry.