vapor / fluent-kit

Swift ORM (queries, models, and relations) for NoSQL and SQL databases
MIT License
218 stars 116 forks source link

Swift 6 `IS NOT NULL` where clause regression #612

Closed finestructure closed 4 months ago

finestructure commented 4 months ago

One of our unit tests is failing when running it with Swift 6. The underlying cause seems to be a regression in how the WHERE clause is being rendered.

In Swift 5.10 we get

WHERE "versions"."latest" IS NOT NULL

(notably without any bind parameter).

In Swift 6 this ends up as

WHERE "versions"."latest" <> $1

with a bind parameter nil and this does not actually select results like the 5.10 query doesn't.

0xTim commented 4 months ago

Looks like a duplicate of #611

0xTim commented 4 months ago

@finestructure can you confirm this is fixed in the latest Xcode beta?

finestructure commented 4 months ago

Yes, these tests are now passing, thank you!

https://github.com/SwiftPackageIndex/SwiftPackageIndex-Server/actions/runs/9910852316