Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.9k stars 540 forks source link

Porting/sync-with-cpan having trouble with version declared in package statement #22395

Closed jkeenan closed 1 month ago

jkeenan commented 1 month ago

Yesterday I received email notification of the release of podlators-v6.0.0. (It now uses semantic versioning.) Porting/core-cpan-diff confirmed this:

...
podlators:
    Perl: RRA/podlators-5.01.tar.gz
    CPAN: RRA/podlators-v6.0.0.tar.gz
...

I prepared to sync v6.0.0 into blead, which required me to first removed the CUSTOMIZED entry for cpan/podlators in Porting/sync-with-cpan. All went smoothly after that, but just at the point where I was ready to create a pull request, I decided to check the overall diff from my local branch to blead. I discovered, that Porting/sync-with-cpan apparently failed to pick up the declaration of versioning which now looks like this on CPAN:

$ ack '^package ' lib/
lib/Pod/Man.pm
15:package Pod::Man v6.0.0;

lib/Pod/Text/Termcap.pm
13:package Pod::Text::Termcap v6.0.0;

lib/Pod/Text/Overstrike.pm
20:package Pod::Text::Overstrike v6.0.0;

lib/Pod/Text/Color.pm
13:package Pod::Text::Color v6.0.0;

lib/Pod/ParseLink.pm
14:package Pod::ParseLink v6.0.0;

lib/Pod/Text.pm
15:package Pod::Text v6.0.0;

In my branch, I got diffs like this:

diff --git a/cpan/podlators/lib/Pod/Text.pm b/cpan/podlators/lib/Pod/Text.pm
index ef76bd9d03..83a7ce22a8 100644
--- a/cpan/podlators/lib/Pod/Text.pm
+++ b/cpan/podlators/lib/Pod/Text.pm
@@ -24,8 +24,7 @@ use Exporter ();
 use Pod::Simple ();

 our @ISA = qw(Pod::Simple Exporter);
-our $VERSION = '5.01_02';
-$VERSION =~ tr/_//d;
+our $VERSION = '5.01';

Further inspection showed that none of the real code changes from v6.0.0 were picked up. (See: https://github.com/jkeenan/perl5/tree/podlators-sync-20241011.)

I haven't yet inspected Porting/sync-with-cpan to see whether the problem comes from the (new) absence of $VERSION in the lib/Pod/*.pm files or from the semantic versioning in the package declaration -- or the combination of the two. In any event, my belief is that Porting/sync-with-cpan needs some repairs. (I'll hold off on attempting a sync of podlators-v6.0.0 into blead pending discussion.)

demerphq commented 1 month ago

Can you share the invocation arguments please?

Yves

On Thu, 11 Jul 2024, 10:06 James E Keenan, @.***> wrote:

Yesterday I received email notification of the release of podlators-v6.0.0. (It now uses semantic versioning.) Porting/core-cpan-diff confirmed this:

... podlators: Perl: RRA/podlators-5.01.tar.gz CPAN: RRA/podlators-v6.0.0.tar.gz ...

I prepared to sync v6.0.0 into blead, which required me to first removed the CUSTOMIZED entry for cpan/podlators in Porting/sync-with-cpan. All went smoothly after that, but just at the point where I was ready to create a pull request, I decided to check the overall diff from my local branch to blead. I discovered, that Porting/sync-with-cpan apparently failed to pick up the declaration of versioning which now looks like this on CPAN:

$ ack '^package ' lib/ lib/Pod/Man.pm 15:package Pod::Man v6.0.0;

lib/Pod/Text/Termcap.pm 13:package Pod::Text::Termcap v6.0.0;

lib/Pod/Text/Overstrike.pm 20:package Pod::Text::Overstrike v6.0.0;

lib/Pod/Text/Color.pm 13:package Pod::Text::Color v6.0.0;

lib/Pod/ParseLink.pm 14:package Pod::ParseLink v6.0.0;

lib/Pod/Text.pm 15:package Pod::Text v6.0.0;

In my branch, I got diffs like this:

diff --git a/cpan/podlators/lib/Pod/Text.pm b/cpan/podlators/lib/Pod/Text.pm index ef76bd9d03..83a7ce22a8 100644 --- a/cpan/podlators/lib/Pod/Text.pm +++ b/cpan/podlators/lib/Pod/Text.pm @@ -24,8 +24,7 @@ use Exporter (); use Pod::Simple ();

our @ISA = qw(Pod::Simple Exporter); -our $VERSION = '5.0102'; -$VERSION =~ tr///d; +our $VERSION = '5.01';

Further inspection showed that none of the real code changes from v6.0.0 were picked up. (See: https://github.com/jkeenan/perl5/tree/podlators-sync-20241011.)

I haven't yet inspected Porting/sync-with-cpan to see whether the problem comes from the (new) absence of $VERSION in the lib/Pod/*.pm files or from the semantic versioning in the package declaration -- or the combination of the two. In any event, my belief is that Porting/sync-with-cpan needs some repairs. (I'll hold off on attempting a sync of podlators-v6.0.0 into blead pending discussion.)

— Reply to this email directly, view it on GitHub https://github.com/Perl/perl5/issues/22395, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAZ5RZLCI5MA2GI3UQXN6DZL2GNVAVCNFSM6AAAAABKXCBACSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQYDGMRYGIZDMOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

jkeenan commented 1 month ago

On 7/11/24 10:11, Yves Orton wrote:

Can you share the invocation arguments please?

$ perl Porting/sync-with-cpan podlators

Since I had already removed the CUSTOMIZED block for cpan/podlators from Porting/Maintainers.pl, I could have called:

$ perl Porting/sync-with-cpan podlators --yes

... but I chose to play it safe.

jkeenan commented 1 month ago

There are upstream problems, discussed in https://github.com/rra/podlators/issues/32, which need to be resolved before we sync podlators-v6.0.0 into blead. But that need not prevent us from diagnosing the problem with Porting/sync-with-cpan described in this ticket.

haarg commented 1 month ago

I can't reproduce this problem. After removing the CUSTOMIZED entries for podlators, running perl Porting/sync-with-cpan podlators properly brings podlators 6.0.0 into the tree.

The files in lib/ will still be the older 5.01_02 files, but that's because of the noted problems with autodie.

Leont commented 1 month ago

It does seem to work for me when I run perl Porting/sync-with-cpan podlators --yes. What perl (/Module::Metadata?) are you running sync-with-cpan with?

jkeenan commented 1 month ago

It does seem to work for me when I run perl Porting/sync-with-cpan podlators --yes. What perl (/Module::Metadata?) are you running sync-with-cpan with?

1.000038 -- the version that ships with perl-5.40.0 and, currently, in blead.

jkeenan commented 1 month ago

I can't reproduce this problem. After removing the CUSTOMIZED entries for podlators, running perl Porting/sync-with-cpan podlators properly brings podlators 6.0.0 into the tree.

The files in lib/ will still be the older 5.01_02 files, but that's because of the noted problems with autodie.

I've provided a pull request upstream that I believe will address this problem: https://github.com/rra/podlators/pull/33

jkeenan commented 1 month ago

I can't reproduce this problem. After removing the CUSTOMIZED entries for podlators, running perl Porting/sync-with-cpan podlators properly brings podlators 6.0.0 into the tree. The files in lib/ will still be the older 5.01_02 files, but that's because of the noted problems with autodie.

I've provided a pull request upstream that I believe will address this problem: rra/podlators#33

This pull request was accepted upstream with some reworking by @rra, and I no longer have evidence that Porting/sync-with-cpan is itself having problems with version numbers in package statements. So I'm closing this issue. Thank you very much.