Skip Menu |
Report information
Id: 132088
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: ash.gabriel [at] gmail.com
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Date: Thu, 14 Sep 2017 17:16:30 +0200
Subject: code broken by latest build
From: Gabriel Ash <ash.gabriel [...] gmail.com>
To: rakudobug [...] perl.org
Download (untitled) / with headers
text/plain 1.5k

Hello,

I've written a module with release 2017-07. 

source here: https://github.com/gabrielash/perl6-zmq

It fails travis ci test with 'latest'  release, but passes with '2017-07'.

This is the error

./t/11.t ..... Too few positionals passed; expected 5 arguments but got 3

in method send at /home/travis/build/gabrielash/perl6-zmq/lib/Net/ZMQ/Message.pm (Net::ZMQ::Message) line 244

in block <unit> at ./t/11.t line 55

I am not sure what is wrong and whether it is a bug or my mistake.

I tried to isolate the problem with the following test, but that test, in isolation, does work on the latest build. 

So there is something in the module interacting badly with this nativecall, but only on the latest release.

class zmq_msg_t is repr('CStruct') {
    has int64 $._;
    has int64 $._1;
    has int64 $._2;
    has int64 $._3;
    has int64 $._4;
    has int64 $._5;
    has int64 $._6;
    has int64 $._7;
}

sub zmq_msg_init_data(zmq_msg_t
                                         ,Pointer
                                         ,size_t
                                         ,Pointer = nativecast( Pointer, 0)
                                         ,Pointer = nativecast( Pointer, 0)
                                  ) is native('zmq', v5)
                          returns int32 is export { * }

my buf8 $b .= new(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
my Pointer $p = nativecast(Pointer, $b);
my zmq_msg_t $m .= new ;

lives-ok {zmq_msg_init_data($m, $p , 10  )}, "native call ok ";

Hoping you can help.

Gabriel Ash



Bisected to https://github.com/rakudo/rakudo/commit/cd7dc4ce934003b9da1e540e638ee6dbe1f44b1b

Committable output https://gist.github.com/Whateverable/ee36fb271f2700f1684e1290a966e709

On 2017-09-14 08:16:43, ash.gabriel@gmail.com wrote:
Show quoted text
> Hello,
>
> I've written a module with release 2017-07.
>
> source here: https://github.com/gabrielash/perl6-zmq
>
> It fails travis ci test with 'latest' release, but passes with '2017-07'.
>
> This is the error
>
> ./t/11.t ..... Too few positionals passed; expected 5 arguments but got 3
>
> in method send at
> /home/travis/build/gabrielash/perl6-zmq/lib/Net/ZMQ/Message.pm
> (Net::ZMQ::Message) line 244
>
> in block <unit> at ./t/11.t line 55
>
> I am not sure what is wrong and whether it is a bug or my mistake.
>
> I tried to isolate the problem with the following test, but that test,
> in isolation, does work on the latest build.
>
> So there is something in the module interacting badly with this
> nativecall, but only on the latest release.
>
> class zmq_msg_t is repr('CStruct') {
> has int64 $._;
> has int64 $._1;
> has int64 $._2;
> has int64 $._3;
> has int64 $._4;
> has int64 $._5;
> has int64 $._6;
> has int64 $._7;
> }
>
> sub zmq_msg_init_data(zmq_msg_t
> ,Pointer
> ,size_t
> ,Pointer = nativecast( Pointer, 0)
> ,Pointer = nativecast( Pointer, 0)
> ) is native('zmq', v5)
> returns int32 is export { * }
>
> my buf8 $b .= new(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
> my Pointer $p = nativecast(Pointer, $b);
> my zmq_msg_t $m .= new ;
>
> lives-ok {zmq_msg_init_data($m, $p , 10 )}, "native call ok ";
>
> Hoping you can help.
>
> Gabriel Ash
>
>
>


From: Timo Paulssen <timo [...] wakelift.de>
Subject: Re: [perl #132088] [REGRESSION][NATIVECALL] code broken by latest build
To: perl6-compiler [...] perl.org
Date: Fri, 15 Sep 2017 13:54:20 +0200
Download (untitled) / with headers
text/plain 263b
I just committed a hotfix so the upcoming release can go through. Hopefully it can be replaced with a proper implementation of optional parameters for the nativecall compiler soon. https://github.com/rakudo/rakudo/commit/1818de980fe39a37b405c0353d088932bd4d034a
To: perl6-bugs-followup [...] perl.org
Date: Sat, 16 Sep 2017 03:15:00 +0200
Subject: Re: [perl #132088] [REGRESSION][NATIVECALL] code broken by latest build
From: Gabriel Ash <ash.gabriel [...] gmail.com>
Download (untitled) / with headers
text/plain 338b
Thank you!! On 9/15/2017 2:03 PM, Timo Paulssen via RT wrote: Show quoted text
> I just committed a hotfix so the upcoming release can go through. > Hopefully it can be replaced with a proper implementation of optional > parameters for the nativecall compiler soon. > > https://github.com/rakudo/rakudo/commit/1818de980fe39a37b405c0353d088932bd4d034a >


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org