niner / Inline-Perl5

Use Perl 5 code in a Raku program
Artistic License 2.0
94 stars 30 forks source link

Unit tests Fail on FreeBSD. #142

Open pprocacci opened 4 years ago

pprocacci commented 4 years ago

% perl -v This is perl 5, version 30, subversion 1 (v5.30.1) built for amd64-freebsd-thread-multi

% zef install Inline::Perl5 ===> Searching for: Inline::Perl5 ===> Updating cpan mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json ===> Updating p6c mirror: http://ecosystem-api.p6c.org/projects1.json ===> Updated p6c mirror: http://ecosystem-api.p6c.org/projects1.json ===> Updated cpan mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json ===> Searching for missing dependencies: Distribution::Builder::MakeFromJSON:ver<0.6+> ===> Searching for missing dependencies: System::Query ===> Building: Inline::Perl5:ver<0.44>:auth ===> Building [OK] for Inline::Perl5:ver<0.44>:auth ===> Testing: System::Query:ver<0.1.4>:auth ===> Testing [OK] for System::Query:ver<0.1.4>:auth ===> Testing: Distribution::Builder::MakeFromJSON:ver<0.6>:auth ===> Testing [OK] for Distribution::Builder::MakeFromJSON:ver<0.6>:auth ===> Testing: Inline::Perl5:ver<0.44>:auth # Failed test 'at least one destructor ran # at t/p5_object_destructor.t line 40 # Failed test 'at least one destructor ran' # at t/p5_object_destructor.t line 41 `# Looks like you failed 2 tests of 20 ===> Testing [FAIL]: Inline::Perl5:ver<0.44>:auth Aborting due to test failure: Inline::Perl5:ver<0.44>:auth (use --force-test to override)

niner commented 4 years ago

Failed test 'at least one destructor ran'

at t/p5_object_destructor.t line 40

Failed test 'at least one destructor ran'

at t/p5_object_destructor.t line 41

Looks like you failed 2 tests of 20

The destructor have been troublesome for quite a while. They are important for correctness, but ultimately depend on implementation details of the VM. I'm not terribly surprised that they fail on some systems. You can safely ignore those failures. I'll probably degrade those tests to author-only ones.

pprocacci commented 4 years ago

Thanks niner. I'll ignore it.

As an aside, could you possibly provide an example of how to mix perl5 regex's with perl6 code via subset's or similiar?

Something like the following:

subset This of Str where ~~ m:P5/^[\w-.:/]+$/ and 1 <= .chars <= 255;

This doesn't work by itself because The P5 adverb is based on Perl 5.8. How would you personally accomplish this using Inline::Perl5?

Thanks in advance.