richterger / Perl-LanguageServer

Language Server for Perl
Other
225 stars 52 forks source link

Smartmatch deprecation on Perl v5.38.0 #190

Closed bmeneg closed 11 months ago

bmeneg commented 1 year ago

Installing Perl::LanguageServer with cpan Perl::LanguageServer yields the following deprecation warning:

given is deprecated at /home/bmeneg/.cpan/build/Perl-LanguageServer-2.6.1-5/blib/lib/Perl/LanguageServer/Parser.pm line 136.
when is deprecated at /home/bmeneg/.cpan/build/Perl-LanguageServer-2.6.1-5/blib/lib/Perl/LanguageServer/Parser.pm line 138.
when is deprecated at /home/bmeneg/.cpan/build/Perl-LanguageServer-2.6.1-5/blib/lib/Perl/LanguageServer/Parser.pm line 143.
when is deprecated at /home/bmeneg/.cpan/build/Perl-LanguageServer-2.6.1-5/blib/lib/Perl/LanguageServer/Parser.pm line 158.
when is deprecated at /home/bmeneg/.cpan/build/Perl-LanguageServer-2.6.1-5/blib/lib/Perl/LanguageServer/Parser.pm line 167.
when is deprecated at /home/bmeneg/.cpan/build/Perl-LanguageServer-2.6.1-5/blib/lib/Perl/LanguageServer/Parser.pm line 186.
when is deprecated at /home/bmeneg/.cpan/build/Perl-LanguageServer-2.6.1-5/blib/lib/Perl/LanguageServer/Parser.pm line 193.
when is deprecated at /home/bmeneg/.cpan/build/Perl-LanguageServer-2.6.1-5/blib/lib/Perl/LanguageServer/Parser.pm line 230.
when is deprecated at /home/bmeneg/.cpan/build/Perl-LanguageServer-2.6.1-5/blib/lib/Perl/LanguageServer/Parser.pm line 264.
when is deprecated at /home/bmeneg/.cpan/build/Perl-LanguageServer-2.6.1-5/blib/lib/Perl/LanguageServer/Parser.pm line 288.
when is deprecated at /home/bmeneg/.cpan/build/Perl-LanguageServer-2.6.1-5/blib/lib/Perl/LanguageServer/Parser.pm line 293.
when is deprecated at /home/bmeneg/.cpan/build/Perl-LanguageServer-2.6.1-5/blib/lib/Perl/LanguageServer/Parser.pm line 297.
Smartmatch is deprecated at /home/bmeneg/.cpan/build/Perl-LanguageServer-2.6.1-5/blib/lib/Perl/LanguageServer/Parser.pm line 322.
Smartmatch is deprecated at /home/bmeneg/.cpan/build/Perl-LanguageServer-2.6.1-5/blib/lib/Perl/LanguageServer/Parser.pm line 326.
when is deprecated at /home/bmeneg/.cpan/build/Perl-LanguageServer-2.6.1-5/blib/lib/Perl/LanguageServer/Parser.pm line 343.
when is deprecated at /home/bmeneg/.cpan/build/Perl-LanguageServer-2.6.1-5/blib/lib/Perl/LanguageServer/Parser.pm line 358.
when is deprecated at /home/bmeneg/.cpan/build/Perl-LanguageServer-2.6.1-5/blib/lib/Perl/LanguageServer/Parser.pm line 370.
when is deprecated at /home/bmeneg/.cpan/build/Perl-LanguageServer-2.6.1-5/blib/lib/Perl/LanguageServer/Parser.pm line 375.
when is deprecated at /home/bmeneg/.cpan/build/Perl-LanguageServer-2.6.1-5/blib/lib/Perl/LanguageServer/Parser.pm line 379.
when is deprecated at /home/bmeneg/.cpan/build/Perl-LanguageServer-2.6.1-5/blib/lib/Perl/LanguageServer/Parser.pm line 384.

The limit for moving from smartmatches are Perl v5.42.0, which is not so far away.

Sources: https://perldoc.perl.org/perl5380delta#Switch-and-Smart-Match-operator https://perldoc.perl.org/perldiag#Smartmatch-is-deprecated https://perldoc.perl.org/perldiag#given-is-deprecated https://perldoc.perl.org/perldiag#when-is-deprecated

gregoa commented 1 year ago

Any news? These warning will cause Perl::LanguageServer to be removed from Debian testing soon (after the transition to perl 5.38).

richterger commented 11 months ago

deprecated functions are replaced in V2.6.2