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

new clang-sys packages break against older versions #114

Closed
iximeow opened this issue Jul 14, 2020 · 4 comments
Closed

new clang-sys packages break against older versions #114

iximeow opened this issue Jul 14, 2020 · 4 comments

Comments

@iximeow
Copy link

iximeow commented Jul 14, 2020

hi, sorry for the bad news! this applies both to the 0.29 and 0.28 packages, in slightly different ways:

in 0.28.1, CXCursorAndRangeVisitor's visit was extern "C" fn(_: *mut c_void, _: CXCursor, _: CXSourceRange) -> CXVisitorResult, but in 0.28.2 that field turned into Option<extern "C" fn(*mut c_void, CXCursor, CXSourceRange) -> i32>. since Cargo expects patch bumps of 0.y.z versions to be compatible, this makes for breaking crate selections when building f.ex clang.

in 0.29.3, CXCursorAndRangeVisitor's visit was Option<extern "C" fn(_: *mut c_void, _: CXCursor, _: CXSourceRange) -> CXVisitorResult> but became Option<extern "C" fn(*mut c_void, CXCursor, CXSourceRange) -> i32> in 0.29.4. The same breaking version selection issues apply here.

This showed up in at least two places - pgcentralfoundation/pgrx#8 (comment) this issue, and an entirely unrelated build issue I was just tracking down :)

edit: for good measure I checked 0.27 as well - 0.27.0 -> 0.27.1 has the same breaking change as in 0.28.1 -> 0.28.2

@iximeow
Copy link
Author

iximeow commented Jul 14, 2020

ah, I see this relates to #96 - a quick read has me suspecting that this means clang-sys-linkage is not as API-compatible as was discussed there?

@jrandall
Copy link

We've been bitten by this as well - bindgen 0.52.0 fails to build as of this morning with a bunch of errors such as:

error[E0433]: failed to resolve: use of undeclared type or module `clang_Cursor_getMangling`                                                                                                                                                                                                                                                                                                                                            

It is building against v0.28.2 but it looks like bindgen requires an earlier version. It does look like this relates to #96, yes.

@lexxvir
Copy link

lexxvir commented Jul 14, 2020

@jrandall Same here, see my issue in the bindgen repo rust-lang/rust-bindgen#1827

@KyleMayes
Copy link
Owner

The offending versions have been yanked, things should be back to the way they were.
Sorry for the trouble, I did not realize there were API incompatibilities between v0.27 and v0.28.
I guess that's what I get for trying to solve people's build problems, just cause a bunch more... 🤷‍♂️

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

4 participants