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
lib/strings: guard against an easy mistake #44928
Conversation
This would catch the bad `fwknop` flags fixed in 580cab5, during evaluation already.
Why do we have these helper functions? They don't provide any meaningful abstraction over literal strings IMHO. |
They don't really, but writing these ifs everywhere would seem cumbersome, if you want to pass the negative flags as well. |
According to documentation, the standard autoconf macros So |
Yes, sounds nice. It won't be possible to guard against the typo like this PR does :-) but that's a relatively small thing and without the function the typo may be harder to make. |
I'm not really in favor of these. I once had to spend a day reverting the previous attempt at such functions (https://github.com/NixOS/nixpkgs/commits/e3356b396d308264ab04cb3e997edc048af2fea2). The problem was that people starting exposing every configure flag as Nix function arguments... |
Any updates on this pull request? |
Thank you for your contributions.
|
Any updates on this pull request? |
@edolstra What's the rationale for merging it? Did something change in the last 2 years? EDIT: Change just seems to be about asserting |
This would catch the bad
fwknop
flags fixed in 580cab5, during evaluation already.