Branch: refs/heads/yves/import_error2deprecation Home: https://github.com/Perl/perl5 Commit: 8d998abbcac5981998584aaf8eb805af8517b2c6 https://github.com/Perl/perl5/commit/8d998abbcac5981998584aaf8eb805af8517b2c6 Author: Yves Orton <demer...@gmail.com> Date: 2023-07-26 (Wed, 26 Jul 2023)
Changed paths: M autodoc.pl Log Message: ----------- autodoc.pl - dont warn about structs in type definitions silences: 'struct regexp' not \w+ in 'Ayh||struct regexp' in pod/perlreapi.pod at autodoc.pl line 536, <F> line 623. Commit: 29f710126865178cbd44c267df4df28f0473edeb https://github.com/Perl/perl5/commit/29f710126865178cbd44c267df4df28f0473edeb Author: Yves Orton <demer...@gmail.com> Date: 2023-07-26 (Wed, 26 Jul 2023) Changed paths: M pod/perldiag.pod Log Message: ----------- perldiag.pod - add missing diagnostic Commit: 046b2366c8f7fa97d96a39bea3e85aad3bbd1568 https://github.com/Perl/perl5/commit/046b2366c8f7fa97d96a39bea3e85aad3bbd1568 Author: Yves Orton <demer...@gmail.com> Date: 2023-07-26 (Wed, 26 Jul 2023) Changed paths: M pod/perldiag.pod Log Message: ----------- perldiag.pod - change the (W deprecated..) warnings to the correct D. Commit: cbfe3b130d3c991dff7cc851587ff57683816c23 https://github.com/Perl/perl5/commit/cbfe3b130d3c991dff7cc851587ff57683816c23 Author: Yves Orton <demer...@gmail.com> Date: 2023-07-26 (Wed, 26 Jul 2023) Changed paths: M pod/perldiag.pod Log Message: ----------- perldiag.pod - when the class is UNIVERSAL it is an error to call import. This message from an earlier commit was not picked up by diag.t and was overlooked. Commit: ef8b42930b4431af7233e5b694115562140e8a8e https://github.com/Perl/perl5/commit/ef8b42930b4431af7233e5b694115562140e8a8e Author: Yves Orton <demer...@gmail.com> Date: 2023-07-26 (Wed, 26 Jul 2023) Changed paths: M universal.c Log Message: ----------- universal.c - skip some very old undocumented errors. Commit: e48288b91597af96ee027e3ffec210c30e0692e9 https://github.com/Perl/perl5/commit/e48288b91597af96ee027e3ffec210c30e0692e9 Author: Yves Orton <demer...@gmail.com> Date: 2023-07-26 (Wed, 26 Jul 2023) Changed paths: M t/porting/diag.t Log Message: ----------- diag.t - process diagnostics in XS in universal.c We have to explicitly opt files in for XS processing. Commit: c85bba3d098e55ed7375f48866ccbd96f9a89435 https://github.com/Perl/perl5/commit/c85bba3d098e55ed7375f48866ccbd96f9a89435 Author: Yves Orton <demer...@gmail.com> Date: 2023-07-26 (Wed, 26 Jul 2023) Changed paths: M t/porting/diag.t Log Message: ----------- porting/diag.t - make sure deprecations are marked D Also provide some helpful advice if someone accidentally uses severity 'W' instead of 'D'. (Warning vs Deprecated implies a warning that is default off, and a warning that is default on.) The errors produced by the category checking logic are not very friendly, and it is easy to misunderstand why they are failing if you use 'W' instead of 'D'. In previous code we explicitly allowed W when it should have been forbidden. diag.t logic is fairly cryptic and its not always clear what is going on. Commit: 6cd8c81323aa51403547437debf420c17460a6d5 https://github.com/Perl/perl5/commit/6cd8c81323aa51403547437debf420c17460a6d5 Author: Yves Orton <demer...@gmail.com> Date: 2023-07-26 (Wed, 26 Jul 2023) Changed paths: M lib/warnings.pm M pod/perldeprecation.pod M pod/perldiag.pod M regen/warnings.pl M t/op/universal.t M universal.c M warnings.h Log Message: ----------- universal.c - change import with args error to be a deprecated warning We have had a LOT of fallout from 2dcf3cf50d7 as it turns out that there various common cases of people accidentally exploiting the silent use of missing import with arguments. The premise of detecting this was that it would allow us to detect scenarios where users on a case-insensitive file-system had a typo. But it turns that there are a lot of accidental cases of this as well, a lot more than we expected. Common mistaken cases are: * Via use_ok() where people think the second argument is a test name instead of an argument to the import of the module being used. * Using a quoted version number in a version check instead of a true number. IE: use Foo '1.234'; gets passed to Foo->import() and not Foo->VERSION(). This is compounded by the fact that Exporter->import() *does* support a version check via import(). Arguably if we allow string versions (IMO we should) then we should deal with this in the parser, not in import() (although the latter is a little more debatable IMO). * Explicit calls to import() with a version number. * Mistakenly requesting an export from a module that doesn't actually export anything. One possible explanation for this case is that a module was at one point in its lifetime not a class, but then was later on turned into a class and the arguments to use statements weren't changed even though the main code was changed to use class syntax. Because of the scope of the breakage of the original error this patch downgrades the error to a depecation warning instead, with the intention that in 5.44 we will make it a hard error. Compare: https://github.com/Perl/perl5/compare/907695add47e...6cd8c81323aa