Skip to content

Cannot build crate on latest nightly (Win 10) #197

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

Closed
ManifoldFR opened this issue Jul 30, 2018 · 2 comments
Closed

Cannot build crate on latest nightly (Win 10) #197

ManifoldFR opened this issue Jul 30, 2018 · 2 comments

Comments

@ManifoldFR
Copy link

ManifoldFR commented Jul 30, 2018

🐛 Bug Reports

🌍 Environment

  • Your operating system and version: Windows 10 Home (build 17134)
  • Your python version: 3.6.6 (Anaconda 5.1)
  • Your rust version (rustc --version): latest nightly, rustc 1.29.0-nightly (866a71325 2018-07-29), windows-gnu toolchain. I also checked on the MSVC toolchain.

💥 Reproducing

The issue can be reproduced with the above steps

cargo new --lib pyo3test
cd pyo3test
cargo build

It will error out upon building pyo3 v0.3.2, with Error code 119 about conflicting implementations of the the python::IntoPyDictPointer trait for several types (such as (_, _), or (_, _, _), and so on), as goes:

error[E0119]: conflicting implementations of trait `python::IntoPyDictPointer` for type `(_, _)`:
   --> C:\Users\MyUsername\.cargo\registry\src\github.com-1ecc6299db9ec823\pyo3-0.3.2\src\objects\dict.rs:246:1
    |
231 | / impl <K, V, I> IntoPyDictPointer for I
232 | | where
233 | |     K: ToPyObject,
234 | |     V: ToPyObject,
...   |
243 | |     }
244 | | }
    | |_- first implementation here
245 |
246 |   impl<K: ToPyObject, V: ToPyObject> IntoPyDictPointer for (K, V) {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(_, _)`
    |
    = note: upstream crates may add new impl of trait `std::iter::Iterator` for type `(_, _)` in future versions

I'll probably roll back to a previous Rust build (I updated today), but this might need some looking into if some breaking changes are coming in

@konstin
Copy link
Member

konstin commented Jul 30, 2018

Yep, that's due to rust-lang/rust#52050. I'm looking into it. The tl;dr is that this should have never compiled but passed due to a bug in specialization.

@konstin
Copy link
Member

konstin commented Jul 30, 2018

I've fixed this by removing the tuple to PyDict as owned pointer conversions. Even though I expect no one has been using those weird functions, it's technically a semver breaking change and I've released the fixed version as 0.4.0. Everything should compile again after upgrading to 0.4.0.

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

No branches or pull requests

2 participants