sqldelight icon indicating copy to clipboard operation
sqldelight copied to clipboard

Streamline sql-psi and SQLDelight pre-release integration

Open veyndan opened this issue 2 years ago • 3 comments

Description

Per CONTRIBUTING.md:

After your change has been merged to sql-psi, if there are changes you also need to make in SQLDelight, check out the sql-psi-dev branch on SQLDelight and target it with your PR. It uses the snapshot releases of sql-psi so you can build your SQLDelight change roughly 10 minutes after the sql-psi change has been merged.

I stumbled across this tweet presenting a new Gradle plugin to add the ability to "include Git repositories as sources in your Gradle builds". Without rehashing what's already written in the docs, it explicitly outlines the improvements that the plugin has over our current approach of using SNAPSHOT builds.

veyndan avatar Nov 04 '21 15:11 veyndan

:+1: our workflow would be pretty similar right? There would still be a sql-psi-dev branch that gets automatically kept up to date with master, and then if you need to make sqldelight changes after a sql-psi change you do it against that branch, the only difference is we use sql-psi/master instead of the snapshot

AlecKazakova avatar Nov 04 '21 15:11 AlecKazakova

Yep, I think the main benefit that I see is that we're not limited to using sql-psi/master, so we can develop some new feature across sql-psi and SQLDelight without having to merge to sql-psi/master. For example, a PR can be made in SQLDelight that references the branch sql-psi/some-cool-feature (which doesn't have to be published — another upshot).

From the docs:

In addition, there’s a process problem with developing in a multi-repository environment: if the feature requires changes to multiple modules, in order to be able to integrate the changes, in particular on CI, you have to publish either snapshots or pre-releases. The problem is that this is not necessarily acceptable: for example you might want to develop a feature in a branch of each repository, and only merge once the full feature is ready.

Idk if we need this feature right now, but it could be a potential solution if it's ever needed.

veyndan avatar Nov 04 '21 16:11 veyndan

Yea very good point, will be super useful when we’re making breaking changes across both

On Thu, Nov 4, 2021 at 12:10 PM Veyndan Stuart @.***> wrote:

Yep, I think the main benefit that I see is that we're not limited to using sql-psi/master, so we can develop some new feature across sql-psi and SQLDelight without having to merge to sql-psi/master. For example, a PR can be made in SQLDelight that references the branch sql-psi/some-cool-feature (which doesn't have to be published — another upshot).

From the docs:

In addition, there’s a process problem with developing in a multi-repository environment: if the feature requires changes to multiple modules, in order to be able to integrate the changes, in particular on CI, you have to publish either snapshots or pre-releases. The problem is that this is not necessarily acceptable: for example you might want to develop a feature in a branch of each repository, and only merge once the full feature is ready.

Idk if we need this feature right now, but it could be a potential solution if it's ever needed.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/cashapp/sqldelight/issues/2667#issuecomment-961192893, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMZBQA64LSBMEHPMGM7GDTUKKV7PANCNFSM5HLWLMEQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

AlecKazakova avatar Nov 04 '21 16:11 AlecKazakova