Assigned
Status Update
Comments
au...@google.com <au...@google.com> #2
When we fix nullability in Jetpack libraries, it is very painful for clients. Also for us attempting to land in g3.
I think this is a good idea; however, I'm not sure if we'd run into any issues since these are currently synthetic annotations generated by Metalava. It's possible that creating real annotations might conflict with the SDK stubs.
ja...@google.com <ja...@google.com> #3
If we do this we need to involve the Kotlin team; this basically introduces an "unenforced nullability warnings" level; they added the hardcoded qualified names for those two classes into the Kotlin compiler. intended for the narrow use case it's there for now; if this were to be broadened into something bigger they should be involved. +jvg
Description
However, the current `from() / to()` range doesn't fit all of our requirements, as sometimes you want to avoid certain specific values (special ids, constants, or even just 0) to be used as method parameters.
Of course one can always throw an exception to ensure consistency, but it would be really handy if @IntRange supported an exclude() parameter, to which passing an array of longs, and Lint could detect the usage of the listed values and mark it as an error.