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.
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
feat: Add typed scale argument to derive macro #1656
base: main
Are you sure you want to change the base?
feat: Add typed scale argument to derive macro #1656
Changes from 3 commits
9537789
01f89be
a36d0bd
d93d708
a5dfa97
c8a8a3b
7ceb796
a56835e
d513d16
7a86117
696d389
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Maybe there's a way to add a deprecated message to the old way?
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.
As far as I know, there is no way to emit warning from within derive macros, only hard-errors, aka
compile_error!()
.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.
I instead opted to add a note to the relevant setion in the doc comment for the derive macro. See a56835e.
Check warning on line 210 in kube-derive/src/custom_resource.rs
GitHub Actions / clippy_nightly
redundant closure
Check warning on line 210 in kube-derive/src/custom_resource.rs
GitHub Actions / clippy_nightly
redundant closure
Check warning on line 211 in kube-derive/src/custom_resource.rs
Codecov / codecov/patch
kube-derive/src/custom_resource.rs#L209-L211
Check warning on line 215 in kube-derive/src/custom_resource.rs
Codecov / codecov/patch
kube-derive/src/custom_resource.rs#L214-L215
Check warning on line 219 in kube-derive/src/custom_resource.rs
Codecov / codecov/patch
kube-derive/src/custom_resource.rs#L217-L219
Check warning on line 224 in kube-derive/src/custom_resource.rs
Codecov / codecov/patch
kube-derive/src/custom_resource.rs#L221-L224
Check warning on line 229 in kube-derive/src/custom_resource.rs
Codecov / codecov/patch
kube-derive/src/custom_resource.rs#L226-L229
Check warning on line 233 in kube-derive/src/custom_resource.rs
Codecov / codecov/patch
kube-derive/src/custom_resource.rs#L231-L233
Check warning on line 237 in kube-derive/src/custom_resource.rs
Codecov / codecov/patch
kube-derive/src/custom_resource.rs#L235-L237
Check warning on line 239 in kube-derive/src/custom_resource.rs
Codecov / codecov/patch
kube-derive/src/custom_resource.rs#L239
Check warning on line 243 in kube-derive/src/custom_resource.rs
Codecov / codecov/patch
kube-derive/src/custom_resource.rs#L242-L243
Check warning on line 251 in kube-derive/src/custom_resource.rs
Codecov / codecov/patch
kube-derive/src/custom_resource.rs#L248-L251
Check warning on line 256 in kube-derive/src/custom_resource.rs
Codecov / codecov/patch
kube-derive/src/custom_resource.rs#L255-L256
Check warning on line 260 in kube-derive/src/custom_resource.rs
Codecov / codecov/patch
kube-derive/src/custom_resource.rs#L259-L260
Check warning on line 266 in kube-derive/src/custom_resource.rs
Codecov / codecov/patch
kube-derive/src/custom_resource.rs#L263-L266
Check warning on line 273 in kube-derive/src/custom_resource.rs
Codecov / codecov/patch
kube-derive/src/custom_resource.rs#L272-L273
Check warning on line 277 in kube-derive/src/custom_resource.rs
Codecov / codecov/patch
kube-derive/src/custom_resource.rs#L277
Check warning on line 283 in kube-derive/src/custom_resource.rs
Codecov / codecov/patch
kube-derive/src/custom_resource.rs#L281-L283
Check warning on line 285 in kube-derive/src/custom_resource.rs
Codecov / codecov/patch
kube-derive/src/custom_resource.rs#L285
Check warning on line 553 in kube-derive/src/custom_resource.rs
Codecov / codecov/patch
kube-derive/src/custom_resource.rs#L551-L553