Skip to content

Commit

Permalink
No need to $proc.out.close anymore
Browse files Browse the repository at this point in the history
Resolves issue #175. Reverts at least these commits:

* 96ccddc
* 39cde1e
* c63ed89

See this Perl 6 doc issue for more info:
Raku/doc#1304
  • Loading branch information
AlexDaniel committed Jul 18, 2017
1 parent dc4ac48 commit 62eee9e
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 8 deletions.
1 change: 0 additions & 1 deletion Benchable.p6
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ multi method benchmark-code($full-commit-hash, @code) {
}
my $proc = run :out, :bin, pzstd, -dqc, --, {ARCHIVES-LOCATION}/rakudo-moar/$full-commit-hash.zst;
run :in($proc.out), :bin, tar, x, --absolute-names;
$proc.out.close;
my $timing;
if {BUILDS-LOCATION}/rakudo-moar/$full-commit-hash/bin/perl6.IO !~~ :e {
return Commit exists, but a perl6 executable could not be built for it
Expand Down
2 changes: 0 additions & 2 deletions Coverable.p6
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ method process($msg, $config is copy, $grep is copy, $code is copy) {
my $s = run 'sort', '--key=2,2', '--key=3n', '-u', :in($g.out), :out;
my $colrm = run 'colrm', 1, 5, :in($s.out), :out;
$result<coverage> = $colrm.out.slurp-rest.chomp;
$colrm.out.close;
$output = $result<output>;
if $result<signal> < 0 { # numbers less than zero indicate other weird failures
$output = Cannot test this commit ($output)
Expand Down Expand Up @@ -176,7 +175,6 @@ method process($msg, $config is copy, $grep is copy, $code is copy) {
# ⚠ TODO don't do this ↓ for every line, do it for every *file*. It will be much faster.
my $proc = run :out, |@git, show, $full-commit:$fname;
my $code = run(:out, :in($proc.out), sed, -n, $sed-range).out.slurp-rest.trim; # TODO trim? or just chomp?
$proc.out.close;
$code .= subst(:g, \n, ```<br>```); # TODO multiline code blocks using github markdown?
$code .= subst(:g, |, \|); # TODO really?
$cover-report ~= ```$code``` |\n; # TODO close properly (see how many ``` are there already)
Expand Down
2 changes: 0 additions & 2 deletions Whateverable.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,9 @@ method run-smth($full-commit-hash, $code, :$backend=‘rakudo-moar’) {
if $archive-path.IO ~~ :e {
my $proc = run :out, :bin, pzstd, -dqc, --, $archive-path;
run :in($proc.out), :bin, tar, x, --absolute-names;
$proc.out.close();
} else {
my $proc = run :out, :bin, lrzip, -dqo, -, --, $archive-link;
run :in($proc.out), :bin, tar, --extract, --absolute-names, --, $build-path;
$proc.out.close();
}

my $return = $code($build-path); # basically, we wrap around $code
Expand Down
1 change: 0 additions & 1 deletion build.p6
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ sub process-commit($commit) {
say »»»»» $commit: compressing;
my $proc = run(:out, :bin, tar, cf, -, --absolute-names, --remove-files, --, $build-path);
run(:in($proc.out), :bin, zstd, -c, -19, -q, -o, $archive-path);
$proc.out.close;

rmtree $temp-folder;
}
2 changes: 0 additions & 2 deletions maintenance/long-term-storage.p6
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ sub pack-it {
# once in forever.
my $proc = run :out, :bin, pzstd, -dqc, --, $archive-path;
exit 1 unless run :in($proc.out), :bin, tar, x, --absolute-names;
$proc.out.close;
}

my @bytes = @pack.join.comb(2.parse-base: 16;
Expand All @@ -77,7 +76,6 @@ sub pack-it {

my $proc = run :out, :bin, tar, cf, -, --absolute-names, --remove-files, --, |@paths;
if run :in($proc.out), :bin, lrzip, -q, -L, 9, -o, $large-archive-path {
$proc.out.close;
for @pack {
$large-archive-path.IO.symlink({ARCHIVES-LOCATION}/$_);
unlink {ARCHIVES-LOCATION}/$_.zst
Expand Down

0 comments on commit 62eee9e

Please sign in to comment.