For what it's worth, I have a workaround for this for the moment, I
simply add a sourceSet definition to the grale file

sourceSets {
    this.main {
        val generatedDir= layout.projectDirectory.dir("generated/java")
        java.srcDir(generatedDir)
    }
}



On Fri, Apr 5, 2024 at 4:34 PM Kevin Jones <ke...@knowledgespike.com> wrote:

> The 3.19.7 version of the plugin still fails, I'm guessing you haven't had
> a chance to look at it yet.
>
> I've now reported the issue to Jetbrains as well,
>
>
> https://youtrack.jetbrains.com/issue/IDEA-350872/JOOQ-Plugin-No-Longer-Works-With-IntelliJ-Idea\
>
> Kevin
>
> On Thu, Mar 14, 2024 at 7:01 PM Pasha Finkelshtein <
> pavel.finkelsht...@gmail.com> wrote:
>
>> It seems to me that if the build and everything else work correctly from
>> the command line, then it's a bug in IDEA and it should be reported.
>> Please report at https://youtrack.jetbrains.com/issues/IDEA
>>
>> Thank you in advance!
>> On Thursday 14 March 2024 at 19:49:14 UTC+1 Lukas Eder wrote:
>>
>>> Hi Kevin,
>>>
>>> Thanks for the example project. I can reproduce the issue with your
>>> instructions. Will look into it tomorrow.
>>>
>>> On Thu, Mar 14, 2024 at 6:11 PM Kevin Jones <ke...@knowledgespike.com>
>>> wrote:
>>>
>>>> Yeah, I was wondering that :)
>>>>
>>>> I've created this project (it's a cut down version of what I'm using)
>>>>
>>>> https://github.com/kevinrjones/JOOQIssue
>>>>
>>>> If you open this in the IDE then the current version of JOOQ is set to
>>>> 3.19.5 and everything is loaded properly.
>>>>
>>>> If you open the file
>>>> "kotlin/com/knowledgespike/progressive/database/TeamRecords.kt" then
>>>> you should see no errors
>>>>
>>>> If you go into the gradle directory and open the libs.versions.toml
>>>> file,
>>>>     change the version to 3.19.6
>>>>     reload the gradle project
>>>>     open the file
>>>> "kotlin/com/knowledgespike/progressive/database/TeamRecords.kt" then
>>>> you should see the errors
>>>>
>>>> If you have Idea's project window open, and expand the 'app_shared'
>>>> project so that 'generated/java' is visible, then you can see the issue.
>>>>
>>>> As you switch from JOOQ version 3.19.5 to 3.19.6 the generated code
>>>> stops being a sourceSet, if you then switch back to 3.19.5 it becomes a
>>>> sourceSet again
>>>>
>>>> [image: image.png]
>>>>
>>>> [image: image.png]
>>>>
>>>> My JOOQ plugin configuration is in the build.gradle.kts file in the
>>>> 'app_shared' project.
>>>>
>>>> Hope that makes sense,
>>>>
>>>> Kevin
>>>>
>>>> On Thu, Mar 14, 2024 at 4:45 PM Lukas Eder <lukas...@gmail.com> wrote:
>>>>
>>>>> Hi Kevin,
>>>>>
>>>>> Thanks for your message.
>>>>>
>>>>> How can this be reproduced, exactly?
>>>>>
>>>>> Thanks,
>>>>> Lukas
>>>>>
>>>>> On Thu, Mar 14, 2024 at 5:30 PM Kevin Jones <ke...@knowledgespike.com>
>>>>> wrote:
>>>>>
>>>>>> If I update to JOOQ 3.19.6 my IDE stops working properly
>>>>>>
>>>>>> I have a multi-module Gradle project with the generated code in one
>>>>>> module that's referenced by two others. My code is Kotlin. I've been
>>>>>> running JOOQ 3.19.2 and everything is OK. if I upgrade to 3.19.5 then
>>>>>> everything is still OK  however going to 3.19.6 causes the IDE (IntelliJ
>>>>>> IDEA) to break.
>>>>>>
>>>>>> In the IDE I get hundreds of "Unresolved Reference" errors, one for
>>>>>> each of the types that I generate with JOOQ.
>>>>>>
>>>>>> I've tried deleting the generated code and re-generating it but I
>>>>>> still get the same issue.
>>>>>>
>>>>>> Nothing else has changed, just the update from 3.19.5 to 3.19.6
>>>>>>
>>>>>> The project still builds and runs so it's only within the IDE that
>>>>>> I'm seeing the issues,
>>>>>>
>>>>>> I've tried invalidating IDEA's caches but still have the same issue.
>>>>>>
>>>>>>
>>>>>> Kevin
>>>>>>
>>>>>> On Fri, Mar 8, 2024 at 5:24 PM Lukas Eder <lukas...@gmail.com> wrote:
>>>>>>
>>>>>>> 3.19.6 has been released and the gradle plugin configuration should
>>>>>>> now be lazy.
>>>>>>>
>>>>>>> Let me know if this fixes the remaining problems for you.
>>>>>>>
>>>>>>> On Friday, March 1, 2024, Lukas Eder <lukas...@gmail.com> wrote:
>>>>>>>
>>>>>>>> Task configuration is now lazy with the next nightly builds of
>>>>>>>> 3.20.0 and 3.19.6:
>>>>>>>> https://github.com/jOOQ/jOOQ/issues/16188
>>>>>>>>
>>>>>>>> I'll probably make another set of patch releases next week.
>>>>>>>>
>>>>>>>> On Friday, February 23, 2024 at 11:00:47 AM UTC+1 Pasha
>>>>>>>> Finkelshtein wrote:
>>>>>>>>
>>>>>>>>> Beautiful!
>>>>>>>>>
>>>>>>>>> Thanks everyone for the help!
>>>>>>>>>
>>>>>>>>> On Fri, 23 Feb 2024, 10:38 Lukas Eder, <lukas...@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Pasha,
>>>>>>>>>>
>>>>>>>>>> Yes, see this issue for lazy configuration evaluation:
>>>>>>>>>> https://github.com/jOOQ/jOOQ/issues/16188
>>>>>>>>>>
>>>>>>>>>> On Fri, Feb 23, 2024 at 8:24 AM Pasha Finkelshtein <
>>>>>>>>>> pavel.fin...@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi @Lukas,
>>>>>>>>>>>
>>>>>>>>>>> After some experimenting, I think that I hit an issue with the
>>>>>>>>>>> jOOQ Gradle plugin, or maybe it's lack of my understanding.
>>>>>>>>>>>
>>>>>>>>>>> Thq jooq block requires jdbc URL to be known in advance, in the
>>>>>>>>>>> configuration phase. But in a perfect world, I need the docker to 
>>>>>>>>>>> be run
>>>>>>>>>>> only in the execution phase.
>>>>>>>>>>>
>>>>>>>>>>> For example, this code works:
>>>>>>>>>>>
>>>>>>>>>>> val start by tasks.registering(Container::class) {
>>>>>>>>>>>     println("START CONTAINER")
>>>>>>>>>>>     container = parade
>>>>>>>>>>> //    doLast {
>>>>>>>>>>>         start()
>>>>>>>>>>> //    }
>>>>>>>>>>> }
>>>>>>>>>>>
>>>>>>>>>>> abstract class Container : DefaultTask() {
>>>>>>>>>>>     @get:Input
>>>>>>>>>>>     abstract val container: Property<PostgreSQLContainer<*>>
>>>>>>>>>>>
>>>>>>>>>>>     fun start() {
>>>>>>>>>>>         container.get().start()
>>>>>>>>>>>     }
>>>>>>>>>>>
>>>>>>>>>>>     fun stop() {
>>>>>>>>>>>         container.get().stop()
>>>>>>>>>>>     }
>>>>>>>>>>> }
>>>>>>>>>>>
>>>>>>>>>>> But if I uncomment ths "doLast" line, I get an error
>>>>>>>>>>>
>>>>>>>>>>> * What went wrong:
>>>>>>>>>>> Mapped port can only be obtained after the container is started
>>>>>>>>>>>
>>>>>>>>>>> I think that the jdbc block should be lazy and read its
>>>>>>>>>>> parameters only during execution. It might be true for other blocks 
>>>>>>>>>>> too —
>>>>>>>>>>> hypothetically other tasks can augment reality with parts later 
>>>>>>>>>>> used by
>>>>>>>>>>> jOOQ too.
>>>>>>>>>>>
>>>>>>>>>>> On Thursday 22 February 2024 at 14:44:48 UTC+1 Pasha
>>>>>>>>>>> Finkelshtein wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Now I have a relatively full picture, thank you very much!
>>>>>>>>>>>>
>>>>>>>>>>>> On Thursday 22 February 2024 at 14:40:10 UTC+1 HOMERMAN wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> It's on the buildscript's classpath. So from the very top of
>>>>>>>>>>>>> my build script it looks like this:
>>>>>>>>>>>>>
>>>>>>>>>>>>> import liquibase.Liquibase
>>>>>>>>>>>>> import liquibase.database.DatabaseFactory
>>>>>>>>>>>>> import liquibase.database.jvm.JdbcConnection
>>>>>>>>>>>>> import liquibase.resource.DirectoryResourceAccessor
>>>>>>>>>>>>> import org.jooq.codegen.DefaultGeneratorStrategy
>>>>>>>>>>>>> import org.jooq.codegen.GenerationTool
>>>>>>>>>>>>> import org.jooq.meta.jaxb.Configuration
>>>>>>>>>>>>> import org.jooq.meta.jaxb.Database
>>>>>>>>>>>>> import org.jooq.meta.jaxb.Generate
>>>>>>>>>>>>> import org.jooq.meta.jaxb.Generator
>>>>>>>>>>>>> import org.jooq.meta.jaxb.Jdbc
>>>>>>>>>>>>> import org.jooq.meta.jaxb.Strategy
>>>>>>>>>>>>> import org.jooq.meta.jaxb.Target
>>>>>>>>>>>>> import org.jooq.meta.postgres.PostgresDatabase
>>>>>>>>>>>>> import org.testcontainers.containers.PostgreSQLContainer
>>>>>>>>>>>>> import java.sql.DriverManager
>>>>>>>>>>>>>
>>>>>>>>>>>>> buildscript {
>>>>>>>>>>>>>    repositories {
>>>>>>>>>>>>>      mavenCentral()
>>>>>>>>>>>>>    }
>>>>>>>>>>>>>
>>>>>>>>>>>>>   dependencies {
>>>>>>>>>>>>>
>>>>>>>>>>>>> classpath("org.testcontainers:testcontainers:${rootProject.extra["testcontainersBomVersion"]}")
>>>>>>>>>>>>>
>>>>>>>>>>>>> classpath("org.testcontainers:junit-jupiter:${rootProject.extra["testcontainersBomVersion"]}")
>>>>>>>>>>>>>
>>>>>>>>>>>>> classpath("org.testcontainers:postgresql:${rootProject.extra["testcontainersBomVersion"]}")
>>>>>>>>>>>>>
>>>>>>>>>>>>> classpath("org.liquibase:liquibase-core:${rootProject.extra["liquibaseVersion"]}")
>>>>>>>>>>>>>
>>>>>>>>>>>>> classpath("org.jooq:jooq:${rootProject.extra["jooqVersion"]}")
>>>>>>>>>>>>>
>>>>>>>>>>>>> classpath("org.jooq:jooq-meta:${rootProject.extra["jooqVersion"]}")
>>>>>>>>>>>>>
>>>>>>>>>>>>> classpath("org.jooq:jooq-codegen:${rootProject.extra["jooqVersion"]}")
>>>>>>>>>>>>>
>>>>>>>>>>>>> classpath("org.postgresql:postgresql:${rootProject.extra["postgresVersion"]}")
>>>>>>>>>>>>>   }
>>>>>>>>>>>>> }
>>>>>>>>>>>>>
>>>>>>>>>>>>> tasks.register("jooqGenerate") {
>>>>>>>>>>>>>    ...
>>>>>>>>>>>>> }
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Thursday, February 22, 2024 at 10:31:27 PM UTC+9 Pasha
>>>>>>>>>>>>> Finkelshtein wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Thanks HOMERMAN,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> But where does this import come from? Where is the dependency
>>>>>>>>>>>>>> declared?
>>>>>>>>>>>>>> Is it in the usual dependencies section? With which scope?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Thursday 22 February 2024 at 14:24:36 UTC+1 HOMERMAN wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> @Pasha
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Sorry - I copy/pasted/genericized before I shared, and I
>>>>>>>>>>>>>>> think inadvertently snipped the import out along the way:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> import org.testcontainers.containers.PostgreSQLContainer
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Thursday, February 22, 2024 at 10:06:49 PM UTC+9 Pasha
>>>>>>>>>>>>>>> Finkelshtein wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Thanks HOMERMAN,
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Where does the dependency on PostgreSQLContainer come from?
>>>>>>>>>>>>>>>> I don't see neither imports nor dependency declaration...
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Best,
>>>>>>>>>>>>>>>> Pasha
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>> 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/b901ed42-ecef-4738-8385-dacc6af3cc2bn%40googlegroups.com
>>>>>>>>>>> <https://groups.google.com/d/msgid/jooq-user/b901ed42-ecef-4738-8385-dacc6af3cc2bn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>>>>> .
>>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>>
>>>>>>>>> You received this message because you are subscribed to a topic in
>>>>>>>>>> the Google Groups "jOOQ User Group" group.
>>>>>>>>>> To unsubscribe from this topic, visit
>>>>>>>>>> https://groups.google.com/d/topic/jooq-user/WYKlwguBHwE/unsubscribe
>>>>>>>>>> .
>>>>>>>>>> To unsubscribe from this group and all its topics, send an email
>>>>>>>>>> to jooq-user+...@googlegroups.com.
>>>>>>>>>> To view this discussion on the web visit
>>>>>>>>>> https://groups.google.com/d/msgid/jooq-user/CAB4ELO6JqDRmNgH92zdja4pGquGXQApH86uXT2k4w8fAs1CNeg%40mail.gmail.com
>>>>>>>>>> <https://groups.google.com/d/msgid/jooq-user/CAB4ELO6JqDRmNgH92zdja4pGquGXQApH86uXT2k4w8fAs1CNeg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>>>>>> .
>>>>>>>>>>
>>>>>>>>> --
>>>>>>>> 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/f1e39661-1e4d-43af-b2ea-6156b8ba478bn%40googlegroups.com
>>>>>>>> <https://groups.google.com/d/msgid/jooq-user/f1e39661-1e4d-43af-b2ea-6156b8ba478bn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>> .
>>>>>>>>
>>>>>>> --
>>>>>>> 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/CAB4ELO5toY0oGeNLuAOHdSOz8S%3D2uzQGX%3Dk1zH3d71qkwxjzow%40mail.gmail.com
>>>>>>> <https://groups.google.com/d/msgid/jooq-user/CAB4ELO5toY0oGeNLuAOHdSOz8S%3D2uzQGX%3Dk1zH3d71qkwxjzow%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Kevin Jones
>>>>>> KnowledgeSpike
>>>>>>
>>>>>> --
>>>>>> 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/CAKT%3DYsMTGaKDwiBZeVLrADTgVTotPnnMQwPWF8T8EDLoXsqfRQ%40mail.gmail.com
>>>>>> <https://groups.google.com/d/msgid/jooq-user/CAKT%3DYsMTGaKDwiBZeVLrADTgVTotPnnMQwPWF8T8EDLoXsqfRQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>> --
>>>>> 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/CAB4ELO6TrnBxK1Z7_ceQxqTA%3Dj1eeG_eEZQggbYpD0cMCSfAxQ%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/jooq-user/CAB4ELO6TrnBxK1Z7_ceQxqTA%3Dj1eeG_eEZQggbYpD0cMCSfAxQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>>
>>>>
>>>> --
>>>> Kevin Jones
>>>> KnowledgeSpike
>>>>
>>>> --
>>>> 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/CAKT%3DYsO1SJO1RWA%2Bn9-F6JCVwco_%3DtvZRCjc9QM%2Bcgo936meQQ%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/jooq-user/CAKT%3DYsO1SJO1RWA%2Bn9-F6JCVwco_%3DtvZRCjc9QM%2Bcgo936meQQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>> 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/4900698b-4f06-4b60-a04c-e995b120952en%40googlegroups.com
>> <https://groups.google.com/d/msgid/jooq-user/4900698b-4f06-4b60-a04c-e995b120952en%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> --
> Kevin Jones
> KnowledgeSpike
>


-- 
Kevin Jones
KnowledgeSpike

-- 
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/CAKT%3DYsO6TNct5zQ%3D4oqOLeDziKR%2BYbpn1a6qVPZfn0DY1MTe3w%40mail.gmail.com.

Reply via email to