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 __init__ exports when using multiple UniFFI bindings #2305

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Nickersoft
Copy link

This PR is a continuation of the work started in #1910 and #2208 that updates the generated __init__.py to export from all Python files and not just the one it assumes has been created for the local project.

Closes #2294.

There is one remaining concern I have, and that is around dylib files. I believe each crate that uses a UniFFI may try to reference its own dylib file, but only a single dylib will exist in Maturin's build directory. So I'm still not sure the expected strategy here or how that should be managed for multi-crate projects.

@Nickersoft Nickersoft changed the title Fix __init__ exports when using multiple UniFFI bindings Fix __init__ exports when using multiple UniFFI bindings Nov 16, 2024
@Nickersoft
Copy link
Author

Strange that these tests are failing – they all pass locally for me when running cargo test. Does anyone have an idea as to why?

@messense
Copy link
Member

@Nickersoft You need to have uniffi-bindgen in PATH, otherwise it will skip running related tests.

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.

Invalid exports in __init__.py when UniFFI project doesn't include .udl files
2 participants