# New Ticket Created by  . 
# Please include the string:  [perl #127031]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=127031 >


Just no.

Precompilation is a fine idea. Automatic precompilation is an OK idea.
Automatic precompilation the user can't turn off is a horrible, dirty,
broken idea.

The no precompilation pragma is fine, and it should exist, but there needs
to be a process-wide means of, at run time and at rakudo's build-time:

 * Not use any precompilation at all.

 * Not build any new precompilation files unless told to explicitly, but
to use what's already there.

 * Customise where exactly precompilation files are put.

And while you're at it, failing to create precompilation files - eg. on a
read-only filesystem - should never under any circumstances be a failure
(except when instructed by a user to create precompilation files*). This
should never happen:


  ===SORRY!===
  Failed to create directory '/home/mking/src/sad/.precomp' with mode
'0o777': Failed to mkdir: 13


Or this, when I touched .precomp as a file rather than a directory:


  ===SORRY!===
  Earlier failure:
   Failed to open file /home/mking/src/sad/.precomp/.lock: not a directory
    in any  at
/home/mking/Applications/Rakudo/share/perl6/runtime/CORE.setting.moarvm
line 1
    in any load_module at src/Perl6/World.nqp line 975
    in any do_pragma_or_load_module at src/Perl6/World.nqp line 907
    in any loading_and_symbol_setup at src/Perl6/World.nqp line 391
    in any comp_unit at src/Perl6/Grammar.nqp line 1138
    in any TOP at src/Perl6/Grammar.nqp line 441

  Final error:
   Type check failed in assignment to $!lock; expected IO::Handle but got
Failure


Both could prehaps elicit a warning though, unless told not to.

In short:

 * precompilation is a cache. If a cache fails the application should
_ALWAYS_ continue on, albeit uncached, and there should be a means of
silencing cache errors.

 * Automatic anything should always be overridable by the user, ideally
temporarily _and_ permanently.

Matthew

[*] There is an exception to every rule, except this one.


Reply via email to