I’m trying to use Sqldelight in a JVM project and ...
# squarelibraries
r
I’m trying to use Sqldelight in a JVM project and IntelliJ doesn’t see the generated code, anyone knows why?
r
Not sure what triggers it but i sometimes find the sqldelight generated code directory getting cleaned after running a build, and I usually solve it by re-running just the code-generation gradle task(s).
r
I can find the generated classes in
build/classes/kotlin
but that’s it, I don’t think that’s a folder IntelliJ reads from
Ah, I somehow managed to generate it. So the expected folder is
build/sqldelight
I ran the generate task a dozen times and it finally created it
r
yeah I think the classes file is used in compilation but that
build/sqldelight
folder is where the generated sources live that get used for IDE inference
r
IntelliJ still does not see the
*Queries
`val`s
r
I don’t know what triggers when that directory gets created or cleared. Been meaning to log a bug there but wanted a consistent reproduction first.
Not sure why the queries wouldn’t appear. It’s always been all or nothing for me
r
Well looks like I can see it in the sources generated in the
build/sqldelight
folder but neither IntelliJ nor Gradle see it, it doesn’t build
r
What’s the build error? Maybe there’s an error in your sql or something
r
Oh, that’s because I’m trying to do
Database.*Queries
instead of
Database(driver).*Queries
.
👍 1