You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a preamble this might very well be some issue hidden away somewhere and not actually a bug in bindgen, however tracing down the bug is proving to be really hard.
None other than including it as build-dependency of the subcrate ext_crate.
Actual Results
Rustc fails with a long error message, where some macros lead to code with mismatched types.
If you leave away either the bindgen in ext_crate or the ext_crate dependency in the top level Cargo.toml the code compiles just fine.
I suspect something is getting confused... Nom is pulled via bindgen -> cexpr, and probably you're peeking the wrong version or something? Looks really weird.
I can't look into it right now, but I'll try to take a look tomorrow if you haven't figured out.
I'd try to lock nom to a specific version or something. Also, does it happen with all rustc versions?
Thanks. I've been able to narrow down the issue further, it's not a bindgen issue, sorry, however bindgen depends on nom with the verbose-errors feature which leads to the issue (nom has different error types with and without the flag) only occuring when I include bindgen. (However I did not assume that having a build dependency select certain features would also include the feature in libraries using it as normal dependency.)
So essentially the iso8601 crate has to be patched to work with verbose-errors or the feature should be disabled for that crate's nom. I'm not sure if the later is possible though.
Edit: Actually I'm not the first one bothered by this, see rust-bakery/nom#544.
As a preamble this might very well be some issue hidden away somewhere and not actually a bug in bindgen, however tracing down the bug is proving to be really hard.
Source code
I setup a reduced (if you think it's worth the effort I can try minimize it further) example here: https://github.com/leoschwarz/bug_2018-03-28
Bindgen Invocation
None other than including it as
build-dependency
of the subcrateext_crate
.Actual Results
Rustc fails with a long error message, where some macros lead to code with mismatched types.
If you leave away either the bindgen in ext_crate or the ext_crate dependency in the top level
Cargo.toml
the code compiles just fine.Output:
rustc 1.26.0-nightly (9c9424de5 2018-03-27)
cargo check
: https://gist.github.com/leoschwarz/918266935b5624f32d5cc7d03280f45eRUSTFLAGS="-Z external-macro-backtrace" cargo check -vv
: https://gist.github.com/leoschwarz/0c30bd71563d85ffed0fa30992aeff66rustc 1.24.1 (d3ae9a9e0 2018-02-27)
cargo check -vv
: https://gist.github.com/leoschwarz/0a863147dba9d01b340e5715b7717fecThe text was updated successfully, but these errors were encountered: