Offer a way to configure nicer output with old nix-{build,shell} #288
Labels
No labels
Area/build-packaging
Area/evaluator
Area/flakes
Area/profiles
Area/remote-builds
Area/repl
Area/store
bug
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
ux
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#288
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It came up last night in #discuss that you can get the
bar-with-logs
output format with old-CLI commands as well by passing--log-format bar-with-logs
(which I somehow never realised...)I couldn't find a configuration option (in either cppnix or in lix) to set the log format (at least for interactive use), so this is basically a feature request for that.
I think it'd be nice to default to
bar-with-logs
in interactive use andraw
otherwise (so as to not break tooling that relies on parsing the raw build output)... but that might still be considered too much a breaking change vs cppnix at this stage?Another option would be to add a
log-format
(orinteractive-log-format
) nix.conf setting. The status quo already allowsalias nix-build=nix-build --log-format bar-with-logs
so it might just be considered Good Enough™the determination whether a single invocation is interactive or not is not really something lix can reasonably do? putting the alias you gave into a
.bash_profile
or equivalent might be the only way to do this that doesn't cause huge amounts of breakage :(hm, I figured "is stdout a tty?" would do it (early on in the entrypoint), but maybe that would cause complications I'm not seeing? I guess the alias is enough for now otherwise (and like, a separate lix CLI could always come with nicer defaults in the future)
nope unfortunately people shove things in pseudoterminals with alarming frequency if they do stuff like building CI systems or so. it's rather unfortunate.
we also suggest
nix build -L -f . someattr
for non flakes builds on the nix-command cli. it's not the nicest syntax (i have an alias nb that adds the -L for print build logs) but it does improve this.hmm yeah okay, I guess it's not really realistic then to do something nicer within the confines of cppnix's interface :\
tbh a lot of it is just old-cli being in muscle memory/in my mental model so I think I'll just add aliases for those to start with, but appreciate the suggestion. I'll close this then as I don't think it can really be implemented if stdout-is-tty isn't reliable enough