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

Gradle Verify Task: Throw when missing database file. #3126

Merged
merged 2 commits into from
Apr 22, 2022
Merged

Gradle Verify Task: Throw when missing database file. #3126

merged 2 commits into from
Apr 22, 2022

Conversation

vanniktech
Copy link
Contributor

Fixes #2540

@@ -118,7 +118,7 @@ class JavadocTest {
)
}

@Test fun `select - javadoc containing * symbols`(testDialect: TestDialect) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

w: sqldelight/sqldelight-compiler/src/test/kotlin/app/cash/sqldelight/core/queries/JavadocTest.kt: (121, 13): Name contains characters which can cause problems on Windows: *

Copy link
Collaborator

@AlecKazakova AlecKazakova left a comment

Choose a reason for hiding this comment

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

Does this task still exist and run if you do ./gradlew build with no .db files?

If so I don't think we should break, we should just not have the task.

But agreed if you specifically invoke this task and there are no dbs, it should fail

@AlecKazakova
Copy link
Collaborator

I assume the gradle plugin tests are failing in that scenario

@vanniktech
Copy link
Contributor Author

vanniktech commented Apr 21, 2022

Does this task still exist and run if you do ./gradlew build with no .db files?

Yup that's also why the build is failing. It fails since in the sample there's no db file. To reproduce: ./gradlew build in the sample directory

@vanniktech
Copy link
Contributor Author

vanniktech commented Apr 22, 2022

@AlecStrong should we do it like I've done now or should we stop adding the verify task altogether in case verifyMigration != true

@AlecKazakova
Copy link
Collaborator

i like this. If the flag is on you should always have a .db file to verify them with.

@AlecKazakova AlecKazakova merged commit 9db941f into cashapp:master Apr 22, 2022
@vanniktech vanniktech deleted the gradle-throw-when-missing-db-file branch April 22, 2022 11:40
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.

Warn when selecting from a single table that's not defined in the same file
2 participants