Jij-Inc / pyo3-stub-gen

Stub file (*.pyi) generator for PyO3
Apache License 2.0
61 stars 12 forks source link

multiple candidates for `rlib` dependency `anise` found #76

Open ChristopherRabotin opened 2 months ago

ChristopherRabotin commented 2 months ago

Hi there,

My project, ANISE, is organized as a workspace and provides a Rust and a Python library, separately. I've just tried adding your stub generator, because the lack of type hinting is pretty problematic given how complex ANISE is. Here's the commit that tries this: https://github.com/nyx-space/anise/compare/master...feat/type-hints .

However, when I run the stub_gen binary, I get the following error:

error[E0464]: multiple candidates for `rlib` dependency `anise` found
 --> anise-py/src/bin/stub_gen.rs:5:16
  |
5 |     let stub = anise::stub_info()?;
  |                ^^^^^
  |
  = note: candidate #1: /home/chris/Workspace/nyx-space/anise/target/debug/deps/libanise-ade813368379e110.rlib
  = note: candidate #2: /home/chris/Workspace/nyx-space/anise/target/debug/deps/libanise.rlib

I thought that maybe a cargo clean would help, but alas, the same error pops up again. Could this be due to the Cargo workspace configuration where there is an anise crate for the Rust version and anise-py for the Python version (but called anise in the pyproject.toml file)?

What other information can I give you that may help you help me debug this?

Thank you