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 compilation bug in toolchain >= 1.70.0 #322

Merged
merged 5 commits into from
Apr 26, 2023

Conversation

yasuo-ozu
Copy link
Contributor

Fix #320

Please see the discussion in #321

@yasuo-ozu
Copy link
Contributor Author

I think the mypy error is occured out of my code, but I don't know why it fails while the main branch is passed.

@davidhewitt
Copy link
Member

Are you sure this is an intentional change? I don't see it mentioned in https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md

@yasuo-ozu
Copy link
Contributor Author

Actually I cannot figure out which change on rustc break the compatibility.
(it occurs between ff4b772 ... 8a73f50)

Recently --crate-type option is implemented in cargo, so I think it is safer to use --crate-type option on cargo.

@yasuo-ozu yasuo-ozu marked this pull request as draft April 24, 2023 05:15
@yasuo-ozu yasuo-ozu marked this pull request as ready for review April 24, 2023 06:53
@yasuo-ozu
Copy link
Contributor Author

@davidhewitt I think the mypy error is not related on this PR, so is it good for you to fix it in the same branch?

@davidhewitt
Copy link
Member

Yes, I can fix the mypy error separately.

Argument for using cargo options seems reasonable to me. It looks like --crate-type was added in cargo 1.64, so can you please rework this PR to use the new options for 1.64 or later?

We can then document this in the CHANGELOG as "changed" rather than "fixed".

@yasuo-ozu
Copy link
Contributor Author

Thanks a lot. I fixed the version and modified CHANGELOG.
Could you please release it after it is merged?

Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - I'll try to tidy things up on main with a view to releasing tomorrow.

@davidhewitt davidhewitt merged commit f2224c8 into PyO3:main Apr 26, 2023
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Apr 30, 2023
## 1.6.0 (2023-04-27)
### Changed
- Prefer passing `--crate-type` option to cargo if "toolchain >= 1.64". [#322](PyO3/setuptools-rust#322)

### Fixed
- Fix a bug where rebuilding the library would cause any running processes using it to segfault. [#295](PyO3/setuptools-rust#295)
- Fix `setup.cfg` format for compatibility with "poetry==1.4.0". [#319](PyO3/setuptools-rust#319)
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.

Compilation in setuptools_rust fails with 1.70.0-nightly toolchain
2 participants