Skip to content

Add unconditional top-level code blocks to generated JLLs - #1444

Merged
maleadt merged 2 commits into
masterfrom
tb/toplevel
Aug 15, 2026
Merged

maleadt merged 2 commits into
masterfrom
tb/toplevel

Conversation

@maleadt

@maleadt maleadt commented Aug 12, 2026

Copy link
Copy Markdown
Member

Add a toplevel_block keyword to build_tarballs for definitions that should be available unconditionally in a generated JLL module.

The block is emitted after wrapper selection, so it can use is_available(), host_platform, and product symbols when an artifact matches. Unlike augment_platform_block, it is not included in the artifact-selection subprocess and does not require changes to JLLWrappers or generated package dependencies.

This is useful for JLLs that provide Julia-side APIs or metadata even on platforms where no artifact is available.

Thread a toplevel_block keyword through metadata reconstruction and JLL generation, then emit it after wrapper selection in the generated module. Document its precompile-time semantics and keep it independent of platform augmentation, artifact selection, and JLLWrappers compatibility.
Exercise toplevel_block through JSON merging and generated-source ordering, then verify its definitions at runtime and from init code. Build a separate FreeBSD-only JLL to ensure the same definitions remain callable on a host where no artifact wrapper is available.
@maleadt
maleadt requested a review from giordano August 12, 2026 12:34
@maleadt
maleadt merged commit 45ada1c into master Aug 15, 2026
10 checks passed
@maleadt
maleadt deleted the tb/toplevel branch August 15, 2026 08:39
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.

2 participants