develooper Front page | perl.perl5.porters | Postings from March 2023

Re: Deprecation doesn't mean we have two release cycles beforethings break.

Thread Previous | Thread Next
From:
demerphq
Date:
March 5, 2023 17:23
Subject:
Re: Deprecation doesn't mean we have two release cycles beforethings break.
Message ID:
CANgJU+UWR5u9i_FmHNW0Xyy0pORn+_u08zFu0XOhwoY_TCz-mw@mail.gmail.com
On Sun, 5 Mar 2023 at 00:11, Ricardo Signes <perl.p5p@rjbs.manxome.org> wrote:
>
> All this said:  I think it's bad practice for an author to have their library fail user (not automated / smoke) tests on new deprecation warnings.  The code is going to run just fine.

If a module produces vast quantities of deprecation warnings then it
is a bit debatable if it "runs fine", i know what you are saying, and
in the sense that "it does not die" the statement is true, but if the
warnings swamp whatever other output the script produces, then it is
arguable the script is not fine. I wonder if perhaps deprecation
warnings should be automatically "warn once".  While dealing with the
fallout of the most recent deprecations warnings I have had to set up
filters to make it feasible to address the warnings that are coming
from modules test-suites.  For Scope::Upper it was producing so many
warnings it was difficult to even see which test files were producing
the errors.

> They're the one who needs alerting.

I am not so sure about this. The transitive nature of this problems
makes it hard to say who actually needs to be alerted. It is entirely
possible that the module broken by a deprecation warning doesn't use
the feature being warned about, and the module that does isn't broken
by the deprecation warnings because it doesn't test it is warning
clean.

I think a big part of the problem is that the concept of author
testing is "new" (as compared to something like Test::More), and not
necessarily well publicized.  For instance Test::More doesn't mention
it once. I know about it via the "Lancaster Consensus"[1], but I
wonder how much of the wider Perl development community is aware of it
and the concepts it introduces/introduced? Serious question, where do
we document this stuff? Is it even mentioned in the docs that come
with perl? I searched for the phrase "author testing" and it isn't
mentioned anywhere in core.  Maybe we should do a better jobs
explaining the subtleties here?

cheers,
Yves
[1] https://github.com/Perl-Toolchain-Gang/toolchain-site/blob/master/lancaster-consensus.md
-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About