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

[BUG] gtlib-macros: testsuite started failing with 0.20.3 #1526

Closed
werdahias opened this issue Sep 30, 2024 · 4 comments
Closed

[BUG] gtlib-macros: testsuite started failing with 0.20.3 #1526

werdahias opened this issue Sep 30, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@werdahias
Copy link

Bug description
All autopkgtests in Debian for glib-macros started to fail with 0.20.3:

722s error[E0437]: type `Instance` is not a member of trait `ObjectInterface`
722s    --> src/subclass/object.rs:507:9
722s     |
722s 507 |         #[glib::object_interface]
722s     |         ^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `ObjectInterface`
722s     |
722s     = note: this error originates in the attribute macro `glib::object_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
722s 

Today I updated glib-macros to 0.20.4 and got a different error this time:

error[E0716]: temporary value dropped while borrowed
  --> tests/properties.rs:96:43
   |
85 |         #[derive(Properties, Default)]
   |                  ----------
   |                  |        |
   |                  |        temporary value is freed at the end of this statement
   |                  argument requires that borrow lasts for `'static`
...
96 |             #[property(get, set, builder(&<Option<i32>>::static_variant_type()))]
   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use

For more information about this error, try `rustc --explain E0716`.
error: could not compile `glib-macros` (test "properties") due to 1 previous error

This happens for all features. Let me know if you need more information

@werdahias werdahias added the bug Something isn't working label Sep 30, 2024
@werdahias werdahias changed the title [BUG] gtlib-macros: testsuote started failing with 0.20.3 [BUG] gtlib-macros: testsuite started failing with 0.20.3 Sep 30, 2024
@sdroege
Copy link
Member

sdroege commented Sep 30, 2024

You need to update glib to 0.20.3 or newer too. The dependency update in Cargo.toml for that is missing. Can you send a PR for the 0.20 branch for that?

@sdroege
Copy link
Member

sdroege commented Oct 1, 2024

#1527

@werdahias
Copy link
Author

Thanks, will cherrypick this commit

@werdahias
Copy link
Author

Forcing glib-macros to depend on glib 0.20.4 and doing the same (inverted) for glib fixed this for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants