Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avoid LAST to work around some weird issue
Sometimes when run-bisect runs from multiple threads at the same time
I am getting Nil in string context warnings. To me that can only mean
that `$result<output>` is not what it is supposed to be, so there's a
bug in rakudo. Working around it because I want to move on right
now. Please feel free to investigate.
  • Loading branch information
AlexDaniel committed Mar 25, 2019
1 parent 9392cbb commit c535eee
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/Whateverable/Bisection.pm6
Expand Up @@ -56,6 +56,7 @@ sub run-bisect(&runner = &standard-runner, #← Something to run on every revi
$status = $result<exit-code>;
if $result<output> ~~ /^^ (\S+) ‘ is the first new commit’ / {
$first-new-commit = ~$0;
take $result<output>;
last
}
if $status == 2 {
Expand All @@ -64,10 +65,13 @@ sub run-bisect(&runner = &standard-runner, #← Something to run on every revi
my @possible-revs = get-output(:cwd($repo-cwd), <git rev-list>,
<refs/bisect/new --not>, |$good-revs.lines)<output>.lines;
$first-new-commit = @possible-revs;
take $result<output>;
last
}
if $status0 {
take $result<output>;
last
}
last if $status0;
LAST take $result<output>
}
my $log = @bisect-log.join(\n);
%( :$log, :$status, :$first-new-commit )
Expand Down

0 comments on commit c535eee

Please sign in to comment.