In `sqldelight` when having `verifyMigrations = t...
# lysine-dev
u
In
sqldelight
when having
verifyMigrations = true
, my
:app:db:generateDebugAppDatabaseInterface
takes like 6 minutes (80ish tables; and does always finish) Is that normal? (the
verifyDebugAppDatabaseMigration
completes in like 2-6seconds.) Seems like I'm hitting some weird combinatorial rollout?
j
On 2.4?
u
2.4 improved it actually, to like 4minutes still sounds excessive (?)
with it off, am I missing on something? doesnt
verifyBlaMigration
validate the syntax and all that stuff implicitly?
j
Yeah
u
full story - with 2.3.? I was getting
verifyAppDatabaseMigration
to take very long time and sometimes never finish, then 2.3.2 fixed that (2-6seconds) but introduced flakiness to the task. I was thinking the long build time were releated, so I just now tried 2.4 (since I knew the flakiness fix was there); it seems flakiness is gone - and the build time did drop but still feels excessive if I
verifyMigrations = false
, then the task takes few seconds = fast so I'd imagine it's a different thing
e
Do you have a .db file for each version of your database?
j
Yeah that would make it quadratic
u
each? no, just the first one
j
Good. That's correct.
Just the one at the oldest version you support migrating from.
u
the verify task doesnt do the same verification that would be executed at assemble time? or am I just nit perceiving it because maybe its a cache hit (when running the verify task)?
j
that's correct–they're not the same
the task during normal assemble just looks at the current schema and generates code for it
verification actually ensures that running your migrations on each provided db actually produces the current schema
u
yes but I meant the verification thats run during assemble when the
verifyMigrations = true
flag is on (from what I know it should just prevalidate the migration files without playing them speculativelly)
or did i misunderstand you?
if i disable the flag, all is well (and verify proper gradle task is fast regardless of the flag)
j
I think there were some fixes around this. We're going to do a patch release here any day now.