binplz / binplz.dev

binplz.dev
https://binplz.dev
5 stars 1 forks source link

Stream build logs to stdout and stderr #26

Closed considerate closed 2 years ago

considerate commented 2 years ago

This PR modifies the nixBuild function to write the logs to stderr and stdout while the build is in progress.

Closes #24

This is a draft because I haven't actually tested that the logs are printed correctly

considerate commented 2 years ago

An observation: Which packages are build are outputted to stderr while building. However, the actual build logs are excluded. Adding the -L flag enables the build logs, I assume that --print-build-logs as well as --log-format raw would do the same.

If that interferes with the --print-out-paths then enabling build logs should of course be avoided.

jonascarpay commented 2 years ago

Nice, this seems to work well. I'm holding off merging until #22 has been taken care of, I suspect there's some cleanup and rebasing to do.

An observation: Which packages are build are outputted to stderr while building. However, the actual build logs are excluded. Adding the -L flag enables the build logs, I assume that --print-build-logs as well as --log-format raw would do the same.

Adding -L seems to work fine, I guess the build logs only go to stderr?

considerate commented 2 years ago

@jonascarpay Thanks for testing this out!

Adding -L seems to work fine, I guess the build logs only go to stderr

I'll go ahead and add --print-build-logs to the nix build command then.

I'd appreciate a message here after #22 is merged so I don't forget to do the rebase.

jonascarpay commented 2 years ago

22 has been merged

considerate commented 2 years ago

@jonascarpay rebased onto master