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 gc does not seem to do anything. #1445

Open
iamtoaster opened this issue Sep 15, 2024 · 2 comments
Open

devenv gc does not seem to do anything. #1445

iamtoaster opened this issue Sep 15, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@iamtoaster
Copy link

Describe the bug
When running devenv gc, it says that it deleted 4 environments, yet they are still there, as evidenced by the next invocation of the command that also claims it deleted them.

To reproduce
Run devenv gc twice in a row

user@host [19:56:49] [~]
-> % devenv gc -v
✔ Removing non-existing symlinks in /home/user/data2/xdgdata/devenv/gc ... in 0.0s.
• Found 6 active environments.
• Deleted 12 dangling environments (most likely due to previous GC).
• Running garbage collection (this process will take some time) ... ...
• If you'd like this to run faster, leave a thumbs up at https://github.com/NixOS/nix/issues/7239
• Deleting /nix/store/zjnbnma9kj1d696fhisqdacvl8g81fii-devenv-shell-env...
• Running command: /nix/store/fsiaa9hq475kn55cbwgc3fakipy5gyzj-nix-2.24-devenv/bin/nix --show-trace --extra-experimental-features nix-command --extra-experimental-features flakes --option warn-dirty false --keep-going --max-jobs 4 --option eval-cache false store delete /nix/store/zjnbnma9kj1d696fhisqdacvl8g81fii-devenv-shell-env
• Deleting /nix/store/v6wjlq42sw7f7kvlwpaifzjkbamb7b24-devenv-shell-env...
• Running command: /nix/store/fsiaa9hq475kn55cbwgc3fakipy5gyzj-nix-2.24-devenv/bin/nix --show-trace --extra-experimental-features nix-command --extra-experimental-features flakes --option warn-dirty false --keep-going --max-jobs 4 --option eval-cache false store delete /nix/store/v6wjlq42sw7f7kvlwpaifzjkbamb7b24-devenv-shell-env
• Deleting /nix/store/3a2wgibz16qwl5rj11rbhyg2kfbks3j8-devenv-shell-env...
• Running command: /nix/store/fsiaa9hq475kn55cbwgc3fakipy5gyzj-nix-2.24-devenv/bin/nix --show-trace --extra-experimental-features nix-command --extra-experimental-features flakes --option warn-dirty false --keep-going --max-jobs 4 --option eval-cache false store delete /nix/store/3a2wgibz16qwl5rj11rbhyg2kfbks3j8-devenv-shell-env
• Deleting /nix/store/zkl550549shf4klv9kbp6hpvkdd7bsw4-devenv-shell-env...
• Running command: /nix/store/fsiaa9hq475kn55cbwgc3fakipy5gyzj-nix-2.24-devenv/bin/nix --show-trace --extra-experimental-features nix-command --extra-experimental-features flakes --option warn-dirty false --keep-going --max-jobs 4 --option eval-cache false store delete /nix/store/zkl550549shf4klv9kbp6hpvkdd7bsw4-devenv-shell-env
✔ Running garbage collection (this process will take some time) ... in 2.5s.

• Done. Successfully removed 0 symlinks in 2.5374038s.
user@host [19:58:09] [~]
-> % devenv gc -v
✔ Removing non-existing symlinks in /home/user/data2/xdgdata/devenv/gc ... in 0.0s.
• Found 6 active environments.
• Deleted 12 dangling environments (most likely due to previous GC).
• Running garbage collection (this process will take some time) ... ...
• If you'd like this to run faster, leave a thumbs up at https://github.com/NixOS/nix/issues/7239
• Deleting /nix/store/zkl550549shf4klv9kbp6hpvkdd7bsw4-devenv-shell-env...
• Running command: /nix/store/fsiaa9hq475kn55cbwgc3fakipy5gyzj-nix-2.24-devenv/bin/nix --show-trace --extra-experimental-features nix-command --extra-experimental-features flakes --option warn-dirty false --keep-going --max-jobs 4 --option eval-cache false store delete /nix/store/zkl550549shf4klv9kbp6hpvkdd7bsw4-devenv-shell-env
• Deleting /nix/store/zjnbnma9kj1d696fhisqdacvl8g81fii-devenv-shell-env...
• Running command: /nix/store/fsiaa9hq475kn55cbwgc3fakipy5gyzj-nix-2.24-devenv/bin/nix --show-trace --extra-experimental-features nix-command --extra-experimental-features flakes --option warn-dirty false --keep-going --max-jobs 4 --option eval-cache false store delete /nix/store/zjnbnma9kj1d696fhisqdacvl8g81fii-devenv-shell-env
• Deleting /nix/store/3a2wgibz16qwl5rj11rbhyg2kfbks3j8-devenv-shell-env...
• Running command: /nix/store/fsiaa9hq475kn55cbwgc3fakipy5gyzj-nix-2.24-devenv/bin/nix --show-trace --extra-experimental-features nix-command --extra-experimental-features flakes --option warn-dirty false --keep-going --max-jobs 4 --option eval-cache false store delete /nix/store/3a2wgibz16qwl5rj11rbhyg2kfbks3j8-devenv-shell-env
• Deleting /nix/store/v6wjlq42sw7f7kvlwpaifzjkbamb7b24-devenv-shell-env...
• Running command: /nix/store/fsiaa9hq475kn55cbwgc3fakipy5gyzj-nix-2.24-devenv/bin/nix --show-trace --extra-experimental-features nix-command --extra-experimental-features flakes --option warn-dirty false --keep-going --max-jobs 4 --option eval-cache false store delete /nix/store/v6wjlq42sw7f7kvlwpaifzjkbamb7b24-devenv-shell-env
✔ Running garbage collection (this process will take some time) ... in 2.6s.

• Done. Successfully removed 0 symlinks in 2.639676s.
user@host [19:58:12] [~]
-> %

Version

user@host [19:58:12] [~]
-> % devenv version
devenv 1.1.0 (x86_64-linux)
user@host [20:00:58] [~]
-> % nix --version
nix (Nix) 2.18.5

I am running nixos unstable with flakes enabled.

@iamtoaster iamtoaster added the bug Something isn't working label Sep 15, 2024
@sandydoo
Copy link
Member

I would imagine those paths are still live, which is why they weren't deleted. It might just be an issue in devenv's wording, but I don't know for sure.

You can verify this by running the raw Nix commands that are printed out in verbose mode. You'll likely see something like:

error: Cannot delete path '/nix/store/ba1gx9vrgfv2l51yd9lj8lfzzc2l56s0-devenv-shell-env' since it is still alive. To find out why, use: nix-store --query --roots and nix-store --query --referrers

@iamtoaster
Copy link
Author

iamtoaster commented Sep 18, 2024

You'll likely see something like

Yes, that is exaclty what is printed. So this is just a wording problem and not an actual issue?

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

2 participants