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
Issue 8765 - Assert should show failing expression. + Issue 9255. #1426
Conversation
@9rnsr: Can I ask you for some advice? Edit: Removed long comment, issue is solved now. |
@AndrejMitrovic At least, all semantic processing should be done before entering glue layer. So calling |
Of course! I have to remind myself always to do this sort of thing in the front-end and never in the middle layer or backend. Thanks for the help Kenji. |
As a bonus, things will also be available in GDC/LDC without extra work necessary. ;) |
Ok let's see what the tester says, it ran ok on my machine. |
I've had these 64bit failures with my last pull #1203, where after a few days the autotester went green again, and then back to red. I really don't know what's causing it. |
Well, after 11 months I've rebased it. Let's see if it works. |
msg = resolveProperties(sc, msg); | ||
msg = msg->implicitCastTo(sc, Type::tchar->constOf()->arrayOf()); | ||
msg = msg->optimize(WANTvalue); | ||
if (msg->isLvalue()) // runtime value |
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.
This is wrong, to tell if it's a known compile-time value call optimize then check op == TOKstring
.
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.
Thanks.
Hmm still no word from autotester, I guess it's still down? |
No, the autotester is running. |
It's running, but the rate of new pulls and merges to master are high enough that the tester fleet is not able to make much headway into the backlog of things to test. More hardware would help. A shift of focus from creating pulls to merging pulls for a while would help too. Changing how the builds are prioritized would also help. |
I seem to be getting the same x64 failures as almost a year ago. https://d.puremagic.com/test-results/pull-history.ghtml?projectid=1&repoid=1&pullid=1426 @yebblies: Any idea what could be causing it? |
That's very strange. Does it still fail without the e2ir change? |
} | ||
else // no message -> use assert expression as msg | ||
{ | ||
OutBuffer buf; |
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.
This dance with the OutBuffer
is just mem.strdup(toChars())
I'll add a test-commit for the autotester. |
Nope, still fails. |
msg = msg->semantic(sc); | ||
msg = resolveProperties(sc, msg); | ||
msg = msg->implicitCastTo(sc, Type::tchar->constOf()->arrayOf()); |
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.
Hmm, maybe this line. You should move this to after the last call to ensureValidMessage
. I'm just guessing.
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.
Oh wait, it's inside ensureValidMessage
. Scratch that.
8765 - Assert should print failing expression. 9255 - Assert should print file name rather than module name, to be consistent with other Exception types.
yah this would be nice! |
Is anybody working on printing sub-expression values of failing asserts aswell? For details see my last post at: https://issues.dlang.org/show_bug.cgi?id=12480 |
I updated the phobos bitmanip unittests and sadly this still fails in std.numeric. |
ping |
ping |
#1203 had to be closed because Github has some bugs with rebasing. Unlike the previous pull this one has unittests.
Fixes Issue 8765 - Assert should print failing expression.
Fixes Issue 9255 - Assert should print file name rather than module name, to be consistent with other Exception types.
Note that fixing 9255 is automatic after Fixing 8765 due to the change in code paths (a message now always exists and therefore the if statement is always taken).