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

Make gradle test run verifyMigrationTask instead of check #4713

Merged

Conversation

joshfriend
Copy link
Contributor

This matches what the docs say and wires things up automatically for anyone who doesn't use the check task directly.

... a new verifySqlDelightMigration task will be added to the gradle project, and it will run as part of the test task ...

https://cashapp.github.io/sqldelight/2.0.0/multiplatform_sqlite/migrations/#verifying-migrations

@JakeWharton
Copy link
Member

test is a language-specific task that is not guaranteed to be present. On the JVM it's a real task. In Kotlin multiplatform it's an aggregating task. But it requires that there be a language plugin to provide it.

check, on the other hand, is a lifecycle task that will always be present: https://docs.gradle.org/current/userguide/base_plugin.html#sec:base_tasks. The docs are basically calling out our specific use case:

Plugins and build authors should attach their verification tasks

I think we should fix the docs, not change the code.

@joshfriend joshfriend force-pushed the jf/fix-verifyMigrationTask-wiring branch from bf5b6f3 to c5d4148 Compare October 11, 2023 12:09
The verify task runs under `check` not `test`
@joshfriend joshfriend force-pushed the jf/fix-verifyMigrationTask-wiring branch from c5d4148 to f852f4b Compare October 11, 2023 12:10
@joshfriend
Copy link
Contributor Author

I think we should fix the docs, not change the code.

Sure, updated!

@JakeWharton JakeWharton merged commit 2eee6af into cashapp:master Oct 11, 2023
7 checks passed
@JakeWharton
Copy link
Member

Thanks!

@joshfriend joshfriend deleted the jf/fix-verifyMigrationTask-wiring branch October 11, 2023 14:20
hfhbd pushed a commit that referenced this pull request Apr 2, 2024
The verify task runs under `check` not `test`
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.

None yet

2 participants