-
-
Notifications
You must be signed in to change notification settings - Fork 314
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
replace derivative dependency with educe #1585
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1585 +/- ##
=====================================
Coverage 75.3% 75.3%
=====================================
Files 82 82
Lines 7331 7331
=====================================
Hits 5519 5519
Misses 1812 1812
|
Replace the unmaintained `derivative` dependency with `educe`. See also kube-rs#1583. Signed-off-by: Robert Rose <robert.rose@mailbox.org>
6016c8a
to
b57cf5d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for doing this. Finally had the chance to look over this. Was worried about Eq
, but it seems all good to me!
Marking as a |
Replace the unmaintained
derivative
dependency witheduce
. See also #1583.Motivation
The derivative dependency is unmaintained and uses syn 1 while everything else uses syn 2.
Solution
I decided to replace
derivative
with educe instead of derive-more, asderive-more
lacks support of skipping/ignoring fields (see #311) and cannot deriveEq
andPartialEq
. However, I haven't tried too hard to make it work so let me know if I should try to use derive-more anyway.Although educe can almost be used as a drop-in replacement in most places, it lacks to specify custom bounds for
Eq
for some reason. I decided to write the manageable impl forEq
myself where needed, i.e. in mod.rs and object_ref.rsEdit: Noticed by CI checks that educe triggers clippy::unused_underscore_binding when deriving
Debug
for enums (i.e. forState<K>
inwatcher.rs
). Hence, I added#![allow(clippy::used_underscore_binding)]
inkube-runtime
, not sure whether that is acceptable...