Don't want to generate unchanged file by Jooq

22 views
Skip to first unread message

Muhammad Atif

unread,
May 28, 2024, 6:57:36 AMMay 28
to jOOQ User Group
I am using Programmatic Code Generated in Java Spring Boot. I don't want to generate whole schema again after a small change. At least file which doesn't have changes shouldn't be regenerated.  This show hug change in PR review and hard to look after every bit of code.

Lukas Eder

unread,
May 28, 2024, 6:58:37 AMMay 28
to jooq...@googlegroups.com
Thanks for your message.

jOOQ doesn't modify (touch) files which don't have any changes in them.

On Tue, May 28, 2024 at 12:57 PM Muhammad Atif <atif.a...@gmail.com> wrote:
This show hug change in PR review and hard to look after every bit of code.

I'm afraid, I don't know what this means 

Muhammad Atif

unread,
May 28, 2024, 8:18:24 AMMay 28
to jOOQ User Group
Actually in my team if someone has different Line Separator (CRLF/LF) configuration Jooq assumed there is a change in new file and generate it. Same for imports configuration.

Lukas Eder

unread,
May 28, 2024, 8:20:45 AMMay 28
to jooq...@googlegroups.com
You shouldn't modify generated sources!

I understand that line separators may be changed by version control, so you could adapt the code generator to produce what you're using elsewhere:

But I don't understand why imports are being touched?

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/4202df39-40f3-483f-b438-377112e61965n%40googlegroups.com.

Muhammad Atif

unread,
May 28, 2024, 9:03:08 AMMay 28
to jOOQ User Group
I solution of Line Separators and Space is resolved. Thank you. 
For Imports in IDE different people has different configuration for "Class count to use import with ''*". IDE make imports like import org.jooq.*; after Jooq added.

Lukas Eder

unread,
May 28, 2024, 10:02:26 AMMay 28
to jooq...@googlegroups.com
jOOQ cannot possibly detect what kind of change you did manually, and respect that change. I'm not aware of any code generator that is able to keep arbitrary changes in generated code.

IDEs can be configured to leave derived resources, such as generated code, alone and not touch their contents.

I hope this helps
Lukas

Reply all
Reply to author
Forward
0 new messages