On Tue, Jul 27, 2021 at 4:38 PM ToddAndMargo via perl6-users
<perl6-users@perl.org> wrote:
>
> 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.

You've presumably updated your copy of Rakudo in that time, and Rakudo
has started declaring that something is deprecated.

The error message tells you what is now deprecated (status), what you
should use instead, and when it will be removed. I assume your Run

BTW, depreciated is a financial term, this is deprecated, no "i".

> 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;`

Deprecation warning (not error) messages are emitted only when the
program exits, though the docs could make this clearer.

This is to avoid the warnings interleaving with any other program output.

See https://docs.raku.org/routine/is%20DEPRECATED for an example of
how you can add deprecated messages to your own code.

See 
https://github.com/rakudo/rakudo/blob/54f1b7a5f22c03b301809667c18cef00d6b1df39/src/core.c/Proc.pm6#L204
for the particular deprecation notice you're receiving.

> 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?

It's probably a call to status inside this sub.

> Thank you for helping with this,
> -T
>

Reply via email to