-
Notifications
You must be signed in to change notification settings - Fork 602
Don't warn about jumping into a construct if we're DIE-ing #23922
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
base: blead
Are you sure you want to change the base?
Conversation
There are many cases where we throw exceptions if you attempt to goto somewhere you have no business going. We'd *also* throw a deprecation warning in these cases, which just seems silly. Deprecated means "this will stop working eventually", so there's no need to throw that when we're just going to die right now.
71f977b to
8493142
Compare
Thanks for taking a look at this. I hope to get to this Sunday or early next week. |
This branch explores the question: What if we accept Matt Horsfall's suggested revision in pp_ctl.c (GH Perl#23922) into blead, then accept the goto-label-fatal branch underlying p.r. GH Perl#23782 into blead? Once a couple of merge conflicts were revised, the result would configure and build but would fail two test files: op/goto.t (Wstat: 0 Tests: 75 Failed: 23) Failed tests: 53-75 uni/labels.t (Wstat: 0 Tests: 11 Failed: 1) Failed test: 10 The failures in t/op/goto.t would be not at all surprising. Those tests are tests which currently pass in blead but which would fail if the code changes in pp_ctl.c in 23782 were directly merged into blead. I first deleted those tests from t/op/goto.t, then added them back in so that we would have a tally of the ways in which 'goto LABEL' would *no longer* work. So if we first merged 23922, we would presumably re-work those 23 test to pass in an informative way. I'll need to look further into t/uni/labels.t.
|
Your pull request changes I would expect that if right now I hacked up blead to simply comment out those 6 instances -- without yet making any changes in ... I would probably get 6 test failures. Instead, I only get 3 test failures. Can you explain why I'm only getting 3 failures instead of 6? |
I'm going to answer my own question by proposing p.r. #23943. The 3 failures I was expecting but not getting are unit tests which, per my research, no longer need |
There are many cases where we throw exceptions if you attempt to goto somewhere you have no business going. We'd also throw a deprecation warning in these cases, which just seems silly. Deprecated means "this will stop working eventually", so there's no need to throw that when we're just going to die right now.
This probably warrants a changelog entry.
IMO, this could (should) be merged, and then #23782 could be built on this, changing the
deprecate_fatal_into a DIE() to match the other goto exceptions...