lizmat / App-Rak

21st century grep / find / ack / ag / rg on steroids
Artistic License 2.0
152 stars 7 forks source link

Last version throws "Cannot resolve caller postcircumfix:" #3

Closed melezhik closed 2 years ago

melezhik commented 2 years ago
[melezhik App-Rak]$ zef install App::Rak
===> Searching for: App::Rak
===> Testing: App::Rak:ver<0.0.12>:auth<zef:lizmat>
===> Testing [OK] for App::Rak:ver<0.0.12>:auth<zef:lizmat>
===> Installing: App::Rak:ver<0.0.12>:auth<zef:lizmat>

1 bin/ script [rak] installed to:
/Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/bin
[melezhik App-Rak]$ rak foo --human
Cannot resolve caller postcircumfix:<{ }>(VMNull, Str:D); none of these signatures matches:
    (\SELF, Mu \key)
    (\SELF, Mu \key, Mu \ASSIGN)
    (\SELF, Mu \key, Mu :$BIND! is raw)
    (\SELF, Mu \key, Bool(Any) :$delete!)
    (\SELF, Mu \key, Bool(Any) :$delete!, *%other)
    (\SELF, Mu \key, Bool(Any) :$exists!)
    (\SELF, Mu \key, Bool(Any) :$exists!, *%other)
    (\SELF, Mu \key, Bool(Any) :$kv!, *%other)
    (\SELF, Mu \key, Bool(Any) :$p!, *%other)
    (\SELF, Mu \key, Bool(Any) :$k!, *%other)
    (\SELF, Mu \key, Bool(Any) :$v!, *%other)
    (\SELF, Iterable \key)
    (\SELF, Iterable \keys, Mu \values)
    (\SELF, Iterable \key, :$BIND! is raw)
    (\SELF, Iterable \key, Bool(Any) :$delete!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$exists!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$kv!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$p!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$k!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$v!, *%other)
    (\SELF, Whatever)
    (\SELF, Whatever, Mu \ASSIGN)
    (\SELF, Whatever, :$BIND!)
    (\SELF, Whatever, Bool(Any) :$delete!, *%other)
    (\SELF, Whatever, Bool(Any) :$exists!, *%other)
    (\SELF, Whatever, Bool(Any) :$kv!, *%other)
    (\SELF, Whatever, Bool(Any) :$p!, *%other)
    (\SELF, Whatever, Bool(Any) :$k!, *%other)
    (\SELF, Whatever, Bool(Any) :$p!, *%other)
    (\SELF, Whatever, Bool(Any) :$v!, *%other)
    (\SELF, :$BIND!)
    (\SELF, Bool(Any) :$delete!, *%other)
    (\SELF, Bool(Any) :$exists!, *%other)
    (\SELF, Bool(Any) :$kv!, *%other)
    (\SELF, Bool(Any) :$p!, *%other)
    (\SELF, Bool(Any) :$k!, *%other)
    (\SELF, Bool(Any) :$p!, *%other)
    (\SELF, Bool(Any) :$v!, *%other)
    (Mu \SELF, *%other)
  in block  at /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/sources/CF0CA45D52CD1D6E64F533B6BF64A8E32E8C331B (App::Rak) line 137
  in sub MAIN at /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/sources/CF0CA45D52CD1D6E64F533B6BF64A8E32E8C331B (App::Rak) line 134
  in block <unit> at /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/resources/A7114D6D7B56D6C6E833071EBD41B3EA96754369 line 3
  in sub MAIN at /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/bin/rak line 3
  in block <unit> at /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/bin/rak line 1
melezhik commented 2 years ago
[melezhik App-Rak]$ raku -v
Welcome to Rakudo™ v2022.06.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2022.06.
melezhik commented 2 years ago

Apparently this one needs some unit or Tommy tests )))

lizmat commented 2 years ago

Can't reproduce locally :-(

melezhik commented 2 years ago

hmm, interesting , looks like a zef/raku related issue on Mac OS ? At least, it reproducible after upgrade from older to newer version ...

[melezhik App-Rak]$ zef uninstall App::Rak
===> Uninstalled from /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site
App::Rak:ver<0.0.10>:auth<zef:lizmat>
App::Rak:ver<0.0.1>:auth<zef:lizmat>
App::Rak:ver<0.0.12>:auth<zef:lizmat>
[melezhik App-Rak]$ zef install "App::Rak:ver<0.0.9>"
===> Searching for: App::Rak:ver<0.0.9>
===> Testing: App::Rak:ver<0.0.9>:auth<zef:lizmat>
===> Testing [OK] for App::Rak:ver<0.0.9>:auth<zef:lizmat>
===> Installing: App::Rak:ver<0.0.9>:auth<zef:lizmat>

1 bin/ script [rak] installed to:
/Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/bin
[melezhik App-Rak]$ rak foo --human
foo.txt
 1: foo100

lib/App/Rak.rakumod
 347: $ rak foo      # look for "foo" in current directory recursively
 349: $ rak foo bar  # look for "foo" in directory "bar" recursively
 351: $ rak '/ << foo >> /'    # look for "foo" as word in current directory
 353: $ raku foo --files-only  # look for "foo", only produce filenames
 355: $ raku foo --before=2 --after=2  # also produce 2 lines before and after
 515: $ rak foo --im
 520: $ rak --save=foo
 521: Removed configuration for 'foo'
 567: $ rak foo --im

README.md
  12: $ rak foo      # look for "foo" in current directory recursively
  14: $ rak foo bar  # look for "foo" in directory "bar" recursively
  16: $ rak '/ << foo >> /'    # look for "foo" as word in current directory
  18: $ raku foo --files-only  # look for "foo", only produce filenames
  20: $ raku foo --before=2 --after=2  # also produce 2 lines before and after
 152: $ rak foo --im
 157: $ rak --save=foo
 158: Removed configuration for 'foo'
 195: $ rak foo --im

[melezhik App-Rak]$ zef upgrade App::Rak
===> Searching for: App::Rak
The following distributions will be upgraded: App::Rak:ver<0.0.12>:auth<zef:lizmat>
===> Updating: App::Rak:ver<0.0.12>:auth<zef:lizmat>
===> Testing: App::Rak:ver<0.0.12>:auth<zef:lizmat>
===> Testing [OK] for App::Rak:ver<0.0.12>:auth<zef:lizmat>
===> Installing: App::Rak:ver<0.0.12>:auth<zef:lizmat>

1 bin/ script [rak] installed to:
/Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/bin

[melezhik App-Rak]$ rak foo --human
Cannot resolve caller postcircumfix:<{ }>(VMNull, Str:D); none of these signatures matches:
    (\SELF, Mu \key)
    (\SELF, Mu \key, Mu \ASSIGN)
    (\SELF, Mu \key, Mu :$BIND! is raw)
    (\SELF, Mu \key, Bool(Any) :$delete!)
    (\SELF, Mu \key, Bool(Any) :$delete!, *%other)
    (\SELF, Mu \key, Bool(Any) :$exists!)
    (\SELF, Mu \key, Bool(Any) :$exists!, *%other)
    (\SELF, Mu \key, Bool(Any) :$kv!, *%other)
    (\SELF, Mu \key, Bool(Any) :$p!, *%other)
    (\SELF, Mu \key, Bool(Any) :$k!, *%other)
    (\SELF, Mu \key, Bool(Any) :$v!, *%other)
    (\SELF, Iterable \key)
    (\SELF, Iterable \keys, Mu \values)
    (\SELF, Iterable \key, :$BIND! is raw)
    (\SELF, Iterable \key, Bool(Any) :$delete!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$exists!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$kv!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$p!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$k!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$v!, *%other)
    (\SELF, Whatever)
    (\SELF, Whatever, Mu \ASSIGN)
    (\SELF, Whatever, :$BIND!)
    (\SELF, Whatever, Bool(Any) :$delete!, *%other)
    (\SELF, Whatever, Bool(Any) :$exists!, *%other)
    (\SELF, Whatever, Bool(Any) :$kv!, *%other)
    (\SELF, Whatever, Bool(Any) :$p!, *%other)
    (\SELF, Whatever, Bool(Any) :$k!, *%other)
    (\SELF, Whatever, Bool(Any) :$p!, *%other)
    (\SELF, Whatever, Bool(Any) :$v!, *%other)
    (\SELF, :$BIND!)
    (\SELF, Bool(Any) :$delete!, *%other)
    (\SELF, Bool(Any) :$exists!, *%other)
    (\SELF, Bool(Any) :$kv!, *%other)
    (\SELF, Bool(Any) :$p!, *%other)
    (\SELF, Bool(Any) :$k!, *%other)
    (\SELF, Bool(Any) :$p!, *%other)
    (\SELF, Bool(Any) :$v!, *%other)
    (Mu \SELF, *%other)
  in block  at /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/sources/CF0CA45D52CD1D6E64F533B6BF64A8E32E8C331B (App::Rak) line 137
  in sub MAIN at /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/sources/CF0CA45D52CD1D6E64F533B6BF64A8E32E8C331B (App::Rak) line 134
  in block <unit> at /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/resources/A7114D6D7B56D6C6E833071EBD41B3EA96754369 line 3
  in sub MAIN at /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/bin/rak line 3
  in block <unit> at /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/bin/rak line 1
melezhik commented 2 years ago

Please nevermind my last comment, the issue is just reproducible for the latest version, maybe we hit some bug for this version of Rakudo and this version of Mac OS, that App::Raku revealed ? It's easy to track it down by looking at the changes made at version 0.0.12 :

[melezhik App-Rak]$ raku -v
Welcome to Rakudo™ v2022.06.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2022.06.
[melezhik App-Rak]$ zef uninstall App::Rak
===> Uninstalled from /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site
App::Rak:ver<0.0.9>:auth<zef:lizmat>
App::Rak:ver<0.0.12>:auth<zef:lizmat>
[melezhik App-Rak]$ zef upgrade App::Rak
Can't upgrade identities that aren't installed: App::Rak
[melezhik App-Rak]$ zef install App::Rak
===> Searching for: App::Rak
===> Testing: App::Rak:ver<0.0.12>:auth<zef:lizmat>
===> Testing [OK] for App::Rak:ver<0.0.12>:auth<zef:lizmat>
===> Installing: App::Rak:ver<0.0.12>:auth<zef:lizmat>

1 bin/ script [rak] installed to:
/Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/bin
[melezhik App-Rak]$ rak fooeee --human
Cannot resolve caller postcircumfix:<{ }>(VMNull, Str:D); none of these signatures matches:
    (\SELF, Mu \key)
    (\SELF, Mu \key, Mu \ASSIGN)
    (\SELF, Mu \key, Mu :$BIND! is raw)
    (\SELF, Mu \key, Bool(Any) :$delete!)
    (\SELF, Mu \key, Bool(Any) :$delete!, *%other)
    (\SELF, Mu \key, Bool(Any) :$exists!)
    (\SELF, Mu \key, Bool(Any) :$exists!, *%other)
    (\SELF, Mu \key, Bool(Any) :$kv!, *%other)
    (\SELF, Mu \key, Bool(Any) :$p!, *%other)
    (\SELF, Mu \key, Bool(Any) :$k!, *%other)
    (\SELF, Mu \key, Bool(Any) :$v!, *%other)
    (\SELF, Iterable \key)
    (\SELF, Iterable \keys, Mu \values)
    (\SELF, Iterable \key, :$BIND! is raw)
    (\SELF, Iterable \key, Bool(Any) :$delete!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$exists!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$kv!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$p!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$k!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$v!, *%other)
    (\SELF, Whatever)
    (\SELF, Whatever, Mu \ASSIGN)
    (\SELF, Whatever, :$BIND!)
    (\SELF, Whatever, Bool(Any) :$delete!, *%other)
    (\SELF, Whatever, Bool(Any) :$exists!, *%other)
    (\SELF, Whatever, Bool(Any) :$kv!, *%other)
    (\SELF, Whatever, Bool(Any) :$p!, *%other)
    (\SELF, Whatever, Bool(Any) :$k!, *%other)
    (\SELF, Whatever, Bool(Any) :$p!, *%other)
    (\SELF, Whatever, Bool(Any) :$v!, *%other)
    (\SELF, :$BIND!)
    (\SELF, Bool(Any) :$delete!, *%other)
    (\SELF, Bool(Any) :$exists!, *%other)
    (\SELF, Bool(Any) :$kv!, *%other)
    (\SELF, Bool(Any) :$p!, *%other)
    (\SELF, Bool(Any) :$k!, *%other)
    (\SELF, Bool(Any) :$p!, *%other)
    (\SELF, Bool(Any) :$v!, *%other)
    (Mu \SELF, *%other)
  in block  at /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/sources/CF0CA45D52CD1D6E64F533B6BF64A8E32E8C331B (App::Rak) line 137
  in sub MAIN at /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/sources/CF0CA45D52CD1D6E64F533B6BF64A8E32E8C331B (App::Rak) line 134
  in block <unit> at /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/resources/A7114D6D7B56D6C6E833071EBD41B3EA96754369 line 3
  in sub MAIN at /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/bin/rak line 3
  in block <unit> at /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/bin/rak line 1
lizmat commented 2 years ago

Looks like this occurred when there was no ~/.rak-config.json file available.