Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Lots of Error::description() deprecation warnings with 1.42 #613

Closed
sdroege opened this issue Mar 19, 2020 · 17 comments · Fixed by #627
Closed

Lots of Error::description() deprecation warnings with 1.42 #613

sdroege opened this issue Mar 19, 2020 · 17 comments · Fixed by #627

Comments

@sdroege
Copy link
Member

sdroege commented Mar 19, 2020

We should either move to thiserror like in cairo for our errors, or at least just not implement that function.

@sdroege sdroege mentioned this issue Mar 19, 2020
40 tasks
@sdroege
Copy link
Member Author

sdroege commented Apr 6, 2020

@GuillaumeGomez Any objections against using thiserror?

@GuillaumeGomez
Copy link
Member

I'll complain but you can go forward with it.

@gdesmott
Copy link
Contributor

Just build glib master with 1.42 and didn't get any warning. Do I have to use specific flags?

@GuillaumeGomez
Copy link
Member

@gdesmott You're sure you didn't allow all warnings in your environment variables by any chance? Also, try rustc --version just to be sure. :)

@EPashkin
Copy link
Member

Just glib or gtk/examples?

@gdesmott
Copy link
Contributor

Just glib, don't have any warning building https://github.com/gtk-rs/examples either.

$ rustc --version
rustc 1.42.0 (b8cedc004 2020-03-09)

@EPashkin
Copy link
Member

Then issue fixed without linking it in PRs. Ex. my cairo PR about this was before this issue.

@sdroege
Copy link
Member Author

sdroege commented Apr 10, 2020

It's not fixed, see for example the two Error impls in glib/src/error.rs. We need to go through all Error impls in our crates.

@gdesmott
Copy link
Contributor

ah, I get the warnings when running cargo test!

@gdesmott
Copy link
Contributor

Not sure how we'd like to change the test with this change. I suppose hardcoding source code line numbers in tests isn't ideal.

---- subclass::object::test::test_set_properties stdout ----
thread 'subclass::object::test::test_set_properties' panicked at 'assertion failed: `(left == right)`
  left: `"Error \"property not found\" in \"glib::object\" at src/object.rs:1365"`,
 right: `"property not found"`', src/subclass/object.rs:605:9

@sdroege
Copy link
Member Author

sdroege commented Apr 10, 2020

CC @fengalin who added this test

@sdroege
Copy link
Member Author

sdroege commented Apr 12, 2020

The same will be needed in other repositories.

@fengalin
Copy link
Contributor

I'll see what I can do, but I'd like to focus on completing https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/298

@sdroege
Copy link
Member Author

sdroege commented Apr 12, 2020

@gdesmott actually was looking into that (Error::description) before you took over :)

@fengalin
Copy link
Contributor

Ok :) Let's synchronize here if someone starts updating another repo for this.

@gdesmott
Copy link
Contributor

Which repos need to be fixed as well? I don't have a full checkout so can't easily grep them.

@sdroege
Copy link
Member Author

sdroege commented Apr 13, 2020

No others apparently. cairo and gstreamer are already done, the others don't have custom error implementations

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants