Thanks for your reply, Marshall.

I did take the lack of other replies as a sign for "no news is good news"
:) Great to hear that's true for you.

On Wed, Jul 24, 2019 at 3:48 PM Marshall Pierce <marsh...@mpierce.org>
wrote:

> - It’d be neat if the generated record types could have their various
> members explicitly marked as nullable so that they’re `?` types rather than
> `!` types. However, maybe that can be done by annotating them `@Nullable` —
> I forget if kotlin’s platform type integration takes that into account.
>

That would indeed be a possibility to opt in to. A future code generator
API will make adding custom annotations everywhere much easier. The current
one isn't too easy to extend this way, although, it might be possible via
overriding JavaGenerator::generateRecordGetter, prepending the annotation
to the original implementation of the method.

A feature request for supporting this out of the box exists:
https://github.com/jOOQ/jOOQ/issues/4748

With the code generator, the discussion on which of the many silly choices
of @Nullable we should depend is irrelevant, because it's *your* choice,
not the library maintainers' choice. (Unlike below). So, while this hasn't
been a top priority, we'll definitely do this eventually.


> - fetchOne() (or its equivalent extension function) could return `R?`
> instead of `R!`
>

That's the other discussion, which also has a feature request:
https://github.com/jOOQ/jOOQ/issues/6244

It is distinctly different from extending the code generator, because now,
*we* have to add a dependency, and the sorry state of JSR 305 and related
libraries prevented us from doing this so far. This is not a technical
problem at all. It's obvious, which methods would need which annotation,
and we might even be able to automate this in our API generation tools.

But to pick this dependency has proven to be a difficult question - none of
the benefits so far outweighed the effort. I'm very happy to be proven
wrong here, in case I have overlooked something.

Thanks,
Lukas




>
> --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jooq-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jooq-user/968881B1-F851-4AD6-AF4D-E03F141EEEBB%40mpierce.org
> .
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jooq-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/CAB4ELO5KLQ4uRzpVTADB%3D%3DSpYrnxnB1KsqLQHtWEh8TQmjx--g%40mail.gmail.com.

Reply via email to