Skip to content

Commit d430313

Browse files
committed
Do not pull builds when doing fuzzy search
It needs to go quickly through lots of revisions, and it is somewhat irrelevant if the build exists or not. Therefore, just use whatever we have, and do not attempt to download builds from the main server.
1 parent 6260f76 commit d430313

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/Whateverable.pm6

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,13 +340,17 @@ sub fetch-build($full-commit-hash, :$backend!) {
340340
return $archive
341341
}
342342

343-
sub build-exists($full-commit-hash, :$backend=rakudo-moar) is export {
343+
sub build-exists($full-commit-hash,
344+
:$backend=rakudo-moar,
345+
:$force-local=False) is export {
344346
my $archive = {ARCHIVES-LOCATION}/$backend/$full-commit-hash.zst.IO;
345347
my $archive-lts = {ARCHIVES-LOCATION}/$backend/$full-commit-hash.IO;
346348
# ↑ long-term storage (symlink to a large archive)
347349

348350
my $answer = ($archive, $archive-lts).any.e.so;
349-
return so fetch-build $full-commit-hash, :$backend if !$answer && $CONFIG<mothership>;
351+
if !$force-local && !$answer && $CONFIG<mothership> {
352+
return so fetch-build $full-commit-hash, :$backend
353+
}
350354
$answer
351355
}
352356

@@ -356,7 +360,8 @@ method get-similar($tag-or-hash, @other?, :$repo=$RAKUDO) {
356360
--format=%(*objectname)/%(objectname)/%(refname:strip=2),
357361
--sort=-taggerdate)<output>.lines
358362
.map(*.split(/))
359-
.grep({ build-exists .[0] || .[1] })
363+
.grep({ build-exists .[0] || .[1],
364+
:force-local })
360365
.map(*[2]);
361366

362367
my $cutoff = $tag-or-hash.chars max 7;

0 commit comments

Comments
 (0)