Skip to content

Include the library root modules in each lean_lib - #5

Draft
JasonGross wants to merge 1 commit into
kim-em:mainfrom
theorem-labs:precompile-modules
Draft

Include the library root modules in each lean_lib#5
JasonGross wants to merge 1 commit into
kim-em:mainfrom
theorem-labs:precompile-modules

Conversation

@JasonGross

Copy link
Copy Markdown

Each lean_lib selects #[.submodules X], which matches the submodules of Xbut notXitself, soZipForStd.leanandZipCommon.leanare not members of their own libraries;.andSubmodulesincludes the root module too. This matters because a shared library built from such alean_libhas noinitialize_symbol, so any dependent package built withprecompileModules := truefails to load it witherror loading plugin, initializer not found 'initialize_lean_x2dzip_x2dcommon_ZipForStd'`. Patch authored by Claude Fable 5 (Anthropic's Claude Code).

`globs := #[.submodules `X]` selects the submodules of `X` but not `X`
itself, so `ZipForStd.lean` and `ZipCommon.lean` were not members of their
own libraries. A shared library built from such a `lean_lib` therefore has
no `initialize_<lib>` symbol, and a dependent package built with
`precompileModules := true` fails to load it:

    error loading plugin, initializer not found
    'initialize_lean_x2dzip_x2dcommon_ZipForStd'

`.andSubmodules` selects the root module too.

Patch authored by Claude Fable 5 (Anthropic's Claude Code).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TK6r4jXLa2tKRNP9orsXN6
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

Successfully merging this pull request may close these issues.

1 participant