Status Update
Comments
bo...@justin.tv <bo...@justin.tv> #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.
al...@google.com <al...@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
al...@google.com <al...@google.com>
an...@google.com <an...@google.com> #4
If we use the exact same class names in the androidx.annotation
package for the exact same purpose, would we expect to need any work on the Kotlin compiler side?
Description
It is already implemented in org.jetbrains.annotations: @NotNull and @Nullable, and is supported by Android Studio.
Example of code is:
```
List<@NotNull Object> items = new ArrayList<>();
items.add(null); // <- will show warning
```
Please add TYPE_USE to allowed use types for androidx annotations too.