Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic precompilation #4931

Closed
p6rt opened this issue Dec 26, 2015 · 6 comments
Closed

Automatic precompilation #4931

p6rt opened this issue Dec 26, 2015 · 6 comments
Labels
precomp RFC Request For Comments

Comments

@p6rt
Copy link

p6rt commented Dec 26, 2015

Migrated from rt.perl.org#127031 (status was 'rejected')

Searchable as RT127031$

@p6rt
Copy link
Author

p6rt commented Dec 26, 2015

From chohag@jtan.com

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.

@p6rt
Copy link
Author

p6rt commented Jul 8, 2016

@coke - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Aug 30, 2016

From @niner

I would like to close this ticket. It contains a multitude of issues, some of which have already been fixed. For example the failures to open/create files and directories. We now deal much better with permission issues.

We create far fewer precomp files anyway as we can now use the precomp files created during module installation even when the user adds repositories to the chain.

The process-wide means of, at run time and at rakudo's build-time to not use any precompilation at all has been talked about a lot, especially when we still had lots of issues like the mentioned permission mess. Yet despite it being a one-line change in a place that has a comment that tells the reader what to do to implement such a switch, no one has been bothered enough to actually implement it. So I assume that precompilation is nowadays working well enough for people to no longer need such a switch.

@p6rt
Copy link
Author

p6rt commented Sep 20, 2016

From @niner

Rejecting for the reasons listed in https://rt-archive.perl.org/perl6/Ticket/Display.html?id=127031#txn-1420669
Nobody disagreed in the 3 weeks since I posted them.

@p6rt
Copy link
Author

p6rt commented Sep 20, 2016

@niner - Status changed from 'open' to 'rejected'

@p6rt p6rt closed this as completed Sep 20, 2016
@p6rt
Copy link
Author

p6rt commented Nov 28, 2016

From kb@open.ch

I have the very same problem with a readonly home directory​:

$ perl6
I ran into a problem while trying to set up Linenoise​: Failed to create directory '/home/kb/.perl6/precomp/5C95A0E5CB6B0D6AE0C3CF2F01FB91EB2A0053BA.1479453843.80191' with mode '0o777'​: Failed to mkdir​: 2
Continuing without tab completions or line editor
You may want to consider using rlwrap for simple line editor functionality

To exit type 'exit' or '^D'

I did not find much information about precompilation. Is it possible to do it system wide so this can be avoided?

@p6rt p6rt added precomp RFC Request For Comments labels Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
precomp RFC Request For Comments
Projects
None yet
Development

No branches or pull requests

1 participant