Skip to content

Conversation

@mauke
Copy link
Contributor

@mauke mauke commented Mar 16, 2025

  • recognize the short form() as well as Perl_form()
  • accept/ignore spaces between Perl_croak( and aTHX_

With this change, diag.t now recognizes several diagnostic messages that went undetected previously (note the space before aTHX_):

  • perlio.c

          Perl_croak( aTHX_
              "%s (%" UVuf ") does not match %s (%" UVuf ")",
    
              Perl_croak( aTHX_
                  "%s (%" UVuf ") smaller than %s (%" UVuf ")",
    
  • regcomp_trie.c

                      Perl_croak( aTHX_ "error creating/fetching widecharmap entry for 0x%" UVXf, uvc );
    
          default: Perl_croak( aTHX_ "panic! In trie construction, unknown node type %u %s", (unsigned) flags, REGNODE_NAME(flags) );
    
                          Perl_croak( aTHX_ "panic! In trie construction, no char mapping for %" IVdf, uvc );
    

This PR partially overlaps with #23017. Merging either will cause conflicts in the other that will have to be resolved manually.

(In particular, if this PR is merged first, the diag.t changes from #23017 can be dropped, as can some of the perldiag.pod additions. But that PR also modifies the perlio.c messages, so their old forms added here ("%s (%d) does not match %s (%d)", "%s (%d) smaller than %s (%d)") will have to be deleted.)


  • This set of changes does not require a perldelta entry.

- recognize the short form() as well as Perl_form()
- accept/ignore spaces between `Perl_croak(` and `aTHX_`

With this change, diag.t now recognizes several diagnostic messages that
went undetected previously (note the space before `aTHX_`):

- perlio.c

            Perl_croak( aTHX_
                "%s (%" UVuf ") does not match %s (%" UVuf ")",

                Perl_croak( aTHX_
                    "%s (%" UVuf ") smaller than %s (%" UVuf ")",

- regcomp_trie.c

                        Perl_croak( aTHX_ "error creating/fetching widecharmap entry for 0x%" UVXf, uvc );

            default: Perl_croak( aTHX_ "panic! In trie construction, unknown node type %u %s", (unsigned) flags, REGNODE_NAME(flags) );

                            Perl_croak( aTHX_ "panic! In trie construction, no char mapping for %" IVdf, uvc );

This PR partially overlaps with Perl#23017. Merging either will cause
conflicts in the other that will have to be resolved manually.

(In particular, if this PR is merged first, the diag.t changes from
Perl#23017 can be dropped, as can some of the perldiag.pod additions. But
that PR also modifies the perlio.c messages, so their old forms added
here ("%s (%d) does not match %s (%d)", "%s (%d) smaller than %s (%d)")
will have to be deleted.)
@mauke mauke merged commit 6a4f62c into Perl:blead Mar 17, 2025
34 checks passed
@mauke mauke deleted the fix-porting-diag-space-athx branch March 17, 2025 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants