Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom SqlDriver #4806

Merged
merged 2 commits into from
Mar 28, 2023

Conversation

hbmartin
Copy link
Contributor

Implementation for discussion at #4504

Publicly exposes SqlNormalizedCacheFactory constructors which take a SqlDriver argument.

@apollo-cla
Copy link

@hbmartin: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

@netlify
Copy link

netlify bot commented Mar 27, 2023

👷 Deploy request for apollo-android-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit b5144a3

@@ -49,13 +49,13 @@ kotlin {

findByName("jvmMain")?.apply {
dependencies {
implementation(golatac.lib("sqldelight.jvm"))
api(golatac.lib("sqldelight.jvm"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you try adding api("app.cash.sqldelight:runtime") to the commonMain source set instead of each individual platform? SqlDriver is in the runtime artifact (which is added automatically by the plugin) so there should be no need to leak other things.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@martinbonnin Done! Used the version catalog + golatac for the reference, does that work?
re: incubating, I think it makes sense? Happy to put it wherever you think best.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, looks good 👍 . FWIW, the golatac stuff is a workaround for gradle/gradle#22095. We've seen some tasks being rerun due to version catalog accessors. Maybe it's better in newer versions of Gradle, I'll double check.

Re: incubating, incubating is easier for me because the API is still experimental so we can change it more easily. Let's start with this and if people ask for it in the main artifact, I'll backport.

Copy link
Contributor

@martinbonnin martinbonnin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this! Just a quick note that this in the incubating artifacts and not the regular ones. I'm assuming you're ok with this?

@martinbonnin martinbonnin added this pull request to the merge queue Mar 28, 2023
Merged via the queue into apollographql:main with commit 3f2a773 Mar 28, 2023
martinbonnin pushed a commit that referenced this pull request Mar 28, 2023
* Allow custom SqlDriver

* expose api sqldelight runtime only

---------

Co-authored-by: Harold Martin <harold@theworkingname.com>
@martinbonnin martinbonnin mentioned this pull request Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants