Skip to content

Declare extra dependencies of Lean files #2762

@gebner

Description

@gebner

Lean files can use elaborators that read files at compile time. For example include_str in doc-gen4 reads the specified file during compilation and inserts the file's contents as a string literal. The Base.lean file contains this:

def styleCss : String := include_str "../../static/style.css"

If static/style.css changes, then Base.lean needs to be recompiled.

leanprover/lake#58 suggested adding an environment extension which stores the referenced files. Then include_str would add the filename to the environment extension. Lake could then read the referenced files from the .olean file, which contains the serialized environment extension.

Metadata

Metadata

Assignees

No one assigned

    Labels

    LakeLake related issueenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions