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
tryEval: only provide value on success #2424
Conversation
@edolstra what do you think of this? |
I marked this as stale due to inactivity. → More info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense! Enables behaviour like
(builtins.tryEval (assert (1 == 2); 3)).value or "foobar"
(currently this gives false
, after this change it would be "foobar"
)
I marked this as stale due to inactivity. → More info |
can be done like before this is merged we'd have to change nixpkgs
it'd also be difficult to support old nix versions too so i think this can't be merged |
I think this would be a good idea if we had a language versioning story. |
This would make for a good addition to Nixpkgs lib. Small but breaking changes like this are not worth the cost of breaking old expressions.
Nixpkgs lib is a decent story for "replacing" builtins. |
See #2421