Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: give extism_log_drain's param a named type #638

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

chrisdickinson
Copy link
Contributor

This fixes a test failure on the python-sdk 1. (See also 2). In particular, while maturin creates bindings for extism_log_drain on clang platforms, it seems that MSVC cannot generate the required binding information for ffi.py. This results in an extism_sys wheel whose shared object (in this case, a DLL) contains the extism_log_drain, but whose Python FFI bindings don't contain a definition for that function.

Naming the function pointer type parameter resolves the issue. What a strange issue!

This fixes a test failure on the python-sdk [1]. (See also [2]). In particular,
while maturin creates bindings for `extism_log_drain` on clang platforms, it
seems that MSVC cannot generate the required binding information for `ffi.py`.
This results in an `extism_sys` wheel whose shared object (in this case, a DLL)
contains the `extism_log_drain`, but whose Python FFI bindings don't contain a
definition for that function.

Naming the function pointer type parameter resolves the issue.

[1]: https://github.com/extism/python-sdk/actions/runs/7172934060/job/19669775001#step:9:35
[2]: extism/python-sdk#18 (comment)
@chrisdickinson chrisdickinson force-pushed the chris/20231215-test-windows-fn-ptr branch from 2bff168 to 60bcf43 Compare December 15, 2023 23:18
Copy link
Contributor

@zshipko zshipko left a comment

Choose a reason for hiding this comment

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

Definitely a strange one!

@chrisdickinson chrisdickinson merged commit 212e28b into main Dec 15, 2023
5 checks passed
@chrisdickinson chrisdickinson deleted the chris/20231215-test-windows-fn-ptr branch December 15, 2023 23:40
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.

None yet

2 participants