Closed p5pRT closed 12 years ago
On any(?) platform\, if PERL_JSON_BACKEND or PERL_YAML_BACKEND is set\, the core tests will fail when trying parse CPAN metafiles. This env var may be set for other reasons\, unbeknownst to the user\, and we should be clearing it during testing or at least alerting the user to unset it before building.
On Thu\, May 3\, 2012 at 10:28 PM\, Ricardo SIGNES \perlbug\-followup@​perl\.org wrote:
On any(?) platform\, if PERL_JSON_BACKEND or PERL_YAML_BACKEND is set\, the core tests will fail when trying parse CPAN metafiles. This env var may be set for other reasons\, unbeknownst to the user\, and we should be clearing it during testing or at least alerting the user to unset it before building.
Which tests for which modules? I've already been whacking away at localizing those during most testing where it matters\, but it may have been after the code freeze.
-- David
The RT System itself - Status changed from 'new' to 'open'
../cpan/CPANPLUS/t/04_CPANPLUS-Module.t ../cpan/CPANPLUS/t/20_CPANPLUS-Dist-MM.t ../cpan/ExtUtils-Constant/t/Constant.t ../cpan/ExtUtils-MakeMaker/t/FIRST_MAKEFILE.t ../cpan/ExtUtils-MakeMaker/t/INST.t ../cpan/ExtUtils-MakeMaker/t/INSTALL_BASE.t ../cpan/ExtUtils-MakeMaker/t/INST_PREFIX.t ../cpan/ExtUtils-MakeMaker/t/PL_FILES.t ../cpan/ExtUtils-MakeMaker/t/VERSION_FROM.t ../cpan/ExtUtils-MakeMaker/t/WriteEmptyMakefile.t ../cpan/ExtUtils-MakeMaker/t/basic.t ../cpan/ExtUtils-MakeMaker/t/build_man.t ../cpan/ExtUtils-MakeMaker/t/meta_convert.t ../cpan/ExtUtils-MakeMaker/t/metafile_data.t ../cpan/ExtUtils-MakeMaker/t/min_perl_version.t ../cpan/ExtUtils-MakeMaker/t/miniperl.t ../cpan/ExtUtils-MakeMaker/t/pm.t ../cpan/ExtUtils-MakeMaker/t/pm_to_blib.t ../cpan/ExtUtils-MakeMaker/t/postamble.t ../cpan/ExtUtils-MakeMaker/t/prereq.t ../cpan/ExtUtils-MakeMaker/t/recurs.t ../cpan/ExtUtils-MakeMaker/t/several_authors.t ../cpan/ExtUtils-MakeMaker/t/writemakefile_args.t ../cpan/ExtUtils-MakeMaker/t/xs.t ../cpan/Module-Build/t/compat.t ../cpan/Module-Build/t/metadata2.t ../cpan/Module-Build/t/mymeta.t ../cpan/Module-Build/t/runthrough.t ../cpan/Module-Build/t/script_dist.t ../dist/ExtUtils-Install/t/InstallWithMM.t
On Fri\, May 4\, 2012 at 7:15 AM\, David Golden \xdaveg@​gmail\.com wrote:
On Thu\, May 3\, 2012 at 10:28 PM\, Ricardo SIGNES \perlbug\-followup@​perl\.org wrote:
On any(?) platform\, if PERL_JSON_BACKEND or PERL_YAML_BACKEND is set\, the core tests will fail when trying parse CPAN metafiles. This env var may be set for other reasons\, unbeknownst to the user\, and we should be clearing it during testing or at least alerting the user to unset it before building.
Which tests for which modules? I've already been whacking away at localizing those during most testing where it matters\, but it may have been after the code freeze.
c.f. https://metacpan.org/diff/release/DAGOLDEN/Parse-CPAN-Meta-1.4402/DAGOLDEN/Parse-CPAN-Meta-1.4404
A more aggressive option would be to modify Parse::CPAN::Meta itself (the .pm) to ignore PERL_(YAML|JSON)_BACKEND if PERL_CORE is set. That's a little gross\, since it leaves a perl compile-time env variable test in the final code\, but it would be a single point to bypass those issues entirely.
On Fri\, May 04\, 2012 at 10:05:34AM -0400\, David Golden wrote:
c.f. https://metacpan.org/diff/release/DAGOLDEN/Parse-CPAN-Meta-1.4402/DAGOLDEN/Parse-CPAN-Meta-1.4404
A more aggressive option would be to modify Parse::CPAN::Meta itself (the .pm) to ignore PERL_(YAML|JSON)_BACKEND if PERL_CORE is set. That's a little gross\, since it leaves a perl compile-time env variable test in the final code\, but it would be a single point to bypass those issues entirely.
Maybe better to add them to this bit of t/TEST (line 94 onwards) which zaps environment variables:
# delete env vars that may influence the results # but allow override via *_TEST env var if wanted # (e.g. PERL5OPT_TEST=-d:NYTProf) for my $envname (qw(PERL5LIB PERLLIB PERL5OPT)) { my $override = $ENV{"${envname}_TEST"}; if (defined $override) { warn "$0: $envname=$override\n"; $ENV{$envname} = $override; } else { delete $ENV{$envname}; } }
That code is also run by t/harness
Nicholas Clark
Fixed in commit b664668356.
@cpansprout - Status changed from 'open' to 'resolved'
@rjbs - Status changed from 'resolved' to 'open'
On Fri May 04 09:54:42 2012\, sprout wrote:
Fixed in commit b664668356.
...but we're not done thinking about what Nick suggested.
On Fri May 04 10:38:49 2012\, rjbs wrote:
On Fri May 04 09:54:42 2012\, sprout wrote:
Fixed in commit b664668356.
...but we're not done thinking about what Nick suggested.
Apparently the bugfix that went in isn't the one we talked about\, it's the better one that Nick suggested. Fantastic!
@rjbs - Status changed from 'open' to 'resolved'
Migrated from rt.perl.org#112750 (status was 'resolved')
Searchable as RT112750$