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

Clarify docs re: precompile and runtime dispatch #349

Closed
marius311 opened this issue Apr 1, 2023 · 2 comments
Closed

Clarify docs re: precompile and runtime dispatch #349

marius311 opened this issue Apr 1, 2023 · 2 comments

Comments

@marius311
Copy link

The docs state that by running code in precompilation

It precompiles even the runtime-dispatch dependencies of a command if the dependent methods are in the same package

Is this up-to-date? I was under the impression as of 1.8 you can cache stuff for methods in other packages, but perhaps that's only for fully inferred stuff with no runtime dispatch? (as that sentence seems to suggest to me)

@timholy
Copy link
Owner

timholy commented Apr 1, 2023

Even in 1.8, there's an "ownership" check for all runtime-dispatched items. That's to prevent garbage (setup code, metaprogramming, etc) which is not needed for the package from ending up bloating the cache files. This is basically why SnoopPrecompile exists, to give people an opportunity to tag things as "cache this regardless of ownership."

@marius311
Copy link
Author

Ah, I see now, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants