Hello. Anybody faced the issue with location depre...
# ktor
s
Hello. Anybody faced the issue with location deprecation problem? https://github.com/ktorio/ktor/issues/688
âś… 1
📝 1
d
Didn’t notice. We recommend to use star imports as we do in Ktor itself (and I guess that’s why I didn’t had stumbled upon the issue). We use the kotlin standard, except using
*
imports not only for several imports after a threshold but even for single declaration imports. In any case, I guess that issue will be fixed when we remove all the deprecations once 1.0 is reached
Screenshot 2018-10-31 at 16.08.07.png
s
Great, thanks!!!
👍 1
l
Why does changing to * imports avoid hitting the deprecation error? The lower-case
location
has a Deprecated annotation, so I would have expected that using it either way would be an error
Copy code
@Deprecated(
    "Use Location instead",
    replaceWith = ReplaceWith("Location"), level = DeprecationLevel.ERROR
)
d
Maybe there is a resolution inconsistency there? Agree that one would expect to work the same in both cases
I have explained the imports part here: https://ktor.io/quickstart/code-style.html
l
Small grammar nitpick in that page... "The Official Coding Conventions doesn’t define what’s the recommended way of using imports." should be "The Official Coding Conventions don't define..."
🙏 1
(because conventions is plural)