Skip to content

Conversation

art-w
Copy link
Collaborator

@art-w art-w commented Aug 29, 2025

This PR adds a new (parameters ...) field to the library stanza, to define a parameterized library (see #11963). Parameterized libraries are currently only available with the OxCaml compiler, since they require a new compiler flag -parameter Name_of_parameter (for each specified parameter) to compile the modules of the parameterized library.

Fixes #12086

@art-w art-w requested a review from Sudha247 August 29, 2025 12:50
@art-w art-w force-pushed the lib-field-parameters branch 2 times, most recently from 3945c0e to b7624b9 Compare August 29, 2025 15:25
@art-w art-w force-pushed the lib-field-parameters branch from b7624b9 to a0bc8e5 Compare September 4, 2025 07:10
@art-w art-w requested a review from rgrinberg September 8, 2025 15:34
@art-w art-w force-pushed the lib-field-parameters branch 2 times, most recently from 488cf39 to 258df6b Compare September 10, 2025 09:13
Copy link
Member

@rgrinberg rgrinberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Great work on getting on preserving the lazy loading everywhere.

@art-w art-w force-pushed the lib-field-parameters branch 2 times, most recently from 1989c1d to 8fef3ae Compare September 18, 2025 13:58
@Alizter
Copy link
Collaborator

Alizter commented Sep 19, 2025

This looks great! I've left a few questions but they are by no means blocking. I also have another: Is it feasible for library_parameters to also support parameters themselves?

@art-w
Copy link
Collaborator Author

art-w commented Oct 3, 2025

Thanks for the review and the fun question! I just checked, the OxCaml compiler doesn't currently support parameterizing a library_parameter:

Error: Cannot combine -as-parameter with -parameter: parameters cannot
       be parameterised.

@Alizter
Copy link
Collaborator

Alizter commented Oct 3, 2025

If you rebase I can merge it once the CI is done.

Signed-off-by: ArthurW <arthur@tarides.com>
@art-w art-w force-pushed the lib-field-parameters branch from 8fef3ae to 7f7f7dc Compare October 6, 2025 09:14
@Alizter Alizter merged commit 2127cae into ocaml:main Oct 6, 2025
25 checks passed
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.

[OxCaml] Parameterized libraries: parameterized library

3 participants