Re-export deprecated type alias and improve deprecation guidance#1883
Merged
Conversation
Signed-off-by: clux <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1883 +/- ##
=======================================
+ Coverage 76.0% 76.1% +0.1%
=======================================
Files 85 85
Lines 8285 8285
=======================================
+ Hits 6295 6298 +3
+ Misses 1990 1987 -3
🚀 New features to boost your workflow:
|
Signed-off-by: clux <[email protected]>
Signed-off-by: clux <[email protected]>
Signed-off-by: clux <[email protected]>
Member
Author
Signed-off-by: clux <[email protected]>
Signed-off-by: clux <[email protected]>
…ox/deref Signed-off-by: clux <[email protected]>
Signed-off-by: clux <[email protected]>
Signed-off-by: clux <[email protected]>
Contributor
|
This is great! |
Closed
hugoponthieu
pushed a commit
to hugoponthieu/kube
that referenced
this pull request
Jan 29, 2026
…e-rs#1883) * Re-export deprecated type alias temporarily Signed-off-by: clux <[email protected]> * some extra docs Signed-off-by: clux <[email protected]> * newlines? Signed-off-by: clux <[email protected]> * may as well put a link in there Signed-off-by: clux <[email protected]> * use the opportunity to not have duplicate exports everywhere Signed-off-by: clux <[email protected]> * actually need this one re-export Signed-off-by: clux <[email protected]> * clarify further since the box error may still lead people to try to box/deref Signed-off-by: clux <[email protected]> * trailing newline stripped anyway.. Signed-off-by: clux <[email protected]> * fmt more Signed-off-by: clux <[email protected]> --------- Signed-off-by: clux <[email protected]>
cchndl
pushed a commit
to cchndl/kube
that referenced
this pull request
Feb 19, 2026
…e-rs#1883) * Re-export deprecated type alias temporarily Signed-off-by: clux <[email protected]> * some extra docs Signed-off-by: clux <[email protected]> * newlines? Signed-off-by: clux <[email protected]> * may as well put a link in there Signed-off-by: clux <[email protected]> * use the opportunity to not have duplicate exports everywhere Signed-off-by: clux <[email protected]> * actually need this one re-export Signed-off-by: clux <[email protected]> * clarify further since the box error may still lead people to try to box/deref Signed-off-by: clux <[email protected]> * trailing newline stripped anyway.. Signed-off-by: clux <[email protected]> * fmt more Signed-off-by: clux <[email protected]> --------- Signed-off-by: clux <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1875 to make the breaking change less jarring for people using the type from this re-export. It also updates the deprecation warning to guide people to the new pattern.
Before (using the deprecated
ErrorResponsefromkube::error); fails and no deprecation;After
warning: use of deprecated type alias `kube::kube_core::ErrorResponse`: use kube::core::Status instead. Note that the Error::Api constructor based pattern matches have been helper functions due to boxing. See Status docs for the new pattern: https://docs.rs/kube/latest/kube/core/struct.Status.html --> src/controller/reconcile.rs:129:39 | 129 | kube::Error::Api(kube::error::ErrorResponse { code: 403, .. }) => { | ^^^^^^^^^^^^^ | = note: `#[warn(deprecated)]` on by default error[E0308]: mismatched types --> src/controller/reconcile.rs:129:26 | 128 | .map_err(|error| match error { | ----- this expression has type `kube::Error` 129 | kube::Error::Api(kube::error::ErrorResponse { code: 403, .. }) => { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Box<Status>`, found `Status` | = note: expected struct `Box<kube::kube_core::Status>` found struct `kube::kube_core::Status`so hopefully people look at the warning