You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[nix] Build all packages in same nix command (#2032)
## Summary
This changes how `installNixPackagesToStore` calls `nix.Build` so that
it installs all installables in same nix command.
It does this by grouping all installables into two groups, one for
allow-insecure and other for default and runs `build` on both groups (if
not empty)
I was able to remove `packageInstallErrorHandler` because it is already
called in `packagesToInstallInStore` so we will never actually try to
build something that can't build on the system, or if it requires
`--allow-insecure` we will notice it then.
This does change our segment logging to group packages together for
install times, so we will need to do some more work on the metrics side
to determine slow packages.
## How was it tested?
* Installed multiple packages not present in my nix store at once,
including a combination of secure and insecure ones.
* Tried to install something that doesn't build on my system, saw
correct error message
## Perf test
Anecdotal test:
Using the following
<img width="257" alt="image"
src="https://github.com/jetify-com/devbox/assets/544948/8b1ab39c-7a1b-40d3-ab5a-516cde3b1525">
Before
<img width="261" alt="image"
src="https://github.com/jetify-com/devbox/assets/544948/ce397f59-1eaf-41dc-8256-6306f36e596b">
After
<img width="293" alt="image"
src="https://github.com/jetify-com/devbox/assets/544948/55ed3214-ff1d-4115-b767-7ad5d29dedd3">
0 commit comments