Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Travis-CI configuration #5

Conversation

paultcochrane
Copy link

Oddly enough, the test suite passes on my local system, but not on the Travis infrastructure, hence this PR is submitted partially as adding a feature to the repo and partially as an issue to show that there's a problem. The error produced on Travis is:

t/01-load.t .. ===SORRY!===
Type 'Test::Builder::Plan::Generic' is not declared
at /home/travis/build/paultcochrane/p6-test-builder/lib/Test/Builder.pm (Test::Builder):144
------>     has Test::Builder::Plan::Generic⏏ $!plan;
Malformed has
at /home/travis/build/paultcochrane/p6-test-builder/lib/Test/Builder.pm (Test::Builder):144
------>     has Test::Builder::Plan::⏏Generic $!plan;

which is, well, strange, since Test::Builder::Plan::Generic exists and should be available via the use statement to Test::Builder::Plan in the test file. Unfortunately, I've no idea what the underlying problem is, nor how to fix it :-/ Nevertheless, hopefully this gives someone else sufficient information to start debugging the issue and hopefully to resolve it.

@jonathanstowe
Copy link
Member

That is odd, I'll take a look later.

@paultcochrane
Copy link
Author

@jonathanstowe have you had a chance to look into this problem?

@ugexe
Copy link
Member

ugexe commented Nov 25, 2016

I presume its not failing for you locally because you are not testing on the same version of perl6 that is getting used on TravisCI. I just tested locally on moar-2016.05 (pass) and a fresh moar-blead (fail)

@paultcochrane
Copy link
Author

@ugexe you're right, it's only happening on blead atm. I was using 2016.10 from Debian Stretch (testing), hence wasn't seeing the issue locally. I've managed to reduce the issue to this:

$ cat lib/Test/Builder/Test.pm
class Test::Builder::Test { }
$ cat lib/Test/Builder/Plan.pm
role Test::Builder::Plan::Generic { }
class Test::Builder::Plan does Test::Builder::Plan::Generic { }
$ cat lib/Test/Builder.pm
use Test::Builder::Test;
use Test::Builder::Plan;

class Test::Builder {
    has Test::Builder::Plan::Generic $!plan;
}

If one then tries to use Test::Builder the error I mentioned in an earlier comment appears (i.e. Test::Builder::Plan::Generic isn't defined). E.g. one can try this via:

$ perl6 -Ilib -e 'use Test::Builder'

If one then comments out the use statement for Test::Builder::Test, the above command works and Test::Builder can be used without problem. Also, if one renames lib/Test/Builder/Test.pm to something else, e.g. lib/Test/Builder/Tester.pm and renames the class within to be Test::Builder::Tester, then the use Test::Builder also works without problem. I'm not sure what the actual problem here is; whether it's a problem with Rakudo, or whether this is something that Test::Builder is doing wrong. Any ideas would be very welcome!

@ugexe
Copy link
Member

ugexe commented Nov 27, 2016

Seems like a rakudo bug. Renaming everything to Tester::Builder::Tester reintroduces the bug, so would seem to be somewhat related to identical name parts being present.

@jonathanstowe
Copy link
Member

So, who wants to golf this to something reproducible for a rakudobug?

@paultcochrane
Copy link
Author

A git bisect shows that the issue appears in Rakudo at this commit: ab946945735042ff99953f6636bdf98acd5bfc71. I'll see if I can golf the problem a bit more and submit a rakudobug.

@ugexe
Copy link
Member

ugexe commented Dec 5, 2016

@paultcochrane here's a golf:
Works: perl6 -e 'class A::B::A { }; role A::B::C { }; class A::B { has A::B::C $!x; };'
Fails: perl6 -e '{ class A::B::A { }; }; role A::B::C { }; class A::B { has A::B::C $!x; };'
Works: perl6 -e '{ class A::B::X { }; }; role A::B::C { }; class A::B { has A::B::C $!x; };'

@paultcochrane
Copy link
Author

BTW: here's the bug report in RT: https://rt.perl.org/Ticket/Display.html?id=130424

@lizmat
Copy link
Contributor

lizmat commented May 24, 2022

Travis is no more, so closing

@lizmat lizmat closed this May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants