Skip to content
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

nix: Add support for --keep-going and --keep-failed #2106

Closed
wants to merge 1 commit into from

Conversation

bgamari
Copy link
Contributor

@bgamari bgamari commented Apr 24, 2018

Adds the same flags as were previously used in nix-build.

Fixes #2105.

@dtzWill
Copy link
Member

dtzWill commented Apr 24, 2018

So, honestly this would satisfy all of the uses I have for -k and -K, but even so-- should these shortcuts be specific to nix build? Or maybe pushed up to work for all nix commands that build things?

@dtzWill
Copy link
Member

dtzWill commented Apr 24, 2018

I suppose --keep-going doesn't really make sense, I guess I just wanted to avoid the property we currently enjoy which is that you can often just replace nix log with nix build and such without worrying about which subcommands take which arguments.

And I suppose this should probably be added to documentation?

Also TIL that I can still set those values with --option haha, I always just switched to using nix-build :/.

@bgamari
Copy link
Contributor Author

bgamari commented Apr 29, 2018

Hmm, so apparently --keep-going is already supported. I'm a bit unsure of whether it would be better to:

a. add the short form to the mechanism that currently handles it (which I believe is the Setting class; see globals.hh line 97) and drop this patch, or
b. just drop the long form from this patch

@Ma27
Copy link
Member

Ma27 commented Jul 11, 2020

@edolstra any chance to get this merged? Would be really useful to have this for flakes as well.

@domenkozar domenkozar requested a review from edolstra October 8, 2020 12:20
@edolstra
Copy link
Member

edolstra commented Oct 8, 2020

--keep-going and --keep-failed already work because all nix.conf options are also supported as command line flags. So this only adds the -k and -K shortcuts, but I'm not sure whether they're sufficiently commonly used to justify a shortcut.

@stale
Copy link

stale bot commented Apr 7, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Apr 7, 2021
@asymmetric
Copy link
Contributor

@edolstra what's the point of having --keep-going as an option for the nix super-command, rather than only for nix build? Is it used in any other sub-command

I had a hard time finding this option, as I was only searching for it in nix help build.

@stale stale bot removed the stale label Nov 23, 2021
@thufschmitt
Copy link
Member

@edolstra what's the point of having --keep-going as an option for the nix super-command, rather than only for nix build? Is it used in any other sub-command

I guess it also makes sense (at least) for nix shell, nix develop or nix run. And also probably for nix eval --allow-import-from-derivation

@edolstra
Copy link
Member

what's the point of having --keep-going as an option for the nix super-command

There is no particular point, but keep-going and keep-failed are nix.conf settings, and all settings have a corresponding command-line option.

@stale
Copy link

stale bot commented Jun 12, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Jun 12, 2022
@fricklerhandwerk fricklerhandwerk added the cli The old and/or new command line interface label Mar 3, 2023
@stale stale bot removed the stale label Mar 3, 2023
@fricklerhandwerk fricklerhandwerk added the UX The way in which users interact with Nix. Higher level than UI. label Mar 3, 2023
@Ericson2314
Copy link
Member

Perhaps this should be closed, and instead if we want to think about which command should have which options with which shortcuts, #5638 is a better venue.

@Ericson2314
Copy link
Member

Closing for the reason above. We have the flags already, and we need better infrastructure if we want to limit the commands that that support these flags in a precise way.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-03-17-nix-team-meeting-minutes-41/26614/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli The old and/or new command line interface UX The way in which users interact with Nix. Higher level than UI.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Support '-j', '-k' and '-K' in the 'nix' command?
9 participants