Repository navigation
RFC pragma(breakpoint) - #21758
RFC pragma(breakpoint)#21758benjones wants to merge 9 commits into
Conversation
|
Thanks for your pull request and interest in making D better, @benjones! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#21758" |
b16de19 to
7dda94d
Compare
|
more (potential) discussion here: https://forum.dlang.org/post/bfznqduaojatgfxunygl@forum.dlang.org |
7c31bc2 to
26e1f78
Compare
26e1f78 to
ee7e2e9
Compare
|
I've added the outline of making this interactive: I assume there's a way to add this to the test above to make it run non-interactively? Thoughts/feedback? Next thing to add will be something to print symbols in the various scopes of the backtrace. |
ee7e2e9 to
2d455ef
Compare
9acb6b3 to
e592769
Compare
223404d to
668aec8
Compare
|
Finally had some time to come back to this. Any feedback on the functionality? There's definitely some improvements to be made to the implementation, but I'll hold off on them until I'm confident that this is headed in the right direction. I can't tell if my test is causing the CI to hang, or if it's normal issues (looks to be hanging on ... fail_compilation/cast_qual.d -verrors=simple -verrors=0 -preview=dip1000 -de -fPIC () on the Ubuntu runners which makes me think it's not an issue with my new dshell test, but I can't use the runner locally since I'm on an ARM mac...) |
12b890e to
3019896
Compare
3019896 to
cb7a451
Compare
cb7a451 to
2949e78
Compare
bb15867 to
64dc4df
Compare
64dc4df to
48c7987
Compare
c4e255b to
798ca1e
Compare
| .map!(l => l.replace("\\", "/")) //paths are different on different platforms. TODO, use module name instead? | ||
| .filter!(l => l.length > 0) | ||
| .join("\n"); | ||
| assert(output == expectedOutput, "actual output:\n" ~ output ~ "\nexpected output:\n" ~ expectedOutput); |
There was a problem hiding this comment.
ERROR: Found the following residual temporary files.
ERROR: Temporary files should be stored in `test_results` or explicitly removed.
?? compiler/test/pragmabreakpoint
| while(true) | ||
| { | ||
| auto result = tryWait(proc); | ||
| if(result.terminated){ |
There was a problem hiding this comment.
spaces between if and opening (
| enforce(result.status == 0); | ||
| break; | ||
| } | ||
| if(MonoTime.currTime > deadline){ |
| inputPipe.writeEnd.write("bt\nm 3\nc\nc\nc\nbt\nm 1\nc\nc\nc\nc\n"); //2 extra "continue" + newlines should be ignored | ||
| inputPipe.writeEnd.flush(); | ||
| const deadline = MonoTime.currTime + 5.seconds; | ||
| while(true) |
|
This looks good to me, you might want to bring this up at the Foundation monthly. |
I'll fix the issues you brought up later today, hopefully. When is the next meeting? I've never joined one before (my email is ben.james.jones@gmail.com if you want to take this out of the PR comments) |
Here's a first pass at
pragma(breakpoint)as I described in my dconf talk. So far, it's basically pragma(backtrace) with no interactive features. Curious what people think about this (is it useful? is it the right information?)Here's the output from the new test: