G_TYPE_FUNDAMENTAL_MAX mimatch
I ran in to this issue when updating the gtk-rs bindings to the 0.6.x release for debian. gobject-sys 0.17.10 fails to cross-validate the constants from C:
running 2 tests
test cross_validate_layout_with_c ... ok
test cross_validate_constants_with_c ... FAILED
failures:
---- cross_validate_constants_with_c stdout ----
Constant value mismatch for G_TYPE_FUNDAMENTAL_MAX
Rust: "255"
C: "1020"
thread 'cross_validate_constants_with_c' panicked at 'FAILED: 63 passed; 1 failed', tests/abi.rs:109:13
stack backtrace:
0: rust_begin_unwind
at /usr/src/rustc-1.66.0/library/std/src/panicking.rs:575:5
1: core::panicking::panic_fmt
at /usr/src/rustc-1.66.0/library/core/src/panicking.rs:65:14
2: abi::Results::expect_total_success
at ./tests/abi.rs:109:13
3: abi::cross_validate_constants_with_c
at ./tests/abi.rs:145:5
4: abi::cross_validate_constants_with_c::{{closure}}
at ./tests/abi.rs:115:1
5: core::ops::function::FnOnce::call_once
at /usr/src/rustc-1.66.0/library/core/src/ops/function.rs:251:5
6: core::ops::function::FnOnce::call_once
at /usr/src/rustc-1.66.0/library/core/src/ops/function.rs:251:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
failures:
cross_validate_constants_with_c
test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.37s
sources.debian.org told me the value for G_TYPE_FUNDAMENTAL_MAX should be 255 (I think).
The gtk-rs maintainers pointed out they also expect 255 in their (rust) code:
<constant name="TYPE_FUNDAMENTAL_MAX"
value="255"
c:type="G_TYPE_FUNDAMENTAL_MAX">
According to them this is a glib issue, so I am reporting it here. Original issue here