perl5 icon indicating copy to clipboard operation
perl5 copied to clipboard

CPAN distributions broken by switch removal

Open jkeenan opened this issue 1 year ago • 5 comments

In this ticket we'll log reports of CPAN distributions failing to build or test due to the recent switch removal. Note that as the removal took place over a number of commits, the exact breaking commit may differ from distro to distro.

Scope-Upper: Note that this is a build-time failure.

Sample Failure Report: http://www.cpantesters.org/cpan/report/29f2f986-5c6b-11ef-8502-e54faa8b0520

Excerpt of Failure Report:

cp lib/Scope/Upper.pm blib/lib/Scope/Upper.pm
Running Mkbootstrap for Upper ()
chmod 644 "Upper.bs"
"/home/cpan/bin/perl/bin/perl5.41.3" -MExtUtils::Command::MM -e 'cp_nonempty' -- Upper.bs blib/arch/auto/Scope/Upper/Upper.bs 644
"/home/cpan/bin/perl/bin/perl5.41.3" "/home/cpan/bin/perl/lib/5.41.3/ExtUtils/xsubpp"  -typemap '/home/cpan/bin/perl/lib/5.41.3/ExtUtils/typemap'  Upper.xs > Upper.xsc
mv Upper.xsc Upper.c
cc -c    -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DNO_POSIX_2008_LOCALE -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -O2    -DVERSION=\"0.34\"  -DXS_VERSION=\"0.34\" -DPIC -fPIC "-I/home/cpan/bin/perl/lib/5.41.3/amd64-freebsd-thread-multi/CORE"  -DSU_RELEASE=0 Upper.c
Upper.xs:1432:23: error: use of undeclared identifier 'CXt_GIVEN'
 1432 |     if ((prev_type == CXt_GIVEN || prev_type == CXt_WHEN)
      |                       ^
Upper.xs:1432:49: error: use of undeclared identifier 'CXt_WHEN'
 1432 |     if ((prev_type == CXt_GIVEN || prev_type == CXt_WHEN)
      |                                                 ^
Upper.xs:1436:23: error: use of undeclared identifier 'CXt_GIVEN'
 1436 |      if (prev_type == CXt_GIVEN)
      |                       ^
Upper.xs:1530:8: error: use of undeclared identifier 'CXt_GIVEN'
 1530 |   case CXt_GIVEN:
      |        ^
Upper.xs:1532:11: error: use of undeclared identifier 'OP_LEAVEGIVEN'
 1532 |    type = OP_LEAVEGIVEN;
      |           ^
Upper.xs:1535:8: error: use of undeclared identifier 'CXt_WHEN'
 1535 |   case CXt_WHEN:
      |        ^
Upper.xs:1538:13: error: use of undeclared identifier 'OP_LEAVEWHEN'
 1538 |    type   = OP_LEAVEWHEN;
      |             ^
Upper.xs:2540:9: error: use of undeclared identifier 'CXt_GIVEN'
 2540 |    case CXt_GIVEN:
      |         ^
Upper.xs:2541:9: error: use of undeclared identifier 'CXt_WHEN'
 2541 |    case CXt_WHEN:
      |         ^
Upper.xs:2576:9: error: use of undeclared identifier 'CXt_GIVEN'
 2576 |    case CXt_GIVEN:
      |         ^
Upper.xs:2577:9: error: use of undeclared identifier 'CXt_WHEN'
 2577 |    case CXt_WHEN:
      |         ^
11 errors generated.
*** Error code 1

Stop.
make: stopped in /home/cpan/.cpan/build/Scope-Upper-0.34-0

Bisection points to dff5181acc:

dff5181acc0f5386556522c0ae4e59f672162f6e is the first bad commit
commit dff5181acc0f5386556522c0ae4e59f672162f6e
Author: Tony Cook <[email protected]>
Date:   Thu Jul 18 11:43:22 2024 +1000
Commit:     Tony Cook <[email protected]>
CommitDate: Thu Aug 15 10:56:18 2024 +1000

    switch removal: remove given/when/break/continue

    continue blocks are not removed

Upstream bug report and patch: https://rt.cpan.org/Ticket/Display.html?id=154985

@tonycoz, can you take a look? Thanks.

jkeenan avatar Aug 20 '24 02:08 jkeenan

Type-Tiny: test failures Sample report: http://www.cpantesters.org/cpan/report/aed9a526-5cd6-11ef-9744-b7cb12358fd8 Excerpt of failure output:

t/20-modules/Type-Coercion/parameterized.t ................... ok
syntax error at t/20-modules/Type-Coercion/smartmatch.t line 40, near "3.1 ~"
Execution of t/20-modules/Type-Coercion/smartmatch.t aborted due to compilation errors.
t/20-modules/Type-Coercion/smartmatch.t ...................... 
Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run 
t/20-modules/Type-Coercion/typetiny-constructor.t ............ ok
...
t/20-modules/Type-Tiny/shortcuts.t ........................... ok
syntax error at t/20-modules/Type-Tiny/smartmatch.t line 37, near "42 ~"
Execution of t/20-modules/Type-Tiny/smartmatch.t aborted due to compilation errors.
t/20-modules/Type-Tiny/smartmatch.t .......................... 
Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run 

Upstream bug report: https://github.com/tobyink/p5-type-tiny/issues/160 Pull request submitted: https://github.com/tobyink/p5-type-tiny/pull/161

jkeenan avatar Aug 20 '24 02:08 jkeenan

Syntax-Keyword-Junction: test failures Sample report: http://www.cpantesters.org/cpan/report/44a8780e-5cdf-11ef-be61-b68ae0da135f Excerpt of failure output:

overload arg '~~' is invalid at /usr/home/jkeenan/.cpan/build/Syntax-Keyword-Junction-0.003008-0/blib/lib/Syntax/Keyword/Junction/Base.pm line 24.
syntax error at t/smartmatch.t line 19, near "5 ~"
Execution of t/smartmatch.t aborted due to compilation errors.
t/smartmatch.t .......... 
Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run 
overload arg '~~' is invalid at /usr/home/jkeenan/.cpan/build/Syntax-Keyword-Junction-0.003008-0/blib/lib/Syntax/Keyword/Junction/Base.pm line 24.
t/syntax.t .............. ok

Upstream bug report: https://rt.cpan.org/Ticket/Display.html?id=148905

Fixed 8/20/2024 with CPAN release 0.003009.

jkeenan avatar Aug 20 '24 02:08 jkeenan

I've finally gotten around to releasing a new Syntax::Keyword::Junction that fixes the smartmatch usage.

haarg avatar Aug 20 '24 21:08 haarg

Dist-Maker: As reported in https://github.com/Perl/perl5/issues/22673.

jkeenan avatar Oct 18 '24 00:10 jkeenan

Type-Tiny: test failures Sample report: http://www.cpantesters.org/cpan/report/aed9a526-5cd6-11ef-9744-b7cb12358fd8 Excerpt of failure output:

These were fixed with the release of a new version of Type-Tiny in late September.

jkeenan avatar Oct 18 '24 01:10 jkeenan

smartmatch was brought back, and all of the dists mentioned in this issue are now working (aside from Type::Tiny, but that is a problem with MooseX::Types).

haarg avatar Apr 24 '25 15:04 haarg