croservices / cro

Development tools for building services and distributed systems in Raku using the Cro libraries.
https://cro.services/
Artistic License 2.0
88 stars 34 forks source link

"cro run" can't run stub on Windows #38

Open lefth opened 6 years ago

lefth commented 6 years ago

To create a stub, I ran (with the default options):

cro stub http 0 stub

To run it:

cd stub
cro run

The error I get is:

An operation first awaited: in sub run-services at D:\rakudo\share\perl6\site\sources\75AA87B0B3D14DE5E701638495D50F0610D7A87C (Cro::Tools::CLI) line 251 in sub MAIN at D:\rakudo\share\perl6\site\sources\75AA87B0B3D14DE5E701638495D50F0610D7A87C (Cro::Tools::CLI) line 222 in block at D:\rakudo\share\perl6\site\resources\50C277F38919A198F096E266302A29B056579D44 line 1 in sub MAIN at D:\rakudo\share\perl6\site\bin\cro line 2 in block at D:\rakudo\share\perl6\site\bin\cro line 2

Died with the exception: no such file or directory in sub run-services at D:\rakudo\share\perl6\site\sources\75AA87B0B3D14DE5E701638495D50F0610D7A87C (Cro::Tools::CLI) line 251 in sub MAIN at D:\rakudo\share\perl6\site\sources\75AA87B0B3D14DE5E701638495D50F0610D7A87C (Cro::Tools::CLI) line 222 in block at D:\rakudo\share\perl6\site\resources\50C277F38919A198F096E266302A29B056579D44 line 1 in sub MAIN at D:\rakudo\share\perl6\site\bin\cro line 2 in block at D:\rakudo\share\perl6\site\bin\cro line 2

My perl is Rakudo version 2017.09-355-g27131ed8d built on MoarVM version 2017.09.1-575-gd4e230a6. Doing the same process works fine on Linux, though the Linux server is running an older version of Rakudo.

zb226 commented 5 years ago

I ran into the same issue yesterday (StackOverflow question+answer). The solution was patching Cro::Tools::Runner where it calls out to perl6 - here, perl6.bat is needed for Windows.

ugexe commented 5 years ago

This should be fixed with the next release -- https://github.com/croservices/cro/pull/93 fixes this and is merged.