Replies: 1 comment 11 replies
-
Hi @heubeck! I'm not in favor of adding another library dependency. I know smallrye-common-constraint is very lightweight, but it's still an extra dependency for a single annotation. So one option could be to have the annotations from this library being moved to Now I suspect that the Kotlin compiler might look for I fully understand the use-case (Kotlin expects Java types to be nullable by default and that can be an annoyance), but I want to limit the impact as much as possible. |
Beta Was this translation helpful? Give feedback.
-
Hey dear Mutiny maintainers @jponge and @cescoffier,
sorry for not showing up for so long... hoping and trying to restart contribution activities in autumn with a new Quarkus/Kotlin/Mutiny project.
Coming from #901:
I'm wondering, if - and which - Nullable/NotNull annotations could be used for hinting the Mutiny API.
Major objective would be to add the used annnotations to the Kotlin compiler for getting first-class null-type safety.
There are Nullable/NotNull annotations available from smallrye-common-constraint, but Mutiny is not dependent on common-constraint yet, cannot rate if this is an option, WDYT?
Mutiny holds a dependency to smallrye-common-annotation though, which feels more lightweight than common-constraint (because of less 3rd party dependencies).
WDYT?
My first impulse (in a non-public project) would be to move Nullable/NotNull from common-constraint to common-annotations, do you thing this is an option in the smallrye-common lifecycle? (Add new annotations, deprecate the old ones, switch to new ones with next major version.)
Other ideas, or maybe complete denial of nullable type hinting at all?
Thanks and read you soon
Florian
Beta Was this translation helpful? Give feedback.
All reactions