Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zef::Repository.candidates gets surprised by Nil return of search calls (related to native dependencies?) #568

Open
timo opened this issue Aug 20, 2024 · 1 comment

Comments

@timo
Copy link

timo commented Aug 20, 2024

When running zef depends Git::Files which depends on git:from<bin>, i.e. a native dependency, then in this code:

my $group-results := @repo-group.hyper(:batch(1)).map: -> $repo {
my @search-for = $repo.id eq 'Zef::Repository::LocalCache' ?? @identities !! @look-for;
$repo.search(@search-for, :strict);
}
for $group-results.flat -> $dist {
%searchable{$dist.as} = 0;
take $dist;
}

either $group-results or $group-results.flat will result in (Nil,).Seq, causing %searchable{Nil} = 0;, which outputs a warning.

@timo timo changed the title Zef::Repository.search gets surprised by Nil return of search calls (related to native dependencies?) Zef::Repository.candidates gets surprised by Nil return of search calls (related to native dependencies?) Aug 20, 2024
@ugexe
Copy link
Owner

ugexe commented Aug 20, 2024

Huh, I did not expect this type of behavior

$ raku -e 'say Nil.asaasdfasdf'
Nil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants