I really want a `<http://DeprecationLevel.INFO|DeprecationLevel.INFO>`. It would be super useful wit...
s
I really want a
<http://DeprecationLevel.INFO|DeprecationLevel.INFO>
. It would be super useful within a large codebase, where I need to signal intent to other developers without littering the place with compiler warnings. Is it something that's ever been discussed? I'll raise a ticket if not.
https://youtrack.jetbrains.com/issue/KT-24746 "Provide ability to exclude specific warnings from compiler option Werror (all warnings as errors)" would be an alternative solution, but
<http://DeprecationLevel.INFO|DeprecationLevel.INFO>
would be even better
The behaviour I would want would be to see a strikethrough at the use site in the IDE, but no warning emitted by the compiler.
c
for example where would you use this?
s
I'm writing a lot of shared libraries for use by other developers in a monorepo. But most of our teams have the compiler configured to treat warnings as errors, to keep the code clean. So I'm kind of backed into a corner where I can't deprecate anything unless I immediately go and fix all the places it's used.
Some of the deprecations I want to make are really just to discourage the widespread use of certain things, even if those things aren't ever going to be totally removed and might have some legitimate uses.
I tried using "opt in" annotations but it was too heavyweight, I felt like I was spending more time fighting annotations than writing code
If I had to sum it up, I want a way to mark an API so that anyone trying to use it in future will be notified by the IDE that there's a better alternative, but I don't want to generate compiler warnings and/or build failures for existing uses of that API
👍 2