Skip to content

test: ctypes modules field incorrectly validated#13000

Closed
Alizter wants to merge 1 commit intoocaml:mainfrom
Alizter:push-ssluzsxyynpr
Closed

test: ctypes modules field incorrectly validated#13000
Alizter wants to merge 1 commit intoocaml:mainfrom
Alizter:push-ssluzsxyynpr

Conversation

@Alizter
Copy link
Copy Markdown
Collaborator

@Alizter Alizter commented Dec 18, 2025

Reproduction case for #13001

Signed-off-by: Ali Caglayan <alizter@gmail.com>
> (generated_entry_point C)))
> EOF

$ dune build
Copy link
Copy Markdown
Collaborator

@Leonidas-from-XIV Leonidas-from-XIV Dec 23, 2025

Choose a reason for hiding this comment

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

Could you add a plain-text explanation what is expected here and what is failing? That would make it easier to understand the failure case and expected behavior without knowing the entire context.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The (ctypes (type_description (functor ...))) fields use a module that tells ctypes about the kind of interface to expect for the ffi. Some validation was added to make sure that the module came from the modules of the stanza in #12124. However this assumption is incorrect as there are people using this with this particular interface module coming from a separate location. More information can be found in #13001.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yes, but I mean in the cram file. So people reading it can understand what is going on without having to go through the git blame and the github issues.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I will update the test with explanation, sorry for being unclear.

@Leonidas-from-XIV Leonidas-from-XIV added bug c-bindings When dune is trying to interop with C labels Dec 23, 2025
Alizter added a commit that referenced this pull request Jan 2, 2026
…3123)

This reverts commit 87faddc from
#12124.

The validation introduced in #12124 is
incorrect as explained in #13001.
Reproduction case is here #13000. I
will merge these separately so it is easier to backport.

This PR reverts the PR that introduced the incorrect validation.

- #12124
- #13001
- #13000
@Alizter
Copy link
Copy Markdown
Collaborator Author

Alizter commented Jan 2, 2026

Since we reverted the "fix" there is little point of this test now.

@Alizter Alizter closed this Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c-bindings When dune is trying to interop with C

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants