Open SamoylovMD opened 1 month ago
Do you have SSD?
@domenkozar Yes, I also can provide some other hardware stats if it helps
Can you pass -v
to devenv and paste the logs?
Here it is:
➜ devenv-test-3 devenv -v shell
• Building shell ...
• Using Cachix: devenv
• Running command: nix --show-trace --extra-experimental-features nix-command --extra-experimental-features flakes --option warn-dirty false --option eval-cache false --keep-going --max-jobs 6 print-dev-env --profile /Users/maksims/tmp/devenv-test-3/.devenv/gc/shell --option extra-substituters https://devenv.cachix.org --option extra-trusted-public-keys devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=
• Creating symlink /nix/store/mkf4rrcqpahfb2m1z7y8y4mhahpmdr30-devenv-shell-env -> /Users/maksims/.local/share/devenv/gc/1712571332.248852000-shell
✔ Building shell in 40.6s.
• Entering shell
• Running command: nix --show-trace --extra-experimental-features nix-command --extra-experimental-features flakes --option warn-dirty false --option eval-cache false --keep-going --max-jobs 6 develop /Users/maksims/tmp/devenv-test-3/.devenv/gc/shell
✨ devenv 1.0.2 is out of date. Please update to 1.0.3: https://devenv.sh/getting-started/#installation
hello from devenv
git version 2.43.2
I noticed that it downloaded some tar.gz from NixOS github for a very long time (~5-10 minutes or so), while the size of a file was around 40Mb, which with my network bandwidth should have been downloaded in less than 1 second. But other stages are slow too.
What happens if you run nix --show-trace --extra-experimental-features nix-command --extra-experimental-features flakes --option warn-dirty false --option eval-cache false --keep-going --max-jobs 6 print-dev-env --profile /Users/maksims/tmp/devenv-test-3/.devenv/gc/shell --option extra-substituters https://devenv.cachix.org --option extra-trusted-public-keys devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=
and how long does it take?
@domenkozar I executed the command as-is, and it printed:
path '/Users/maksims/tmp/devenv-test-3' does not contain a 'flake.nix', searching up error: could not find a flake.nix file
You need to run it in the same directory.
Same with what exactly? I ran the command in the root directory of my project with devenv:
(devenv) prgm-msamoilov2:devenv-test-3 maksims$ pwd /Users/maksims/tmp/devenv-test-3 (devenv) prgm-msamoilov2:devenv-test-3 maksims$ ls -la total 36 drwxr-xr-x 11 maksims staff 352 Apr 5 13:17 . drwxr-xr-x 13 maksims staff 416 Apr 15 16:52 .. drwxr-xr-x 9 maksims staff 288 Apr 5 13:02 .devenv -rw-r--r-- 1 maksims staff 5146 Apr 8 12:14 .devenv.flake.nix drwxr-xr-x 4 maksims staff 128 Apr 5 13:05 .direnv -rw-r--r-- 1 maksims staff 176 Apr 5 13:02 .envrc -rw-r--r-- 1 maksims staff 91 Apr 5 13:02 .gitignore -rw-r--r-- 1 maksims staff 4028 Apr 5 13:02 devenv.lock -rw-r--r-- 1 maksims staff 5082 Apr 5 13:17 devenv.log -rw-r--r-- 1 maksims staff 749 Apr 5 13:02 devenv.nix -rw-r--r-- 1 maksims staff 341 Apr 5 13:02 devenv.yaml (devenv) prgm-msamoilov2:devenv-test-3 maksims$ nix --show-trace --extra-experimental-features nix-command --extra-experimental-features flakes --option warn-dirty false --option eval-cache false --keep-going --max-jobs 6 print-dev-env --profile /Users/maksims/tmp/devenv-test-3/.devenv/gc/shell --option extra-substituters https://devenv.cachix.org --option extra-trusted-public-keys devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw= path '/Users/maksims/tmp/devenv-test-3' does not contain a 'flake.nix', searching up error: could not find a flake.nix file
Describe the bug I am facing an issue with
devenv shell
overall performance. Runningdevenv shell
right afterdevenv init
(no other changes in the code) takes really long time, ~1 minute usually. Moreover, the time is the same on each run. This behaviour is the same for my real projects.Related Discord thread
To reproduce
devenv init
devenv shell
and wait for initializationdevenv shell
againVersion
MacOS Sonoma 14.3, Intel-based, zsh.
Logs
devenv.log