Skip to content

Precompile packages that call Finch #639

@willow-ahrens

Description

@willow-ahrens

precompiling a package which calls finch fails with

ERROR: LoadError: Evaluation into the closed module `Finch` breaks incremental compilation because the side effects will not be permanent. This is likely due to some other module mutating `Finch` with `eval` during precompilation - don't do this.

This is because Finch uses eval.

There's two ways I could see to fix this:

  1. We could just say Finch cannot be called during precompilation, but implement caching to disc which would greatly speed it up.
  2. Packages which need to precompile finch code could call finch within a @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 block
  3. use https://github.com/SciML/RuntimeGeneratedFunctions.jl instead of eval

Either way, this seems highly related to #492

@kylebd99

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions