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

Uniffi-bindgen not detected in cargo workspace #1905

Closed
1 of 2 tasks
Hinton opened this issue Jan 4, 2024 · 0 comments · Fixed by #1909
Closed
1 of 2 tasks

Uniffi-bindgen not detected in cargo workspace #1905

Hinton opened this issue Jan 4, 2024 · 0 comments · Fixed by #1909
Labels
bindings/uniffi uniffi bindings bug Something isn't working

Comments

@Hinton
Copy link
Contributor

Hinton commented Jan 4, 2024

Bug Description

Maturin includes support for workspace bundled uniffi-bindgen in

let has_uniffi_bindgen_target = root_pkg
.map(|pkg| {
pkg.targets
.iter()
.any(|target| target.name == "uniffi-bindgen" && target.is_bin())
})
.unwrap_or(false);

However this doesn't seem to work correctly and instead I get the following error message.

💥 maturin failed
  Caused by: Failed to run uniffi-bindgen, did you install it? Try `pip install uniffi-bindgen`
  Caused by: No such file or directory (os error 2)

I can resolve it by adding my target dir to the path, but this "should" be unnecessary with the above logic.

Your maturin version (maturin --version)

1.4.0

Your Python version (python -V)

3.9.6

Your pip version (pip -V)

21.2.4

What bindings you're using

uniffi

Does cargo build work?

  • Yes, it works

If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?

  • Yes

Steps to Reproduce

  1. Checkout https://github.com/Hinton/maturin-repro
  2. Run maturin build, note it fails due to unffi-bindgen not being in path.
@Hinton Hinton added the bug Something isn't working label Jan 4, 2024
@messense messense added the bindings/uniffi uniffi bindings label Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bindings/uniffi uniffi bindings bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants