Skip to content

regen/embed.pl: Split list into two - #24662

Open
khwilliamson wants to merge 3 commits into
Perl:bleadfrom
khwilliamson:split
Open

regen/embed.pl: Split list into two#24662
khwilliamson wants to merge 3 commits into
Perl:bleadfrom
khwilliamson:split

Conversation

@khwilliamson

Copy link
Copy Markdown
Contributor

See #24593

Perl 5.44 added the ability to control much better which symbols Perl
exports to modules, and which are hidden. It added a large list of
symbols that we continue to export, pending a decision on each one's
ultimate disposition. This ensures that we don't break something in the
meantime.

This and the next commit help inform that decision by splitting that
list into two: one of symbols which actually appear on cpan; and one
where there is no apparent usage. Items on the actually-used list need
to be examined more closely before deciding to stop exporting them. One
might think that of course we have to continue to export any such item,
but we learned recently in examining the KEY_END and KEY_NULL symbols,
that the uses on cpan were of different symbols with the same names.
Hence our exported symbols were actually namespace pollutants, and
should not be exported. (The cpan uses were for keyboard presses of the
'END' key and the CTRL-@ key (NUL).

I grepped a snapshot of metacpan for all the symbols whose status is
unresolved in embed.pl. My methodology was to
1) checkout the repository
2) grep files with suffixes .c .h .inc* .xs
3) also run the 'file' command on every file, and grep those
whose output indicated it was C language.

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

See Perl#24593

Perl 5.44 added the ability to control much better which symbols Perl
exports to modules, and which are hidden.  It added a large list of
symbols that we continue to export, pending a decision on each one's
ultimate disposition.  This ensures that we don't break something in the
meantime.

This and the next commit help inform that decision by splitting that
list into two: one of symbols which actually appear on cpan; and one
where there is no apparent usage.  Items on the actually-used list need
to be examined more closely before deciding to stop exporting them.  One
might think that of course we have to continue to export any such item,
but we learned recently in examining the KEY_END and KEY_NULL symbols,
that the uses on cpan were of different symbols with the same names.
Hence our exported symbols were actually namespace pollutants, and
should not be exported.  (The cpan uses were for keyboard presses of the
'END' key and the CTRL-@ key (NUL).

I grepped a snapshot of metacpan for all the symbols whose status is
unresolved in embed.pl.  My methodology was to
    1) checkout the repository
    2) grep files with suffixes .c .h .inc* .xs
    3) also run the 'file' command on every file, and grep those
       whose output indicated it was C language.

The change is in two parts.
    1) This commit just creates the second table (empty), revises the
       comments, and sorts the original table (which had gotten slightly
       out of order) so that I could use the 'comm' comand for the next
       step.
    2) The second commit actually splits the symbols

The reason for the two commits is simply to help reviewers (and me)
check that I didn't do anything untoward.  The next commit should have
the same number of insertions as deletions, indicating nothing got added
or removed by the commit, without having to verify the nearly 1300
changes individually.
The commit message in the previous commit gives the reason this is being
done.
I don't know why this got commented out; using it means further
reductions in complexity of an expression.
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.

1 participant