-
Notifications
You must be signed in to change notification settings - Fork 193
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
[perf] Add flag to fix missing store paths #2102
Conversation
Running this, I get:
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 |
internal/devpkg/package.go
Outdated
// No fast path, we need to query nix. | ||
ux.Fwarning( | ||
w, | ||
"Outputs for %s are not in lockfile. Fetching store paths from nix\n"+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Outputs for %s are not in lockfile. Fetching store paths from nix\n"+ | |
"Outputs for %s are not in lockfile.+ |
@Lagoja I need to hide the message when using the flag. Will do. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we name the flag --tidy-lockfile
? Are missing store paths in the lockfile a problem? I thought it just made things slower.
Path: storePath, | ||
Name: parts.Output, | ||
// Ugh, not sure this is true, but it's more true than not. | ||
Default: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the downside if this ends up being wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not much. We may install a bit more than we're supposed to (on the other hand, if we forget to add this value, that's bad).
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. |
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
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?