Skip to content

Conversation

jonludlam
Copy link
Member

This is to allow for easy access to whether a compiler is an oxcaml one or not.

I initially exposed this as the parameter 'ocaml-config:oxcaml' but then decided to stick precisely with what the output of ocamlc -config gives. This makes it hard to change the name of that value, so it's worth confirming this constraint is OK with the oxcaml devs.

@rgrinberg
Copy link
Member

For reference, do you have the corresponding PR that introduced this change?

@Alizter
Copy link
Collaborator

Alizter commented Aug 20, 2025

We already have the %{oxcaml_supported} variable. Or is this different?

@jonludlam
Copy link
Member Author

For reference, do you have the corresponding PR that introduced this change?

oxcaml/oxcaml@86911a1

@jonludlam
Copy link
Member Author

jonludlam commented Aug 20, 2025

We already have the %{oxcaml_supported} variable. Or is this different?

This seems a bit more robust to me than matching the version number to 'jst' or 'ox', and fitted in nicely with the other ocaml-config variables. I think there's a reasonable argument to expose the rest of the values provided by ocamlc -config, many of which seem to me to be a bit like feature flags (e.g. 'parameterised-modules', 'stack-allocation', etc). This could help as these features get upstreamed, maybe?

(I should probably also mention that the oxcaml_supported change predates the change that added the flag to ocamlc -config)

@rgrinberg
Copy link
Member

This seems a bit more robust to me than matching the version number to 'jst' or 'ox', and fitted in nicely with the other ocaml-config variables

I agree. Why don't we change the implementation of oxcaml_supported then as well?

I think there's a reasonable argument to expose the rest of the values provided by ocamlc -config, many of which seem to me to be a bit like feature flags (e.g. 'parameterised-modules', 'stack-allocation', etc). This could help as these features get upstreamed, maybe?

That would be welcome as well.

@Alizter Alizter added the oxcaml Related to the support to OxCaml functionnalities label Aug 20, 2025
@Alizter Alizter requested a review from maiste August 21, 2025 15:17
Copy link
Collaborator

@maiste maiste left a comment

Choose a reason for hiding this comment

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

I agree that the goal was to have this to replace the +ox lookup functions. We should update these functions to also check for the ocaml_config. This way we would make oxcaml_supported use it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

My suggestion would be for the test cases to be in the test-cases/oxcaml repository as it is related to it.

@rgrinberg
Copy link
Member

@jonludlam do you mind adding a CHANGES entry?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
oxcaml Related to the support to OxCaml functionnalities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants