Thanks for the bug report, but i'm not convinced your patch is a good solution.

First off afaict your patch will break the tests with the old version of atk, which
may create some chicken and egg issues with getting it into testing.

There areĀ  ways around that with extra dependenices, breaks etc
but i'm not convinced it's worth it for a constant that doesn't seem to
actually be used by any rust applications (in Debian or otherwise)
and that upstream has shown they are prepared to change without
bumping the soversion (so user code needs to cope with the case
where the value of the constant the user code was built against is
different from the one atk was built against).

Secondly I don't think adding new constants is something we should
be doing in Debian patches.

I'm more inclined towards simply ignoring this failure, the situation doesn't
seem any different from the case where an application is compiled against
one version of atk and run against another and as I mentioned no rust code
seems to actually use the constant in question.

I've whipped up a patch to do that, anyone else have any thoughts before
I upload?

Description: allow increase in c value of ATK_STATE_LAST_DEFINED
 The new version of atk increased the value of ATK_STATE_LAST_DEFINED,
 upstream did not bump the soversion, so clearly they do not consider
 this a change that is likely to break downstream applictions.

 Futhermore the only code I can find that actually uses the constant
 in question is some code in rust-atk that translates it to an enum
 the corresponding enum value doesn't seem to actually be used for
 anything.

Author: Peter Michael Green <plugw...@debian.org>

--- rust-atk-sys-0.14.0.orig/tests/abi.rs
+++ rust-atk-sys-0.14.0/tests/abi.rs
@@ -134,6 +134,14 @@ fn cross_validate_constants_with_c() {
             continue;
         }
 
+        if *rust_name == "(gint) ATK_STATE_LAST_DEFINED" {
+            // ATK_STATE_LAST_DEFINED may increase in newer versions of the atk library.
+            if c_value.parse::<i32>().unwrap_or(0) > rust_value.parse::<i32>().unwrap_or(i32::MAX) {
+                results.record_passed();
+                continue;
+            }
+        }
+
         if rust_value != c_value {
             results.record_failed();
             eprintln!(

Reply via email to