Skip to content

fix(meta): reject malformed META file templates - #15994

Draft
Alizter wants to merge 4 commits into
ocaml:mainfrom
Alizter:push-mwwrkvzmlnuu
Draft

fix(meta): reject malformed META file templates#15994
Alizter wants to merge 4 commits into
ocaml:mainfrom
Alizter:push-mwwrkvzmlnuu

Conversation

@Alizter

@Alizter Alizter commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Depends on #16004, #16006, and #16016. Main already contains the generated-template, backslash, and virtual-library ordering regressions from #16005, #16007, and #16008.

Validate exact META file template contents before and after rendering. Preserve source/build origins and structured diagnostics, attribute rendered failures to the responsible marker, keep virtual-library checks ahead of template actions, and escape generated backslashes.

Test: dune runtest test/blackbox-tests/test-cases/meta-file

A META file template can parse before expansion and become malformed when a later generation marker is replaced. Snapshot that behavior and the presence of multiple markers.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
A promoted META file template can differ from a stale source counterpart. Snapshot acceptance of the generated build contents when promotion is disabled.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
Verify that the accepted malformed source template reaches both the generated and installed META files before validation is added.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
Validate exact template contents before and after rendering, preserve structured source and build diagnostics, and attribute expansion failures to the responsible generation marker. Escape generated backslashes so rendered metadata round-trips through META parsing.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
@Alizter
Alizter force-pushed the push-mwwrkvzmlnuu branch from 8c40129 to 5f5e311 Compare August 18, 2026 12:01
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