Skip to content

Conversation

jkeenan
Copy link
Contributor

@jkeenan jkeenan commented Sep 3, 2025

This is the first in a series of projected pull requests described in #23618 (comment). This p.r. addresses most items in the bullet point Preliminary code changes in the Perl guts in that comment. This p.r. is for research and discussion purposes, will start off in Draft status and will be labeled do not merge.

This p.r. does the following:

  • Changes exactly one statement in the Perl guts: In pp_ctl.c, changes the warning about the scheduled fatalization of Use of goto to jump into a construct to an exception implementing that fatalization.

  • Creates an item in pod/perldiag.pod for that exception's message. However, the full explanation for the exception and how to work around it has not yet been written. (Anyone want to take that on as a separate pull request?) Creating the item at least helps make test_porting to PASS.

  • Adapts test files other than the 3 files matching t/goto*.t to avoid or accommodate the now fatalized flavor of goto. Those test files are:

    • t/comp/package_block.t
    • t/lib/croak/pp_ctl
    • t/porting/deprecation.t
    • t/uni/labels.t

In t/porting/deprecation.t, I've simply commented-out some test blocks for now rather than removing them completely. We need to figure out whether those blocks were entirely focused on this particular deprecation or whether we were using them as exemplars of testing deprecation warnings more generally.

  • t/porting/goto.t: Temporarily turns this test file off. If it were left on, it would have massive failures. We need multiple eyeballs on the code here so that we have a better understanding of how goto needs to be tested. We'll be better positioned to do this in a subsequent pull request.

  • This set of changes requires a perldelta entry but that's a long way's off yet.

We're superseding a warning about the impending fatalization of
goto-label-jump with an exception.  Hence the deprecation warning no
longer needs to be tested in t/porting/deprecation.t.

However, we may (or may not) have been using that particular warning as
corpur for *other* tests of deprecation warnings.  For the time being,
we'll comment out 3 test blocks and mark them as TODO.
Temporarily skip all tests in t/op/goto.t; we expect massive failures
there.  Adapt all other tests which previously tested for a deprecation
warning.

At this point 'make test_harness' is PASSing (because everything in
t/op/goto. is getting skipped).
@jkeenan jkeenan added the do not merge Don't merge this PR, at least for now label Sep 3, 2025
@jkeenan jkeenan marked this pull request as draft September 3, 2025 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge Don't merge this PR, at least for now
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant