[Vapor 4] Fluent now requires Swift 5.2

Due to SR-11120, Vapor 4's Fluent now requires Swift 5.2 or later to compile. See FluentKit 1.0.0 Beta 4.

You can get Swift 5.2 the following ways:

This change only affects Vapor 4 and currently only packages that depend on vapor/fluent-kit. However, it's likely that other packages will start to require Swift 5.2 since having different dependency matrixes for Vapor 4's packages will be a pain.

Some background on this decision:

I've been trying to work around SR-11120 since my request for it to be fixed in 5.1 was declined. I've been somewhat successful so far using hacks, but I couldn't find a way to support nested eager loading given the constraints. After discussing with the community (specifically in Vapor chat's beta and development channels), it seems that raising the version requirement is an unfortunate but acceptable trade-off for two main reasons:

  • Nested eager loading has been a highly requested feature.
  • The 5.1 bug was very likely to impact future development of other features in Fluent, too.

Please let me know if you have any questions or concerns. As always, my DMs are open at https://discord.gg/vapor (@tanner#0101).