Skip to content

Instantly share code, notes, and snippets.

@ufobat
Created October 3, 2018 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ufobat/fb62ec03013f499b5c1f7b099359078c to your computer and use it in GitHub Desktop.
Save ufobat/fb62ec03013f499b5c1f7b099359078c to your computer and use it in GitHub Desktop.
# my stacktrace
> perl6 -I../cro/lib ../cro/bin/cro run
Cro::Tools::Runner.new(services => Cro::Tools::Services.new(base-path => IO::Path.new("/home/martin/.workspace/voteimproved/restapp", :SPEC(IO::Spec::Unix), :CWD("/home/martin/.workspace/voteimproved/restapp"))), service-id-filter => *, trace => Bool::False, trace-filters => Array[Str].new())
An operation first awaited:
in sub run-services at /home/martin/.workspace/voteimproved/restapp/../cro/lib/Cro/Tools/CLI.pm6 (Cro::Tools::CLI) line 228
in sub MAIN at /home/martin/.workspace/voteimproved/restapp/../cro/lib/Cro/Tools/CLI.pm6 (Cro::Tools::CLI) line 198
in block <unit> at ../cro/bin/cro line 1
Died with the exception:
Cannot look up attributes in a Cro::Tools::CroFile type object
in method id at /home/martin/.workspace/voteimproved/restapp/../cro/lib/Cro/Tools/CroFile.pm6 (Cro::Tools::CroFile) line 29
in block at /home/martin/.workspace/voteimproved/restapp/../cro/lib/Cro/Tools/Runner.pm6 (Cro::Tools::Runner) line 140
in sub maybe-add-service at /home/martin/.workspace/voteimproved/restapp/../cro/lib/Cro/Tools/Services.pm6 (Cro::Tools::Services) line 105
in block at /home/martin/.workspace/voteimproved/restapp/../cro/lib/Cro/Tools/Services.pm6 (Cro::Tools::Services) line 109
in block at /home/martin/.workspace/voteimproved/restapp/../cro/lib/Cro/Tools/Services.pm6 (Cro::Tools::Services) line 80
in block at /home/martin/.workspace/voteimproved/restapp/../cro/lib/Cro/Tools/Services.pm6 (Cro::Tools::Services) line 84
## file/line /lib/Cro/Tools/Services.pm6 (Cro::Tools::Services) line 105
creates a
my $service = Service.new(:$path, :$file-changed);
without a $.cro-file, so this is still the class type
## file/line /cro/lib/Cro/Tools/Runner.pm6 (Cro::Tools::Runner) line 140
this part of the code uses this Service without $.cro-file and explodes at the call to .id()
whenever $!services.services -> $service {
$first-service.keep unless $first-service.status ~~ Kept;
my $cro-file = $service.cro-file;
my $service-id = $cro-file.id; ## <--- line 140
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment