Todd

What you are asking for is not a bug, but a part of the current stage of design. It will probably get quicker.

However, the biggest part of the timing is the compilation - as you have noticed.

When you precompile a module, it stores the byte code. Then it runs quite well.

Now it IS possible to set up a precomp store of your own, but isn't worth the hassle.

zef does all of that for you. So the best thing is to find a way to get zef to install your modules.

Naturally if you change anything in them, you will need to bump the version number in the META6.json file and then reinstall.

Failure problems with zef, so long as your module compiles, involves good housekeeping. zef will look for tests and run them. I cannot program anything now without tests, they are SOOOOOOO useful.

Then the structure of the module directory has to be right. But once you have got things working once, it becomes much easier.

I have a directory called .perl and inside it is just a META.json which lists in the depends field all  my favourite modules. Then I use zef to install deps.

On 01/08/2020 01:08, ToddAndMargo via perl6-users wrote:
On 2020-07-31 16:40, Tom Browder wrote:
On Fri, Jul 31, 2020 at 5:38 PM ToddAndMargo via perl6-users
<perl6-us...@perl.org> wrote:
Todd, a couple of questions:
1. In your modules that change all the time, do have "use lib ...;"
statements in any of them?

No.  If I do, they crash

# use lib '/home/linuxutil/p6lib';   # may not be precompiled; calling
program must take care of this


Just for "-O fun", set up your modules as if they were to be public,
i.e., add a META6.jso for the module collection.
The collection being "/path/to/MyModules" and in MyModules create:

      META6.json # create it and add all your modules in it just like
you were going to publish the whole mess.
      ./lib/
         # my modules as moved or duped from "/home/linuxutil/p6lib"
      t/
         00-meta-test.t # some basic test to check your META6.json file

Then, in dir "/path/to/MyModules" try:

     $ zef install .  # <== that's a DOT/PERIOD, i.e., the current directory

If that works, then you should be able to "use" them from your program.

-Tom




Hi Tom,

I am really after is what I originally asked.  Is this
issue any closer to being solved?  And is there
a bug I can get myself Cc'ed on to.

When I get a chance at it again, I will
will look into the workaround.  Thank you.

What compiles in 1/2 seconds on Perl 5 should not
take 18 seconds on Perl 6.

It is the "parse" stage this is the issue.

$ time raku --stagestats -c GetUpdates.pl6
Stage start      :   0.000
Stage parse      :  18.405
Stage syntaxcheck: Syntax OK

real    0m18.449s
user    0m20.673s
sys    0m0.223s

Reply via email to