Mailing List Archive

Is it time for Test2 to go to core?
A while ago I decided not to fight a battle to get any module into core. I
am still not sure I have the willpower for the fight. But I have gotten
several requests from people such as Paul Evans (LeoNerd) to bring
Test2::Suite into Core. There has been some call to let people use
Test2::Suite, which contains most of the stuff that makes Test2 useful, in
CORE for a while now.

So, I am going to get the ball rolling. I am in favor of Test2::Suite being
in core. Obviously this needs a discussion, and best I can tell that should
happen here and not a PPC since I am not proposing syntax changes?

In any case, after talking to LeoNerd and Haarg, I have stripped down the
non-core deps as much as possible. The only non-core dep that is not
optional is Term::Table which was written specifically for Test2::Suite,
and Test2::Suite is not viable without it. All other non-core deps are
optional.

So the following 2 cpan dists would need to be pulled in:

1. Test2::Suite
2. Term::Table


I will respond to technical questions. But I am not going to engage in the
political back and forth that often happens in these discussions. If the
group decides it goes to Core I am ready and willing to take on everything
that comes with making it Dual Life, as I already do with Test-Simple. If
the group decides not to do this, I will leave it to others to argue the
point, and I will abide by the final decision.

Thank you,

Chad Granum
Re: Is it time for Test2 to go to core? [ In reply to ]
Thanks!

On Fri, Apr 28, 2023 at 3:21?PM Chad Granum <exodist7@gmail.com> wrote:

> A while ago I decided not to fight a battle to get any module into core. I
> am still not sure I have the willpower for the fight. But I have gotten
> several requests from people such as Paul Evans (LeoNerd) to bring
> Test2::Suite into Core. There has been some call to let people use
> Test2::Suite, which contains most of the stuff that makes Test2 useful, in
> CORE for a while now.
>
> So, I am going to get the ball rolling. I am in favor of Test2::Suite
> being in core. Obviously this needs a discussion, and best I can tell that
> should happen here and not a PPC since I am not proposing syntax changes?
>
> In any case, after talking to LeoNerd and Haarg, I have stripped down the
> non-core deps as much as possible. The only non-core dep that is not
> optional is Term::Table which was written specifically for Test2::Suite,
> and Test2::Suite is not viable without it. All other non-core deps are
> optional.
>
> So the following 2 cpan dists would need to be pulled in:
>
> 1. Test2::Suite
> 2. Term::Table
>
>
> I will respond to technical questions. But I am not going to engage in the
> political back and forth that often happens in these discussions. If the
> group decides it goes to Core I am ready and willing to take on everything
> that comes with making it Dual Life, as I already do with Test-Simple. If
> the group decides not to do this, I will leave it to others to argue the
> point, and I will abide by the final decision.
>
> Thank you,
>
> Chad Granum
>
Re: Is it time for Test2 to go to core? [ In reply to ]
On Fri, 28 Apr 2023 06:20:21 -0700, Chad Granum <exodist7@gmail.com> wrote:

> A while ago I decided not to fight a battle to get any module into core. I
> am still not sure I have the willpower for the fight. But I have gotten
> several requests from people such as Paul Evans (LeoNerd) to bring
> Test2::Suite into Core. There has been some call to let people use
> Test2::Suite, which contains most of the stuff that makes Test2 useful, in
> CORE for a while now.
>
> So, I am going to get the ball rolling. I am in favor of Test2::Suite being
> in core. Obviously this needs a discussion, and best I can tell that should
> happen here and not a PPC since I am not proposing syntax changes?
>
> In any case, after talking to LeoNerd and Haarg, I have stripped down the
> non-core deps as much as possible. The only non-core dep that is not
> optional is Term::Table which was written specifically for Test2::Suite,
> and Test2::Suite is not viable without it. All other non-core deps are
> optional.
>
> So the following 2 cpan dists would need to be pulled in:
>
> 1. Test2::Suite
> 2. Term::Table
>
> I will respond to technical questions. But I am not going to engage in the
> political back and forth that often happens in these discussions. If the
> group decides it goes to Core I am ready and willing to take on everything
> that comes with making it Dual Life, as I already do with Test-Simple. If
> the group decides not to do this, I will leave it to others to argue the
> point, and I will abide by the final decision.

I have no objections, so +1 from me
(moving forward)++

> Thank you,
>
> Chad Granum


--
H.Merijn Brand https://tux.nl Perl Monger http://amsterdam.pm.org/
using perl5.00307 .. 5.37 porting perl5 on HP-UX, AIX, and Linux
https://tux.nl/email.html http://qa.perl.org https://www.test-smoke.org
Re: Is it time for Test2 to go to core? [ In reply to ]
> On Apr 28, 2023, at 9:20 AM, Chad Granum <exodist7@gmail.com> wrote:
>
> A while ago I decided not to fight a battle to get any module into core. I am still not sure I have the willpower for the fight. But I have gotten several requests from people such as Paul Evans (LeoNerd) to bring Test2::Suite into Core. There has been some call to let people use Test2::Suite, which contains most of the stuff that makes Test2 useful, in CORE for a while now.
>
> So, I am going to get the ball rolling. I am in favor of Test2::Suite being in core.

Test2::V0 auto-exports `use utf8`. Thus, by default it breaks simple print statements, e.g., `print "é"`.

Are there any other core modules that do this?

-FG
Re: Is it time for Test2 to go to core? [ In reply to ]
On Fri, Apr 28, 2023 at 3:29?PM Felipe Gasper via perl5-porters <
perl5-porters@perl.org> wrote:

>
> > On Apr 28, 2023, at 9:20 AM, Chad Granum <exodist7@gmail.com> wrote:
> >
> > A while ago I decided not to fight a battle to get any module into core.
> I am still not sure I have the willpower for the fight. But I have gotten
> several requests from people such as Paul Evans (LeoNerd) to bring
> Test2::Suite into Core. There has been some call to let people use
> Test2::Suite, which contains most of the stuff that makes Test2 useful, in
> CORE for a while now.
> >
> > So, I am going to get the ball rolling. I am in favor of Test2::Suite
> being in core.
>
> Test2::V0 auto-exports `use utf8`. Thus, by default it breaks simple print
> statements, e.g., `print "é"`.
>
> Are there any other core modules that do this?


How is that relevant?

If you don't like you don't have to use this bundle, you can still use
every other piece of functionality in the distribution. If you want to you
can easily make your own bundle that doesn't export utf8-ness.

Leon
Re: Is it time for Test2 to go to core? [ In reply to ]
On Fri, Apr 28, 2023 at 3:21?PM Chad Granum <exodist7@gmail.com> wrote:

> So, I am going to get the ball rolling. I am in favor of Test2::Suite
> being in core. Obviously this needs a discussion
>

Very briefly, could you state why? This is not intended to be political,
but to start to get an understanding of the potential benefits (or
drawbacks, if there are any).

e.g.:
- does it make any difference (positively or negatively) regarding any
ability to maintain the distribution(s)?
- how will it impact users of perl (e.g. make it easier to use Test2
functionality)?
- will there be any impact on the rest of core perl code or tests,
positively or negatively?

thank you.
Re: Is it time for Test2 to go to core? [ In reply to ]
The main benefits are as follows:

- Developers of other Core modules can start to use it in their tests.
LeoNerd expressed this desire recently.
- Test-Simple tools like Test::More largely recommend looking at
Test2::Suite for new tests, as do many new tutorials and docs online. I am
often asked "If that is recommended, why is it not in core when the
discouraged stuff is?)
- I often field questions like "When will Test2 make it into core so I
can use it at Company X?" I explain that it does not need to be in core to
use it, but I am usually met with "company policy" as a response. I expect
this response to increase with the new EU laws about software that are
likely to come soon.
- Toolchain and other low-level tools can write new tests with the Test2
tools that provide better debugging and diagnostics.
- Core currently has 2 testing tools: test.pl which is discouraged, and
Test::More which is now in maintenance mode only, no new features.
Test2::Suite is the current living ecosystem, it would be nice if Core had
a testing framework that is alive.

-Chad

On Fri, Apr 28, 2023 at 6:48?AM Karen Etheridge <perl@froods.org> wrote:

> On Fri, Apr 28, 2023 at 3:21?PM Chad Granum <exodist7@gmail.com> wrote:
>
>> So, I am going to get the ball rolling. I am in favor of Test2::Suite
>> being in core. Obviously this needs a discussion
>>
>
> Very briefly, could you state why? This is not intended to be political,
> but to start to get an understanding of the potential benefits (or
> drawbacks, if there are any).
>
> e.g.:
> - does it make any difference (positively or negatively) regarding any
> ability to maintain the distribution(s)?
> - how will it impact users of perl (e.g. make it easier to use Test2
> functionality)?
> - will there be any impact on the rest of core perl code or tests,
> positively or negatively?
>
> thank you.
>
Re: Is it time for Test2 to go to core? [ In reply to ]
> On Apr 28, 2023, at 9:37 AM, Leon Timmermans <fawaka@gmail.com> wrote:
>
> On Fri, Apr 28, 2023 at 3:29?PM Felipe Gasper via perl5-porters <perl5-porters@perl.org> wrote:
>
> > On Apr 28, 2023, at 9:20 AM, Chad Granum <exodist7@gmail.com> wrote:
> >
> > A while ago I decided not to fight a battle to get any module into core. I am still not sure I have the willpower for the fight. But I have gotten several requests from people such as Paul Evans (LeoNerd) to bring Test2::Suite into Core. There has been some call to let people use Test2::Suite, which contains most of the stuff that makes Test2 useful, in CORE for a while now.
> >
> > So, I am going to get the ball rolling. I am in favor of Test2::Suite being in core.
>
> Test2::V0 auto-exports `use utf8`. Thus, by default it breaks simple print statements, e.g., `print "é"`.
>
> Are there any other core modules that do this?
>
> How is that relevant?

Consistency is a boon, especially in a language with so few “guard-rails” as Perl.

p5p established previously that `use utf8` is inappropriate in the feature bundle because “modern Perl” should not require extra configuration for `print "hi"` not to be subtly wrong.

The same logic, IMO, should apply to core’s “go-to” modern testing library. As things stand, that would be Test2::V0. Thus, extra scrutiny seems warranted.

cheers,
-Felipe
Re: Is it time for Test2 to go to core? [ In reply to ]
On Fri, 28 Apr 2023 06:20:21 -0700
Chad Granum <exodist7@gmail.com> wrote:

> In any case, after talking to LeoNerd and Haarg, I have stripped down
> the non-core deps as much as possible. The only non-core dep that is
> not optional is Term::Table which was written specifically for
> Test2::Suite, and Test2::Suite is not viable without it. All other
> non-core deps are optional.
>
> So the following 2 cpan dists would need to be pulled in:
>
> 1. Test2::Suite
> 2. Term::Table

Yup; these seem good.

The timeline as I explained yesterday was: It's far too late to
consider anything head of 5.38 now, but as soon as we have 5.38.0 out
the door we can look at importing those two modules in to the new
development cycle in time for 5.39.1.

--
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk | https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/
Re: Is it time for Test2 to go to core? [ In reply to ]
Test2::V0 cannot be changed without breaking things. So removing the utf8
functionality from V0 is not on the table. I could add a ::V1 that does not
default to loading utf8, but that will still leave V0 as is. I think this
would be silly, but if it is a technical requirement it is an option. In
fact moving Test2::V0 to its own dist with nothing else in it and putting
Test2::V1 in Test2::Suite so that it can go to core is also perfectly
plausible. But I would really rather not tell everyone there is a new
recommendation, that the new recommendation exists only because we cannot
use utf8 in core, and that using the still perfectly good recommendation
requires the install of a single file form cpan.

"`use utf8` is inappropriate in the feature bundle" - I have no argument to
make here... but I think I misunderstand "the feature bundle" here? I
assumed that meant something like `use v5.10`.. Test2::V0 is not intended
to be included in a `use PERLVERSION` bundle. So I am not sure how a
technical requirement for "the feature bundle" applies as a technical
requirement on "A testing tool bundle".

On Fri, Apr 28, 2023 at 7:08?AM Felipe Gasper <felipe@felipegasper.com>
wrote:

>
> > On Apr 28, 2023, at 9:37 AM, Leon Timmermans <fawaka@gmail.com> wrote:
> >
> > On Fri, Apr 28, 2023 at 3:29?PM Felipe Gasper via perl5-porters <
> perl5-porters@perl.org> wrote:
> >
> > > On Apr 28, 2023, at 9:20 AM, Chad Granum <exodist7@gmail.com> wrote:
> > >
> > > A while ago I decided not to fight a battle to get any module into
> core. I am still not sure I have the willpower for the fight. But I have
> gotten several requests from people such as Paul Evans (LeoNerd) to bring
> Test2::Suite into Core. There has been some call to let people use
> Test2::Suite, which contains most of the stuff that makes Test2 useful, in
> CORE for a while now.
> > >
> > > So, I am going to get the ball rolling. I am in favor of Test2::Suite
> being in core.
> >
> > Test2::V0 auto-exports `use utf8`. Thus, by default it breaks simple
> print statements, e.g., `print "é"`.
> >
> > Are there any other core modules that do this?
> >
> > How is that relevant?
>
> Consistency is a boon, especially in a language with so few “guard-rails”
> as Perl.
>
> p5p established previously that `use utf8` is inappropriate in the feature
> bundle because “modern Perl” should not require extra configuration for
> `print "hi"` not to be subtly wrong.
>
> The same logic, IMO, should apply to core’s “go-to” modern testing
> library. As things stand, that would be Test2::V0. Thus, extra scrutiny
> seems warranted.
>
> cheers,
> -Felipe
Re: Is it time for Test2 to go to core? [ In reply to ]
> On Apr 28, 2023, at 10:13 AM, Chad Granum <exodist7@gmail.com> wrote:
>
> "`use utf8` is inappropriate in the feature bundle" - I have no argument to make here... but I think I misunderstand "the feature bundle" here? I assumed that meant something like `use v5.10`.. Test2::V0 is not intended to be included in a `use PERLVERSION` bundle. So I am not sure how a technical requirement for "the feature bundle" applies as a technical requirement on "A testing tool bundle".

The feature bundle is what Perl presents as its “modern self”. If Test2 goes into core, it, too, will assume that character, particularly Test2::V0.

The rationale before was that “modern Perl” should not cause `print "hi"` to be subtly incorrect (without further configuration). I assume that that would also apply with a “new hotness” core testing library.

Unicode in Perl is tricky--so much so that even the interpreter isn’t consistent about how to do it. If the feature bundle and all of core presently leave `use utf8` off, then retaining that consistency seems proper, IMO.

cheers,
-Felipe
Re: Is it time for Test2 to go to core? [ In reply to ]
On Fri, Apr 28, 2023 at 4:08?PM Felipe Gasper <felipe@felipegasper.com>
wrote:

>
> > On Apr 28, 2023, at 9:37 AM, Leon Timmermans <fawaka@gmail.com> wrote:
> >
> > On Fri, Apr 28, 2023 at 3:29?PM Felipe Gasper via perl5-porters <
> perl5-porters@perl.org> wrote:
> >
> > > On Apr 28, 2023, at 9:20 AM, Chad Granum <exodist7@gmail.com> wrote:
> > >
> > > A while ago I decided not to fight a battle to get any module into
> core. I am still not sure I have the willpower for the fight. But I have
> gotten several requests from people such as Paul Evans (LeoNerd) to bring
> Test2::Suite into Core. There has been some call to let people use
> Test2::Suite, which contains most of the stuff that makes Test2 useful, in
> CORE for a while now.
> > >
> > > So, I am going to get the ball rolling. I am in favor of Test2::Suite
> being in core.
> >
> > Test2::V0 auto-exports `use utf8`. Thus, by default it breaks simple
> print statements, e.g., `print "é"`.
> >
> > Are there any other core modules that do this?
> >
> > How is that relevant?
>
> Consistency is a boon, especially in a language with so few “guard-rails”
> as Perl.
>
> p5p established previously that `use utf8` is inappropriate in the feature
> bundle because “modern Perl” should not require extra configuration for
> `print "hi"` not to be subtly wrong.
>
> The same logic, IMO, should apply to core’s “go-to” modern testing
> library. As things stand, that would be Test2::V0. Thus, extra scrutiny
> seems warranted.
>

First of all, you really shouldn't be printing to STDOUT/STDERR in a test
anyway. The test framework owns the outputs, and it will actually take care
that the output is UTF-8. This problem doesn't exist if you use the tool
the way it's meant to be used.

Secondly, I don't think this is a reasonable argument not to include the
dist; it may be an argument to write a new bundle. I think that's an
entirely different discussion and IMNSHO we should keep it separate.

Leon
Re: Is it time for Test2 to go to core? [ In reply to ]
I definitely wouldn’t break things.

Test2 is *really* nice, and I’d love to see it more broadly available. “V1”, though, is an unideal name because it would look like an iteration on “V0”, which it really wouldn’t be. Maybe “Test2::Std”?

As it stands, though, I (regretfully) advocate leaving Test2 out.

-FG


> On Apr 28, 2023, at 10:50 AM, Chad Granum <exodist7@gmail.com> wrote:
>
> So is your stance "No Test2::Suite in core", "Break things to put it in core?", "Undergo a complex/confusing transformation to V1 and split out V0 to make it fit for core"?
>
> -Chad
>
> On Fri, Apr 28, 2023 at 7:48?AM Felipe Gasper <felipe@felipegasper.com> wrote:
>
> > On Apr 28, 2023, at 10:13 AM, Chad Granum <exodist7@gmail.com> wrote:
> >
> > "`use utf8` is inappropriate in the feature bundle" - I have no argument to make here... but I think I misunderstand "the feature bundle" here? I assumed that meant something like `use v5.10`.. Test2::V0 is not intended to be included in a `use PERLVERSION` bundle. So I am not sure how a technical requirement for "the feature bundle" applies as a technical requirement on "A testing tool bundle".
>
> The feature bundle is what Perl presents as its “modern self”. If Test2 goes into core, it, too, will assume that character, particularly Test2::V0.
>
> The rationale before was that “modern Perl” should not cause `print "hi"` to be subtly incorrect (without further configuration). I assume that that would also apply with a “new hotness” core testing library.
>
> Unicode in Perl is tricky--so much so that even the interpreter isn’t consistent about how to do it. If the feature bundle and all of core presently leave `use utf8` off, then retaining that consistency seems proper, IMO.
>
> cheers,
> -Felipe
Re: Is it time for Test2 to go to core? [ In reply to ]
What you ask for with Test2::Std is not going to happen. The V# pattern is
a pattern and technical requirement and promise of Test2. The idea is that
if Test2 needs to make changes that are API incompatible, Test2::V0 will
continue to work as-is and never break, instead a Test2::V1 would be
released to incorporate the api-breaking changes. This way Test2 can be a
living system that continues to see development, without breaking things
for people as it improves. The Test2::Std suggestion breaks promises I am
not willing to break. It violates a core idea behind Test2.

-Chad

On Fri, Apr 28, 2023 at 8:02?AM Felipe Gasper <felipe@felipegasper.com>
wrote:

> I definitely wouldn’t break things.
>
> Test2 is *really* nice, and I’d love to see it more broadly available.
> “V1”, though, is an unideal name because it would look like an iteration on
> “V0”, which it really wouldn’t be. Maybe “Test2::Std”?
>
> As it stands, though, I (regretfully) advocate leaving Test2 out.
>
> -FG
>
>
> > On Apr 28, 2023, at 10:50 AM, Chad Granum <exodist7@gmail.com> wrote:
> >
> > So is your stance "No Test2::Suite in core", "Break things to put it in
> core?", "Undergo a complex/confusing transformation to V1 and split out V0
> to make it fit for core"?
> >
> > -Chad
> >
> > On Fri, Apr 28, 2023 at 7:48?AM Felipe Gasper <felipe@felipegasper.com>
> wrote:
> >
> > > On Apr 28, 2023, at 10:13 AM, Chad Granum <exodist7@gmail.com> wrote:
> > >
> > > "`use utf8` is inappropriate in the feature bundle" - I have no
> argument to make here... but I think I misunderstand "the feature bundle"
> here? I assumed that meant something like `use v5.10`.. Test2::V0 is not
> intended to be included in a `use PERLVERSION` bundle. So I am not sure how
> a technical requirement for "the feature bundle" applies as a technical
> requirement on "A testing tool bundle".
> >
> > The feature bundle is what Perl presents as its “modern self”. If Test2
> goes into core, it, too, will assume that character, particularly Test2::V0.
> >
> > The rationale before was that “modern Perl” should not cause `print
> "hi"` to be subtly incorrect (without further configuration). I assume that
> that would also apply with a “new hotness” core testing library.
> >
> > Unicode in Perl is tricky--so much so that even the interpreter isn’t
> consistent about how to do it. If the feature bundle and all of core
> presently leave `use utf8` off, then retaining that consistency seems
> proper, IMO.
> >
> > cheers,
> > -Felipe
>
>
Re: Is it time for Test2 to go to core? [ In reply to ]
On Fri, 28 Apr 2023 08:07:58 -0700
Chad Granum <exodist7@gmail.com> wrote:

> The V# pattern is
> a pattern and technical requirement and promise of Test2. The idea is
> that if Test2 needs to make changes that are API incompatible,
> Test2::V0 will continue to work as-is and never break, instead a
> Test2::V1 would be released to incorporate the api-breaking changes.

I definitely advocate in favour of keeping the "::V0", "::V1", ...
shape. It's actually an excellent idea and I wish more modules would use
it in this sort of situation. In fact I may sometime consider adopting
it in a few of my own.

(Though I think I would argue that the v should be lowercase; as in

use My::Fancy::Framework::v1;

but that's a tiny quibble ;) )

--
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk | https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/
Re: Is it time for Test2 to go to core? [ In reply to ]
You could still version ::Std (e.g., Std2, Std::V2), but the extra “disruption” there is probably not worth it.

So yeah, “V1” would be my own hope for Perl, maybe with V0 downloadable.

-FG

> On Apr 28, 2023, at 11:07 AM, Chad Granum <exodist7@gmail.com> wrote:
>
> What you ask for with Test2::Std is not going to happen. The V# pattern is a pattern and technical requirement and promise of Test2. The idea is that if Test2 needs to make changes that are API incompatible, Test2::V0 will continue to work as-is and never break, instead a Test2::V1 would be released to incorporate the api-breaking changes. This way Test2 can be a living system that continues to see development, without breaking things for people as it improves. The Test2::Std suggestion breaks promises I am not willing to break. It violates a core idea behind Test2.
>
> -Chad
>
> On Fri, Apr 28, 2023 at 8:02?AM Felipe Gasper <felipe@felipegasper.com> wrote:
> I definitely wouldn’t break things.
>
> Test2 is *really* nice, and I’d love to see it more broadly available. “V1”, though, is an unideal name because it would look like an iteration on “V0”, which it really wouldn’t be. Maybe “Test2::Std”?
>
> As it stands, though, I (regretfully) advocate leaving Test2 out.
>
> -FG
>
>
> > On Apr 28, 2023, at 10:50 AM, Chad Granum <exodist7@gmail.com> wrote:
> >
> > So is your stance "No Test2::Suite in core", "Break things to put it in core?", "Undergo a complex/confusing transformation to V1 and split out V0 to make it fit for core"?
> >
> > -Chad
> >
> > On Fri, Apr 28, 2023 at 7:48?AM Felipe Gasper <felipe@felipegasper.com> wrote:
> >
> > > On Apr 28, 2023, at 10:13 AM, Chad Granum <exodist7@gmail.com> wrote:
> > >
> > > "`use utf8` is inappropriate in the feature bundle" - I have no argument to make here... but I think I misunderstand "the feature bundle" here? I assumed that meant something like `use v5.10`.. Test2::V0 is not intended to be included in a `use PERLVERSION` bundle. So I am not sure how a technical requirement for "the feature bundle" applies as a technical requirement on "A testing tool bundle".
> >
> > The feature bundle is what Perl presents as its “modern self”. If Test2 goes into core, it, too, will assume that character, particularly Test2::V0.
> >
> > The rationale before was that “modern Perl” should not cause `print "hi"` to be subtly incorrect (without further configuration). I assume that that would also apply with a “new hotness” core testing library.
> >
> > Unicode in Perl is tricky--so much so that even the interpreter isn’t consistent about how to do it. If the feature bundle and all of core presently leave `use utf8` off, then retaining that consistency seems proper, IMO.
> >
> > cheers,
> > -Felipe
>
Re: Is it time for Test2 to go to core? [ In reply to ]
Understood. I am not committing to any new version bundles. I want to see
how the Rest of the discussion with other p5p people goes. If the group
decides we need a new V1 bundle with no utf8 then I can split out Test2::V0
and write Test2::V1. But if the rest of the group is in favor of including
it without any changes around ::V0 I would rather go that way.

Thank you for sharing your thoughts on this.

-Chad

On Fri, Apr 28, 2023 at 8:15?AM Felipe Gasper <felipe@felipegasper.com>
wrote:

> You could still version ::Std (e.g., Std2, Std::V2), but the extra
> “disruption” there is probably not worth it.
>
> So yeah, “V1” would be my own hope for Perl, maybe with V0 downloadable.
>
> -FG
>
> > On Apr 28, 2023, at 11:07 AM, Chad Granum <exodist7@gmail.com> wrote:
> >
> > What you ask for with Test2::Std is not going to happen. The V# pattern
> is a pattern and technical requirement and promise of Test2. The idea is
> that if Test2 needs to make changes that are API incompatible, Test2::V0
> will continue to work as-is and never break, instead a Test2::V1 would be
> released to incorporate the api-breaking changes. This way Test2 can be a
> living system that continues to see development, without breaking things
> for people as it improves. The Test2::Std suggestion breaks promises I am
> not willing to break. It violates a core idea behind Test2.
> >
> > -Chad
> >
> > On Fri, Apr 28, 2023 at 8:02?AM Felipe Gasper <felipe@felipegasper.com>
> wrote:
> > I definitely wouldn’t break things.
> >
> > Test2 is *really* nice, and I’d love to see it more broadly available.
> “V1”, though, is an unideal name because it would look like an iteration on
> “V0”, which it really wouldn’t be. Maybe “Test2::Std”?
> >
> > As it stands, though, I (regretfully) advocate leaving Test2 out.
> >
> > -FG
> >
> >
> > > On Apr 28, 2023, at 10:50 AM, Chad Granum <exodist7@gmail.com> wrote:
> > >
> > > So is your stance "No Test2::Suite in core", "Break things to put it
> in core?", "Undergo a complex/confusing transformation to V1 and split out
> V0 to make it fit for core"?
> > >
> > > -Chad
> > >
> > > On Fri, Apr 28, 2023 at 7:48?AM Felipe Gasper <felipe@felipegasper.com>
> wrote:
> > >
> > > > On Apr 28, 2023, at 10:13 AM, Chad Granum <exodist7@gmail.com>
> wrote:
> > > >
> > > > "`use utf8` is inappropriate in the feature bundle" - I have no
> argument to make here... but I think I misunderstand "the feature bundle"
> here? I assumed that meant something like `use v5.10`.. Test2::V0 is not
> intended to be included in a `use PERLVERSION` bundle. So I am not sure how
> a technical requirement for "the feature bundle" applies as a technical
> requirement on "A testing tool bundle".
> > >
> > > The feature bundle is what Perl presents as its “modern self”. If
> Test2 goes into core, it, too, will assume that character, particularly
> Test2::V0.
> > >
> > > The rationale before was that “modern Perl” should not cause `print
> "hi"` to be subtly incorrect (without further configuration). I assume that
> that would also apply with a “new hotness” core testing library.
> > >
> > > Unicode in Perl is tricky--so much so that even the interpreter isn’t
> consistent about how to do it. If the feature bundle and all of core
> presently leave `use utf8` off, then retaining that consistency seems
> proper, IMO.
> > >
> > > cheers,
> > > -Felipe
> >
>
>
Re: Is it time for Test2 to go to core? [ In reply to ]
* Karen Etheridge <perl@froods.org> [2023-04-28 15:48:02 +0200]:

> On Fri, Apr 28, 2023 at 3:21?PM Chad Granum <exodist7@gmail.com> wrote:
>
> > So, I am going to get the ball rolling. I am in favor of Test2::Suite
> > being in core. Obviously this needs a discussion
> >
>
> Very briefly, could you state why? This is not intended to be political,
> but to start to get an understanding of the potential benefits (or
> drawbacks, if there are any).
>
> e.g.:
> - does it make any difference (positively or negatively) regarding any
> ability to maintain the distribution(s)?
> - how will it impact users of perl (e.g. make it easier to use Test2
> functionality)?
> - will there be any impact on the rest of core perl code or tests,
> positively or negatively?
>
> thank you.

Agee 100%

Can we get App::cpanminus in "core", too?

- no dependencies
- works for many perls
- 275 ++s on metacpan
- no failing tests
- first thing I install (using `perl -MCPAN -e shell`)*

* not suggesting this go away whatsoever, both are extremely useful
and I suspect most people have this practice as the next step or two
after getting onto a new system

Cheers,
Brett

--
--
oodler@cpan.org
oodler577@sdf-eu.org
SDF-EU Public Access UNIX System - http://sdfeu.org
irc.perl.org #openmp #pdl #native
Re: Is it time for Test2 to go to core? [ In reply to ]
On Fri, Apr 28, 2023 at 10:08?AM Felipe Gasper via perl5-porters <
perl5-porters@perl.org> wrote:

>
> > On Apr 28, 2023, at 9:37 AM, Leon Timmermans <fawaka@gmail.com> wrote:
> >
> > On Fri, Apr 28, 2023 at 3:29?PM Felipe Gasper via perl5-porters <
> perl5-porters@perl.org> wrote:
> >
> > > On Apr 28, 2023, at 9:20 AM, Chad Granum <exodist7@gmail.com> wrote:
> > >
> > > A while ago I decided not to fight a battle to get any module into
> core. I am still not sure I have the willpower for the fight. But I have
> gotten several requests from people such as Paul Evans (LeoNerd) to bring
> Test2::Suite into Core. There has been some call to let people use
> Test2::Suite, which contains most of the stuff that makes Test2 useful, in
> CORE for a while now.
> > >
> > > So, I am going to get the ball rolling. I am in favor of Test2::Suite
> being in core.
> >
> > Test2::V0 auto-exports `use utf8`. Thus, by default it breaks simple
> print statements, e.g., `print "é"`.
> >
> > Are there any other core modules that do this?
> >
> > How is that relevant?
>
> Consistency is a boon, especially in a language with so few “guard-rails”
> as Perl.
>
> p5p established previously that `use utf8` is inappropriate in the feature
> bundle because “modern Perl” should not require extra configuration for
> `print "hi"` not to be subtly wrong.
>
> The same logic, IMO, should apply to core’s “go-to” modern testing
> library. As things stand, that would be Test2::V0. Thus, extra scrutiny
> seems warranted.


I don't see this as a concern. There are several things to be aware of when
trying to replace existing test code with Test2::V0, such as the different
way that is() works. It works best when used for fresh code and upgrade
guidance can be provided in documentation. It would not be as much of a
concern even if it wasn't only used in testing, because it is a recommended
module to use in specific cases, not a general pragma being recommended to
apply to all code.

-Dan
Re: Is it time for Test2 to go to core? [ In reply to ]
> On Apr 28, 2023, at 12:27 PM, Dan Book <grinnz@gmail.com> wrote:
>
> On Fri, Apr 28, 2023 at 10:08?AM Felipe Gasper via perl5-porters <perl5-porters@perl.org> wrote:
>
> > On Apr 28, 2023, at 9:37 AM, Leon Timmermans <fawaka@gmail.com> wrote:
> >
> > On Fri, Apr 28, 2023 at 3:29?PM Felipe Gasper via perl5-porters <perl5-porters@perl.org> wrote:
> >
> > > On Apr 28, 2023, at 9:20 AM, Chad Granum <exodist7@gmail.com> wrote:
> > >
> > > A while ago I decided not to fight a battle to get any module into core. I am still not sure I have the willpower for the fight. But I have gotten several requests from people such as Paul Evans (LeoNerd) to bring Test2::Suite into Core. There has been some call to let people use Test2::Suite, which contains most of the stuff that makes Test2 useful, in CORE for a while now.
> > >
> > > So, I am going to get the ball rolling. I am in favor of Test2::Suite being in core.
> >
> > Test2::V0 auto-exports `use utf8`. Thus, by default it breaks simple print statements, e.g., `print "é"`.
> >
> > Are there any other core modules that do this?
> >
> > How is that relevant?
>
> Consistency is a boon, especially in a language with so few “guard-rails” as Perl.
>
> p5p established previously that `use utf8` is inappropriate in the feature bundle because “modern Perl” should not require extra configuration for `print "hi"` not to be subtly wrong.
>
> The same logic, IMO, should apply to core’s “go-to” modern testing library. As things stand, that would be Test2::V0. Thus, extra scrutiny seems warranted.
>
> I don't see this as a concern. There are several things to be aware of when trying to replace existing test code with Test2::V0, such as the different way that is() works. It works best when used for fresh code and upgrade guidance can be provided in documentation. It would not be as much of a concern even if it wasn't only used in testing, because it is a recommended module to use in specific cases, not a general pragma being recommended to apply to all code.

I don’t think replacing/updating existing test code need be an issue. My concern is rather the overall consistency of Perl’s standard library, especially in such a problematic part of the language as Unicode.

-F
Re: Is it time for Test2 to go to core? [ In reply to ]
On Fri, Apr 28, 2023 at 12:47?PM Felipe Gasper <felipe@felipegasper.com>
wrote:

>
>
> > On Apr 28, 2023, at 12:27 PM, Dan Book <grinnz@gmail.com> wrote:
> >
> > On Fri, Apr 28, 2023 at 10:08?AM Felipe Gasper via perl5-porters <
> perl5-porters@perl.org> wrote:
> >
> > > On Apr 28, 2023, at 9:37 AM, Leon Timmermans <fawaka@gmail.com> wrote:
> > >
> > > On Fri, Apr 28, 2023 at 3:29?PM Felipe Gasper via perl5-porters <
> perl5-porters@perl.org> wrote:
> > >
> > > > On Apr 28, 2023, at 9:20 AM, Chad Granum <exodist7@gmail.com> wrote:
> > > >
> > > > A while ago I decided not to fight a battle to get any module into
> core. I am still not sure I have the willpower for the fight. But I have
> gotten several requests from people such as Paul Evans (LeoNerd) to bring
> Test2::Suite into Core. There has been some call to let people use
> Test2::Suite, which contains most of the stuff that makes Test2 useful, in
> CORE for a while now.
> > > >
> > > > So, I am going to get the ball rolling. I am in favor of
> Test2::Suite being in core.
> > >
> > > Test2::V0 auto-exports `use utf8`. Thus, by default it breaks simple
> print statements, e.g., `print "é"`.
> > >
> > > Are there any other core modules that do this?
> > >
> > > How is that relevant?
> >
> > Consistency is a boon, especially in a language with so few
> “guard-rails” as Perl.
> >
> > p5p established previously that `use utf8` is inappropriate in the
> feature bundle because “modern Perl” should not require extra configuration
> for `print "hi"` not to be subtly wrong.
> >
> > The same logic, IMO, should apply to core’s “go-to” modern testing
> library. As things stand, that would be Test2::V0. Thus, extra scrutiny
> seems warranted.
> >
> > I don't see this as a concern. There are several things to be aware of
> when trying to replace existing test code with Test2::V0, such as the
> different way that is() works. It works best when used for fresh code and
> upgrade guidance can be provided in documentation. It would not be as much
> of a concern even if it wasn't only used in testing, because it is a
> recommended module to use in specific cases, not a general pragma being
> recommended to apply to all code.
>
> I don’t think replacing/updating existing test code need be an issue. My
> concern is rather the overall consistency of Perl’s standard library,
> especially in such a problematic part of the language as Unicode.


I understand this concern, but if there is any core library that should be
allowed to make visible progress in this area, it is one called Test2. In
my opinion it being obviously more modern and ensuring the guides contain
sufficient warning that Unicode is treated like a modern library would be
sufficient.

-Dan
Re: Is it time for Test2 to go to core? [ In reply to ]
Second question.

Originally Test2::Suite was developed as part of the Test-Simple
distribution. I spit it out when the toolchain agreed Test2::API could be
part of Test-Simple. Test2::Suite tools had not yet been vetted at that
time. This resulted in Test-Simple needing stripped down versions of the
tools from Test2::Suite in t/lib so that it could test itself. I would like
to merge Test2::Suite back into Test-Simple (with full history merge) so
that the testing of both can be simplified, and so that it is easier to
avoid accidental breakages when updates to the Test2 API require updates in
both packages.

Obviously this only applies if Test::Suite does become core, but it sounds
like that idea has mostly had positive feedback.

-Chad

On Fri, Apr 28, 2023 at 6:20?AM Chad Granum <exodist7@gmail.com> wrote:

> A while ago I decided not to fight a battle to get any module into core. I
> am still not sure I have the willpower for the fight. But I have gotten
> several requests from people such as Paul Evans (LeoNerd) to bring
> Test2::Suite into Core. There has been some call to let people use
> Test2::Suite, which contains most of the stuff that makes Test2 useful, in
> CORE for a while now.
>
> So, I am going to get the ball rolling. I am in favor of Test2::Suite
> being in core. Obviously this needs a discussion, and best I can tell that
> should happen here and not a PPC since I am not proposing syntax changes?
>
> In any case, after talking to LeoNerd and Haarg, I have stripped down the
> non-core deps as much as possible. The only non-core dep that is not
> optional is Term::Table which was written specifically for Test2::Suite,
> and Test2::Suite is not viable without it. All other non-core deps are
> optional.
>
> So the following 2 cpan dists would need to be pulled in:
>
> 1. Test2::Suite
> 2. Term::Table
>
>
> I will respond to technical questions. But I am not going to engage in the
> political back and forth that often happens in these discussions. If the
> group decides it goes to Core I am ready and willing to take on everything
> that comes with making it Dual Life, as I already do with Test-Simple. If
> the group decides not to do this, I will leave it to others to argue the
> point, and I will abide by the final decision.
>
> Thank you,
>
> Chad Granum
>
Re: Is it time for Test2 to go to core? [ In reply to ]
Leon Timmermans <fawaka@gmail.com> writes:

> First of all, you really shouldn't be printing to STDOUT/STDERR in a test
> anyway. The test framework owns the outputs, and it will actually take care
> that the output is UTF-8. This problem doesn't exist if you use the tool
> the way it's meant to be used.

A concrete example:

$ cat mojibake.t
#!/usr/bin/env perl

use strict;
use warnings;
use Test2::V0;

pass("ok");

diag "skjærgårdsøl";
no utf8;
diag "blåbærsyltetøy";

done_testing();

$ perl mojibake.t
# Seeded srand with seed '20230429' from local date.
ok 1 - ok
# skjærgårdsøl
# blåbærsyltetøy
1..1

So _not_ having `use utf8;` would break using the output functions you
are supposed to be using with Test::V0.

- ilmari
Re: Is it time for Test2 to go to core? [ In reply to ]
On Sat, Apr 29, 2023 at 4:58?PM Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
wrote:

> So _not_ having `use utf8;` would break using the output functions you
> are supposed to be using with Test::V0.
>

That's because "use utf8;" doesn't set the encoding of the output
filehandles, but rather affects how the code itself is parsed. There are
non-ascii characters that are encoded in the file as utf8 but without "use
utf8" they are interpreted as latin1.

The question is whether it is reasonable that tests should interpret the
file encoding as utf8 when the default is still latin1.
Re: Is it time for Test2 to go to core? [ In reply to ]
On Fri, Apr 28, 2023 at 3:21?PM Chad Granum <exodist7@gmail.com> wrote:

> A while ago I decided not to fight a battle to get any module into core. I
> am still not sure I have the willpower for the fight. But I have gotten
> several requests from people such as Paul Evans (LeoNerd) to bring
> Test2::Suite into Core. There has been some call to let people use
> Test2::Suite, which contains most of the stuff that makes Test2 useful, in
> CORE for a while now.
>
> So, I am going to get the ball rolling. I am in favor of Test2::Suite
> being in core. Obviously this needs a discussion, and best I can tell that
> should happen here and not a PPC since I am not proposing syntax changes?
>
> In any case, after talking to LeoNerd and Haarg, I have stripped down the
> non-core deps as much as possible. The only non-core dep that is not
> optional is Term::Table which was written specifically for Test2::Suite,
> and Test2::Suite is not viable without it. All other non-core deps are
> optional.
>
> So the following 2 cpan dists would need to be pulled in:
>
> 1. Test2::Suite
> 2. Term::Table
>
>
> I will respond to technical questions. But I am not going to engage in the
> political back and forth that often happens in these discussions. If the
> group decides it goes to Core I am ready and willing to take on everything
> that comes with making it Dual Life, as I already do with Test-Simple. If
> the group decides not to do this, I will leave it to others to argue the
> point, and I will abide by the final decision.
>
> Thank you,
>
> Chad Granum
>

A big +1 from me!
I'm using Test2::V0 since years for all my new CPAN modules and it makes
life sooo much easier!
Especially for testing parts of JSON API responses.

Thank you!

I'd even love to see some of the comparison functions like 'is' usable in
non-testing code as it is serves like what smartmatch was envisioned to
become.

1 2  View All