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 - No such file or directory error #1051

Closed
imincik opened this issue Mar 25, 2024 · 3 comments
Closed

devenv gc - No such file or directory error #1051

imincik opened this issue Mar 25, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@imincik
Copy link
Contributor

imincik commented Mar 25, 2024

Describe the bug

  • devenv gc it is throwing No such file or directory error.

To reproduce

  • Init devenv
mkdir test && cd test
devenv init
  • Enter and exit devenv shell
devenv shell
exit
  • Run devenv gc
devenv gc
• Removing non-existings symlinks in /home/imincik/.local/share/devenv/gc ... ...thread 'main' panicked at devenv/src/main.rs:1226:50:
Failed to read link: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
✔ Removing non-existings symlinks in /home/imincik/.local/share/devenv/gc ... in 0.0s.

Make sure to include full logs and what you expected to happen.

Version

devenv 1.0.1 (x86_64-linux

devenv version is showing version 1.0.1, but I run latest version from master branch.

@imincik imincik added the bug Something isn't working label Mar 25, 2024
@imincik
Copy link
Contributor Author

imincik commented Mar 25, 2024

I am sorry, but I still get the same error with latest master version

$ nix profile list

Index:              1
Flake attribute:    packages.x86_64-linux.default
Original flake URL: github:cachix/devenv/main
Locked flake URL:   github:cachix/devenv/e0440c5c88ae2a56813402f32377140840203c52
Store paths:        /nix/store/c4pzsvmg1jm3i9irbqsvfc9x2dd6hyrx-devenv-1.0.1 (1.0.1 is here due to mistake during the release process - version in Cargo.toml was not updated)


$ devenv gc
• Removing non-existing symlinks in /home/imincik/.local/share/devenv/gc ... ...thread 'main' panicked at devenv/src/main.rs:1230:50:
Failed to read link: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
✔ Removing non-existing symlinks in /home/imincik/.local/share/devenv/gc ... in 0.0s.

@domenkozar domenkozar reopened this Mar 25, 2024
@domenkozar
Copy link
Member

I'll take a look tomorrow.

@akiross
Copy link

akiross commented Apr 7, 2024

I have the same issue, but I think in my case is due to manually cleaning some gc roots in the nix store. So, for example, I have something like:

ls -l ~/.local/share/devenv/gc/
total 68
lrwxrwxrwx 1 theuser theuser 60 Mar 27 18:49 1711561765.832907369-shell -> /nix/store/sb7cih97x97j1syi5ajhkviwf43fyybc-devenv-shell-env
lrwxrwxrwx 1 theuser theuser 60 Mar 27 18:50 1711561844.356105786-shell -> /nix/store/sb7cih97x97j1syi5ajhkviwf43fyybc-devenv-shell-env
lrwxrwxrwx 1 theuser theuser 60 Mar 27 18:52 1711561945.188008136-shell -> /nix/store/lrchdycymm9jg38ynwh6ck7yymvkzbnv-devenv-shell-env

but the first link is non-existing e.g.

$ ls /nix/store/sb7cih97x97j1syi5ajhkviwf43fyybc-devenv-shell-env
ls: cannot access '/nix/store/sb7cih97x97j1syi5ajhkviwf43fyybc-devenv-shell-env': No such file or directory

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