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 nightly CI #4401

Closed
wants to merge 1 commit into from
Closed

Fix nightly CI #4401

wants to merge 1 commit into from

Conversation

ngoldbaum
Copy link
Contributor

@ngoldbaum ngoldbaum commented Jul 31, 2024

I'm pretty sure rustc is wrong and these structs are properly marked as pub?

@ngoldbaum
Copy link
Contributor Author

You can trigger the error locally doing

RUSTFLAGS="-D warnings" cargo test --no-default-features --features "multiple-pymethods abi3 full nightly"

With the latest nightly rustc:

error: struct `PyByteArrayObject` is never constructed
  --> pyo3-ffi/src/bytearrayobject.rs:21:16
   |
21 | opaque_struct!(PyByteArrayObject);
   |                ^^^^^^^^^^^^^^^^^
   |
   = note: `-D dead-code` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(dead_code)]`
   = note: this error originates in the macro `opaque_struct` (in Nightly builds, run with -Z macro-backtrace for more info)

error: struct `PyDictObject` is never constructed
   --> pyo3-ffi/src/dictobject.rs:114:16
    |
114 | opaque_struct!(PyDictObject);
    |                ^^^^^^^^^^^^
    |
    = note: this error originates in the macro `opaque_struct` (in Nightly builds, run with -Z macro-backtrace for more info)

error: struct `PyFloatObject` is never constructed
 --> pyo3-ffi/src/floatobject.rs:7:16
  |
7 | opaque_struct!(PyFloatObject);
  |                ^^^^^^^^^^^^^
  |
  = note: this error originates in the macro `opaque_struct` (in Nightly builds, run with -Z macro-backtrace for more info)

error: struct `PyWeakReference` is never constructed
 --> pyo3-ffi/src/weakrefobject.rs:7:16
  |
7 | opaque_struct!(PyWeakReference);
  |                ^^^^^^^^^^^^^^^
  |
  = note: this error originates in the macro `opaque_struct` (in Nightly builds, run with -Z macro-backtrace for more info)

@ngoldbaum
Copy link
Contributor Author

Seems to be fixed in the july 31 nightly, closing

@ngoldbaum ngoldbaum closed this Aug 1, 2024
@ngoldbaum
Copy link
Contributor Author

Actually, I confused myself by having an older nightly installed on my local setup, the nightly failure is still there. Maybe I'm wrong and the new dead code analysis is correct and a code change needed somewhere?

@ngoldbaum ngoldbaum reopened this Aug 1, 2024
@davidhewitt
Copy link
Member

I will try to reach out on the rust zulip. For what it's worth, nightly is set to continue on error so shouldn't block merges (and I typically prefer not to pin so that we can see if any PyO3 stuff might be affecting users on currently nightly)

@ngoldbaum ngoldbaum closed this Aug 1, 2024
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.

2 participants