jetify-com / devbox

Instant, easy, and predictable development environments
https://www.jetify.com/devbox/
Apache License 2.0
7.83k stars 187 forks source link

[perf] Add flag to fix missing store paths #2102

Closed mikeland73 closed 4 weeks ago

mikeland73 commented 1 month ago

Summary

Adds new --tidy-lockfile flag that can be used with install. It fills in any missing store paths in lockfile, improving future performance.

I'm not 100% convinced this works in all cases. My two biggest concerns would be:

How was it tested?

mikeland73 commented 1 month ago

@Lagoja @gcurtis made updates we talked about:

Lagoja commented 1 month ago

Running this, I get:

Warning: Outputs for libiconv@latest are not in lockfile. Fetching store paths from nix
To fix this issue and improve performance, please run `devbox install --fix-missing-store-paths

Are we fetching the store paths at the time that I get this message? Or do I need to run the command with the flag

mikeland73 commented 1 month ago

@Lagoja I need to hide the message when using the flag. Will do.

mikeland73 commented 4 weeks ago

Should we name the flag --tidy-lockfile? Are missing store paths in the lockfile a problem? I thought it just made things slower.

I like that name. Will change. It gives us flexibility to do more stuff.

missing store paths from lockfile can be a big perf drag, especially if all packages are in cache. If the store paths are missing we end up having to download nixpkgs every time (which adds 40s for each nixpkgs). Particularly painful on CICD because env is fresh every time.

sentry-io[bot] commented 4 weeks ago

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

Did you find this useful? React with a 👍 or 👎