ugexe / zef

Raku Module Management
Artistic License 2.0
206 stars 44 forks source link

Use of uninitialized value @short-names-to-index #543

Closed patrickbkr closed 8 months ago

patrickbkr commented 8 months ago

I'm on zef 0.21.0. I have just seen the following:

zef install --/test Test::META
===> Searching for: Test::META
Use of uninitialized value @short-names-to-index of type Any in string context.
Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful.
  in block  at /home/patrickb/.rakubrew/versions/moar-2023.10/share/perl6/site/sources/7B8C4765AC0B50F3E076BE3378DD767C55081947 (Zef::Repository::Ecosystems) line 250
Use of uninitialized value @short-names-to-index of type Any in string context.
Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful.
  in block  at /home/patrickb/.rakubrew/versions/moar-2023.10/share/perl6/site/sources/7B8C4765AC0B50F3E076BE3378DD767C55081947 (Zef::Repository::Ecosystems) line 250
===> Searching for missing dependencies: META6:ver<0.0.24+>, License::SPDX
===> Searching for missing dependencies: JSON::Class:ver<0.0.20+>, JSON::Name, JSON::Class:ver<0.0.14+>
===> Searching for missing dependencies: JSON::Marshal:ver<0.0.25+>, JSON::Unmarshal:ver<0.14+>, JSON::OptIn
===> Staging JSON::OptIn:ver<0.0.2>:auth<zef:jonathanstowe>
===> Staging [OK] for JSON::OptIn:ver<0.0.2>:auth<zef:jonathanstowe>
===> Staging JSON::Name:ver<0.0.7>:auth<zef:jonathanstowe>:api<1.0>
===> Staging [OK] for JSON::Name:ver<0.0.7>:auth<zef:jonathanstowe>:api<1.0>
===> Staging JSON::Marshal:ver<0.0.25>:auth<zef:jonathanstowe>:api<1.0>
===> Staging [OK] for JSON::Marshal:ver<0.0.25>:auth<zef:jonathanstowe>:api<1.0>
===> Staging JSON::Unmarshal:ver<0.15>:auth<zef:raku-community-modules>
===> Staging [OK] for JSON::Unmarshal:ver<0.15>:auth<zef:raku-community-modules>
===> Staging JSON::Class:ver<0.0.21>:auth<zef:jonathanstowe>:api<1.0>
===> Staging [OK] for JSON::Class:ver<0.0.21>:auth<zef:jonathanstowe>:api<1.0>
===> Staging META6:ver<0.0.30>:auth<zef:jonathanstowe>:api<1.0>
===> Staging [OK] for META6:ver<0.0.30>:auth<zef:jonathanstowe>:api<1.0>
===> Staging License::SPDX:ver<3.22.0>:auth<zef:jonathanstowe>:api<1.0>
===> Staging [OK] for License::SPDX:ver<3.22.0>:auth<zef:jonathanstowe>:api<1.0>
===> Staging Test::META:ver<0.0.20>:auth<zef:jonathanstowe>:api<1.0>
===> Staging [OK] for Test::META:ver<0.0.20>:auth<zef:jonathanstowe>:api<1.0>
===> Installing: JSON::OptIn:ver<0.0.2>:auth<zef:jonathanstowe>
===> Installing: JSON::Name:ver<0.0.7>:auth<zef:jonathanstowe>:api<1.0>
===> Installing: JSON::Marshal:ver<0.0.25>:auth<zef:jonathanstowe>:api<1.0>
===> Installing: JSON::Unmarshal:ver<0.15>:auth<zef:raku-community-modules>
===> Installing: JSON::Class:ver<0.0.21>:auth<zef:jonathanstowe>:api<1.0>
===> Installing: META6:ver<0.0.30>:auth<zef:jonathanstowe>:api<1.0>
===> Installing: License::SPDX:ver<3.22.0>:auth<zef:jonathanstowe>:api<1.0>
===> Installing: Test::META:ver<0.0.20>:auth<zef:jonathanstowe>:api<1.0>

Your Environment

patrickb@gen [0]$ raku -v                                    
Welcome to Rakudo™ v2023.10.
Implementing the Raku® Programming Language v6.d.  
Built on MoarVM version 2023.10.                       
patrickb@gen [0]$ zef list --installed
===> Found via inst#/home/patrickb/.rakubrew/versions/moar-2023.10/share/perl6/site
App::Prove6:ver<0.0.17>:auth<cpan:LEONT>
Base64:ver<0.1.0>:auth<github:ugexe>
CBOR::Simple:ver<0.1.3>:auth<zef:japhb>        
Cache::LRU:ver<0.1.0>                 
Cro::Core:ver<0.8.7>                  
Cro::Core:ver<0.8.9>:auth<zef:cro>                                   
Cro::HTTP:ver<0.8.7>                           
Cro::HTTP:ver<0.8.9>:auth<zef:cro>
Cro::TLS:ver<0.8.7>                
Cro::TLS:ver<0.8.9>:auth<zef:cro>             
Cro::WebApp:ver<0.8.7>            
Cro::WebApp:ver<0.8.9>:auth<zef:cro>     
Crypt::Random:ver<0.4.1>:auth<github:skinkade>
DB::Pg:ver<1.1>:auth<github:CurtTilmes>:api<1>
DBIish:ver<0.6.6>:auth<zef:raku-community-modules>:api<1>
DateTime::Parse:ver<0.9.3>:auth<github:sergot>
Digest::HMAC:ver<1.0.6>:auth<zef:jjmerelo>
Encode:ver<0.0.4>:auth<github:sergot>
File::Directory::Tree:auth<labster>
File::Find:ver<0.2.0>:auth<zef:raku-community-modules>
File::Temp:ver<0.0.10>:auth<zef:rbt>
File::Which:ver<1.0.4>
Getopt::Long:ver<0.4.2>
HTTP::HPACK:ver<1.0.0>:auth<zef:jnthn>
HTTP::HPACK:ver<1.0.1>:auth<zef:jnthn>
HTTP::Status:ver<0.0.4>:auth<zef:lizmat>
HTTP::Tiny:ver<0.2.5>:auth<zef:jjatria>
HTTP::UserAgent:ver<1.1.52>:auth<github:sergot>
IO::Path::ChildSecure:ver<1.2>:auth<zef:raku-community-modules>
IO::Socket::Async::SSL:ver<0.7.14>:auth<zef:jnthn>
IO::Socket::SSL:ver<0.0.3>:auth<github:sergot>
JSON::Class:ver<0.0.21>:auth<zef:jonathanstowe>:api<1.0>
JSON::Fast:ver<0.17>:auth<cpan:TIMOTIMO>
JSON::JWT:ver<1.1.1>:auth<zef:raku-community-modules>
JSON::Marshal:ver<0.0.25>:auth<zef:jonathanstowe>:api<1.0>
JSON::Name:ver<0.0.7>:auth<zef:jonathanstowe>:api<1.0>
JSON::OptIn:ver<0.0.2>:auth<zef:jonathanstowe>
JSON::Pointer:ver<1.0>
JSON::Unmarshal:ver<0.15>:auth<zef:raku-community-modules>
LibUUID:ver<0.5>:auth<github:CurtTilmes>
LibXML:ver<0.10.2>:auth<zef:dwarring>:api<0.10.0>
LibraryMake:ver<1.0.3>:auth<zef:jjmerelo>
License::SPDX:ver<3.22.0>:auth<zef:jonathanstowe>:api<1.0>
Log::Async:ver<0.0.8>
Log::Timeline:ver<0.5.1>:auth<zef:jnthn>
META6:ver<0.0.30>:auth<zef:jonathanstowe>:api<1.0>
MIME::Base64:ver<1.2.3>:auth<zef:raku-community-modules>
Method::Also:ver<0.0.8>:auth<zef:lizmat>
NativeHelpers::Blob:ver<0.1.12>:auth<github:salortiz>
NativeLibs:ver<0.0.9>:auth<github:salortiz>
OO::Monitors:ver<1.1.1>
OpenAPI::Model:ver<1.0.4>
OpenSSL:ver<0.2.0>:auth<github:sergot>
Path::Finder:ver<0.4.6>:auth<zef:leont>
PathTools:ver<0.1.1>:auth<github:ugexe>
PathTools:ver<0.2.0>:auth<github:ugexe>
Pod::Load:ver<0.7.2>:auth<zef:jjmerelo>
Pod::To::HTML:ver<0.8.1>:auth<github:Raku>
Pod::To::Markdown:ver<0.2.1>:auth<github:softmoth>
Pod::Usage:ver<0.0.1>:auth<zef:leont>
Red:ver<0.1.66>:auth<zef:FCO>:api<2>
Shell::Command:ver<1.1>:auth<zef:raku-community-modules>
Subset::Helper:ver<1.001002>:auth<zef:raku-community-modules>
TAP:ver<0.3.14>
Template::Mustache:ver<1.2.3>:auth<github:softmoth>
Test::META:ver<0.0.20>:auth<zef:jonathanstowe>:api<1.0>
Test::Mock:ver<1.6>:auth<zef:jnthn>
Test::SourceFiles:ver<0.0.1>
TinyFloats:ver<0.0.4>:auth<zef:japhb>
URI:ver<0.3.5>
URI:ver<0.3.7>:auth<zef:raku-community-modules>
UUID:ver<1.0.0>:auth<github:retupmoca>
W3C::DOM:ver<0.0.3>:auth<zef:dwarring>
WebService::GitHub:ver<0.2.2>:auth<zef:raku-community-modules>:api<1>
XML:ver<0.3.3>:auth<zef:raku-community-modules>
YAMLish:ver<0.0.6>
fez:ver<55>:auth<zef:tony-o>:api<0>
if:ver<0.1.2>:auth<zef:raku-community-modules>
sigpipe:ver<0.0.3>:auth<zef:leont>
zef:ver<0.20.0>:auth<github:ugexe>:api<0>
zef:ver<0.21.0>:auth<github:ugexe>:api<0>
===> Found via inst#/home/patrickb/.rakubrew/versions/moar-2023.10/share/perl6/core
rakudo:ver<2023.10>:auth<Yet Another Society>
ugexe commented 8 months ago

I'm not able to reproduce. I would be interested to know about what $dist and $dist.meta are here if you are able to reproduce it locally using raku --ll-exception -I. bin/zef install .... Looking at the code I'm not sure how the message you're seeing should even be possible though.

ugexe commented 8 months ago

https://irclogs.raku.org/raku-dev/2023-11-10.html#13:28

ugexe commented 8 months ago

I can reproduce it if I edit one of the ecosystem json files to remove the name field from a piece of META6.json data.

patrickbkr commented 8 months ago

Wow, this issue progressed immensely while I was offline. Thanks for your work! I have now done the following: I guessed, that I still have the ecosystem files containing the error in ~/.zef. So I unplugged my network and am able to reproducible the issue. Under the same conditions using a zef with the above fix the warnings do disappear.

So, that commit of yours is spot on.