-
Notifications
You must be signed in to change notification settings - Fork 18
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
Precompile packages that call Finch #639
Comments
What prevents you from |
It's coming from a non-macro context. Unless we always want users to wrap finch code in an |
The high-level interface for things like Finch broadcast means that we no longer require the macro. |
I suppose we would only need an |
Or you could use an anonymous module? |
Imm assuming I can use the anonymous module to compile the function, then I would need to cache it to disk to preserve it after precompilation? |
Eh, you would need to root the anonymous module "somewhere" this could be just a list of modules in Finch, but then those get lost after precompilation of a user package. So the user would need to take "ownership" of that module somehow. Which is almost as if they just give you a module to evaluate into... |
Also I just noticed things like |
I agree, the right course of action here is to evaluate into the appropriate module. However, if i ask the user for a module during precompile, I also need to ask for modules in packages that depend on packages that use finch. Is there a way to automatically determine the currently precompiling module automatically? |
If you are willing to depend on runtime internals |
another thought: If we cache to disk, we could precompile finch kernels for all other packages that we have cached on disk. If users want FInch to precompile their kernels, they could cache them to disk and then re-do precompile of Finch with I'm curious about what other projects that require eval do here. Is it common practice to require all downstream kernels to use some sort of |
precompiling a package which calls finch fails with
This is because Finch uses eval.
There's two ways I could see to fix this:
@finchcache
block, which would allow Finch to eval stuff in that package instead. unfortunately, every package which ever calls finch during precompilation (even as a dependency of a dependency) would need to use a@finchcache
blockEither way, this seems highly related to #492
@kylebd99
The text was updated successfully, but these errors were encountered: