Sqldelight: myproject/.idea/sqldelight/../shared/data/.sqldelight (No such file or directory)

Created on 7 Apr 2020  ·  11Comments  ·  Source: cashapp/sqldelight

Trying to hook up a kotlin-multiplatform library that uses sqldelight. My myproject/android/settings.gradle:

include ':app'
include ':shareddata'
project(":shareddata").projectDir = file("../shared/data")
rootProject.name = "Quill"
enableFeaturePreview('GRADLE_METADATA')

Seems like it should work fine to include myproject/shared/data/build.gradle but I'm getting this error:

/Users/edenman/Development/myproject/android/.idea/sqldelight/../shared/data/.sqldelight (No such file or directory)

Do I just need to abandon this file layout scheme? I'm in a monorepo so I'd really like the shared code to not have to live in my android folder

bug compiler

Most helpful comment

Hopefully! I wasn’t able to repro but the underlying structure changed a
lot. If it’s still an issue feel free to reopen

On Fri, Aug 28, 2020 at 4:46 AM Krzysztof notifications@github.com wrote:

>
>
>

@AlecStrong https://github.com/AlecStrong

Sorry for late response, thanks for checking out 🙏

My structure was more like this:

shared

project

  • subproject

-- settings.gradle (with projectDir)

But it seems that's already resolved in a PR, so thanks.


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/cashapp/sqldelight/issues/1647#issuecomment-682406690,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAMZBQG5POIINCFNZOAUTCTSC5VEPANCNFSM4MDNO65Q
.

All 11 comments

(I have for now worked around this by doing a simple ln -s shared/data android/shareddata and removing the project(":shareddata").projectDir = file("../shared/data") but this feels janky)

iiiiiiiiinteresting. we rely on projectDir in a few places but we're probably resolving it in a nasty way. will need to think more about it

Any updates on a fix for this issue?

nothing yet, the workaround @edenman posted is probably the best thing to do right now

I also ended up just moving my shared library inside my android folder. The ln -s workaround caused some other problems and it ended up just making AS/gradle much happier to have it in an actual child directory, as annoying as that may be for folder structure pedants like myself.

I've linked generated .aar file from KMP project instead of linking the source code.

I bump into this issue today, where my settings.gradle looks like this:

include ':shared'
project(':shared').projectDir = new File(rootProject.projectDir, '../../shared')

and I end up with .idea/sqldelight/../../shared/.sqldelight (No such file or directory) with shared/.sqldelight folder created in my submodule.

Looking at the code it seems like the properties file generated here are optional (based on the existence of .idea). Would it be possible to add a flag to skip generate those properties files? Or a property to provide a path for a new location? (also: what are those properties used for?)

@AlecStrong Hey, any thoughts on that ^ ?

the properties file is used for configuring the intellij plugin, so it's definitely something we want to be properly set up.

what does the directory structure actually look like in these cases? is it:

root
-settings.gradle (with projectDir =)
-shared
--build.gradle

or

shared
-build.gradle
root
-settings.gradle (with projectDir =)

@AlecStrong
Sorry for late response, thanks for checking out 🙏

My structure was more like this:

shared
project
- subproject
-- settings.gradle (with projectDir)

But it seems that's already resolved in a PR, so thanks.

Hopefully! I wasn’t able to repro but the underlying structure changed a
lot. If it’s still an issue feel free to reopen

On Fri, Aug 28, 2020 at 4:46 AM Krzysztof notifications@github.com wrote:

>
>
>

@AlecStrong https://github.com/AlecStrong

Sorry for late response, thanks for checking out 🙏

My structure was more like this:

shared

project

  • subproject

-- settings.gradle (with projectDir)

But it seems that's already resolved in a PR, so thanks.


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/cashapp/sqldelight/issues/1647#issuecomment-682406690,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAMZBQG5POIINCFNZOAUTCTSC5VEPANCNFSM4MDNO65Q
.

Was this page helpful?
0 / 5 - 0 ratings