huh, with kotlin 2.2.20, <https://github.com/josep...
# getting-started
j
huh, with kotlin 2.2.20, https://github.com/josephlbarnett/leakycauldron/blob/fe5e5514dd035c9e0eaae70c6fdb422170035cf1/graphql/src/main/kotlin/com/trib3/graphql/execution/LeakyCauldronHooks.kt#L49-L50 gives this warning:
Copy code
[WARNING] file:///home/jbarnett/workspace/tribe/leakycauldron/graphql/src/main/kotlin/com/trib3/graphql/execution/LeakyCauldronHooks.kt:50:30 This declaration overrides a deprecated member but is not marked as deprecated itself. Add the '@Deprecated' annotation or suppress the diagnostic.
... but gives no such warning in 2.2.10 (I mostly only care because
-Werror
). it looks like it is marked deprecated itself unless I'm missing something? I can, of course, override the non-deprecated methods instead but wanted to understand what's going on.
d
If the base declaration which you override is marked as deprecated then it's expected behavior introduced in 1.9.0 (see KTLC-156). The fact that it was not reported in 2.2.10 could be caused by some bug around this rule for anonymous objects which we fixed in 2.2.20, but I failed to find the exact issue. If the base declaration is not deprecated, then it's a bug, so please report it to kotl.in/issue
j
sorry i updated the code after i posted the message, just changed the link to point to the old one where i override a deprecated method and annotate the override as deprecated (which is my read of KTLC-156/1.9.0 behavior). is my read wrong or is this a different bug around the rule?
d
Aha, this looks like KT-80592, which is fixed in
2.3.0-Beta1
. Could you please try to reproduce it with this version when it's out please (in a few weeks)?