Re: Depreciated code????

2021-07-27 Thread ToddAndMargo via perl6-users

On 7/27/21 12:21 PM, Elizabeth Mattijsen wrote:


So the deprecation logic is pointing at the wrong line.

Where does this RunNoShellLib.pm6 live?  It's must be something inside that.


Nothing has changed inside it for the last year.

It resides in /home/linuxutil/p6lib

The main program resides in /home/linuxutil

And I call that line from the main program over 100
times without issue.

The error only happens when I call `exit;` from the
main program.  And goes away when I comment out
`# exit;`

This is an odd one for me.

I tried erasing p6lib/.precomp.  No joy.

Here I can reproduce the error.  And without the exit:


$ raku -e 'my $x; my $y;
  use lib "/home/linuxutil/p6lib";
  use RunNoShellLib :RunNoShell;
  ($x,$y)= RunNoShell "pwd";'

Saw 1 occurrence of deprecated code.

Sub RunNoShellAll (from RunNoShellLib) seen at:
  /home/linuxutil/p6lib/RunNoShellLib.pm6 (RunNoShellLib), line 148
Please use exitcode and/or signal methods (status is to be removed in 
2022.06) instead.


Please contact the author to have these occurrences of deprecated code
adapted, so that this message will disappear!



This is the sub being called:

141: sub RunNoShell( $RunString ) is export( :RunNoShell ) {
142:   # Return both the STDOUT and the return code
143:
144:   my $ReturnStr = "";
145:   my $ReturnErr = "";
146:   my $RtnCode   = 0;
147:
148:   ( $ReturnStr, $ReturnErr, $RtnCode ) = RunNoShellAll( $RunString, 
True, False, True );

149:   return ( $ReturnStr, $RtnCode );
150: }


And it calls RunNoShellAll

36: sub RunNoShellAll( Str $RunString, Bool $StdOut, Bool $StdErr, Bool 
$Code ) {



Do you see anything that is "depreciate" on any of these line?

Thank you for helping with this,
-T



Re: Depreciated code????

2021-07-27 Thread Gianni Ceccarelli
On 2021-07-27 Elizabeth Mattijsen  wrote:
> So the deprecation logic is pointing at the wrong line.
> 
> Where does this RunNoShellLib.pm6 live?  It's must be something
> inside that.

Given the error message says:

> Please use exitcode and/or signal methods (status is to be
> in 2022.06) instead.

I guess the cause is a call to `Proc.status`, which has just been
deprecated in 2021.07, in favour of those two other methods.

-- 
Dakkar - 
GPG public key fingerprint = A071 E618 DD2C 5901 9574
 6FE2 40EA 9883 7519 3F88
key id = 0x75193F88



Re: Depreciated code????

2021-07-27 Thread Elizabeth Mattijsen
Point taken.

So the deprecation logic is pointing at the wrong line.

Where does this RunNoShellLib.pm6 live?  It's must be something inside that.

> On 27 Jul 2021, at 21:15, ToddAndMargo via perl6-users  
> wrote:
> 
> 
>>> On 7/26/21 5:21 PM, ToddAndMargo via perl6-users wrote:
 Hi All,
 $ raku -v
 Welcome to 퐑퐚퐤퐮퐝퐨™ v2021.07.
 Implementing the 퐑퐚퐤퐮™ programming language v6.d.
 Built on MoarVM version 2021.07.
 After upgrading from 2021.05, I am getting this:
 Saw 1 occurrence of deprecated code.
 
  Sub RunNoShellAll (from RunNoShellLib) seen at:
   /home/linuxutil/p6lib/RunNoShellLib.pm6 (RunNoShellLib), line 148
 Please use exitcode and/or signal methods (status is to be removed in 
 2022.06) instead.
 
  Please contact the author to have these occurrences of deprecated code
 adapted, so that this message will disappear!
 148: ( $ReturnStr, $ReturnErr, $RtnCode ) = RunNoShellAll( $RunString, 
 True, False, True );
 Confused,
 -T
> 
> 
>>> On 27 Jul 2021, at 02:29, ToddAndMargo via perl6-users 
>>>  wrote:
>>> 
>>> The command that is triggering this in the main program is
>>> 
>>>exit;
>>> 
>>> ???
> 
> On 7/27/21 2:24 AM, Elizabeth Mattijsen wrote:
>> Read the error message!
>> "/home/linuxutil/p6lib/RunNoShellLib.pm6 (RunNoShellLib), line 148"
>> What does that line say?
> 
> Hi Elizabeth
> 
> Please re-read my original post.  Look for the line
> that starts with "148:"
> 
> -T
> 



Re: Depreciated code????

2021-07-27 Thread ToddAndMargo via perl6-users




On 7/26/21 5:21 PM, ToddAndMargo via perl6-users wrote:

Hi All,
$ raku -v
Welcome to 퐑퐚퐤퐮퐝퐨™ v2021.07.
Implementing the 퐑퐚퐤퐮™ programming language v6.d.
Built on MoarVM version 2021.07.
After upgrading from 2021.05, I am getting this:
Saw 1 occurrence of deprecated code.

 Sub RunNoShellAll (from RunNoShellLib) seen at:
   /home/linuxutil/p6lib/RunNoShellLib.pm6 (RunNoShellLib), line 148
Please use exitcode and/or signal methods (status is to be removed in 2022.06) 
instead.

 Please contact the author to have these occurrences of deprecated code
adapted, so that this message will disappear!
148: ( $ReturnStr, $ReturnErr, $RtnCode ) = RunNoShellAll( $RunString, True, 
False, True );
Confused,
-T




On 27 Jul 2021, at 02:29, ToddAndMargo via perl6-users  
wrote:

The command that is triggering this in the main program is

exit;

???


On 7/27/21 2:24 AM, Elizabeth Mattijsen wrote:

Read the error message!

"/home/linuxutil/p6lib/RunNoShellLib.pm6 (RunNoShellLib), line 148"

What does that line say?


Hi Elizabeth

Please re-read my original post.  Look for the line
that starts with "148:"

-T



Re: Depreciated code????

2021-07-27 Thread Elizabeth Mattijsen
Read the error message!

"/home/linuxutil/p6lib/RunNoShellLib.pm6 (RunNoShellLib), line 148"

What does that line say?

> On 27 Jul 2021, at 02:29, ToddAndMargo via perl6-users  
> wrote:
> 
> On 7/26/21 5:21 PM, ToddAndMargo via perl6-users wrote:
>> Hi All,
>> $ raku -v
>> Welcome to 퐑퐚퐤퐮퐝퐨™ v2021.07.
>> Implementing the 퐑퐚퐤퐮™ programming language v6.d.
>> Built on MoarVM version 2021.07.
>> After upgrading from 2021.05, I am getting this:
>> Saw 1 occurrence of deprecated code.
>> 
>>  Sub RunNoShellAll (from RunNoShellLib) seen at:
>>   /home/linuxutil/p6lib/RunNoShellLib.pm6 (RunNoShellLib), line 148
>> Please use exitcode and/or signal methods (status is to be removed in 
>> 2022.06) instead.
>> 
>>  Please contact the author to have these occurrences of deprecated code
>> adapted, so that this message will disappear!
>> 148: ( $ReturnStr, $ReturnErr, $RtnCode ) = RunNoShellAll( $RunString, True, 
>> False, True );
>> Confused,
>> -T
> 
> 
> The command that is triggering this in the main program is
> 
>exit;
> 
> ???
>