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

libexpr: show expression in assertion errors #3313

Merged
merged 1 commit into from Jan 13, 2020

Conversation

@LnL7
Copy link
Member

@LnL7 LnL7 commented Jan 11, 2020

Includes the expression of the condition in the assertion message if
the assertion failed, making assertions much easier to debug. eg.

error: assertion (withPython -> (python2Packages != null)) failed at pkgs/tools/security/nmap/default.nix:11:1
@bjornfor
Copy link
Contributor

@bjornfor bjornfor commented Jan 11, 2020

That's very useful! There is a small typo in the commit message.

Includes the expression of the condition in the assertion message if
the assertion failed, making assertions much easier to debug. eg.

    error: assertion (withPython -> (python2Packages != null)) failed at pkgs/tools/security/nmap/default.nix:11:1
@LnL7 LnL7 force-pushed the LnL7:assert-show-expression branch from c9e8bf2 to 307bcb9 Jan 11, 2020
@LnL7 LnL7 changed the title libexpr: show expressiion in assertion errors libexpr: show expression in assertion errors Jan 11, 2020
@FRidh
Copy link
Member

@FRidh FRidh commented Jan 11, 2020

let me guess, overrides did not function because of the assert?

@edolstra edolstra merged commit 307bcb9 into NixOS:master Jan 13, 2020
@LnL7 LnL7 deleted the LnL7:assert-show-expression branch Jan 13, 2020
@LnL7
Copy link
Member Author

@LnL7 LnL7 commented Jan 13, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.