Closed mikeland73 closed 2 months ago
For the scenario where a user clones a repo and does devbox install
, this PR's change will mean they have to wait a long time without much UI information about what is being installed. What does the UX look like?
Alternatively, we could preserve the old-behavior that prints output for each package, while having a --parallel
flag or DEVBOX_INSTALL_PARALLEL
env-var setting that runs it in parallel. EDIT: "parallel" is incorrect. Maybe "--bulk" or something? not sure.
@savil like @gcurtis mentioned, this does show output the entire time.
One thing this removed is the package by package manual output we used to do, specifically fmt.Sprintf("[%d/%d] %s", stepNum, total, pkg)
in it's place we now do:
ux.Finfo(
d.stderr,
"Installing the following packages to the nix store: %s\n",
strings.Join(packageNames, ", "),
)
This pull request was deployed and Sentry observed the following issues:
go.jetpack.io/devbox/internal/boxcli/usererr in...
View IssueDid you find this useful? React with a 👍 or 👎
Summary
This changes how
installNixPackagesToStore
callsnix.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 inpackagesToInstallInStore
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?