Xcodeをアップデートしてビルドしたら Module compiled with Swift 5.0.1 cannot be imported by the Swift 5.1.2 compiler というエラーが出た

久しぶりにXcodeをアップデートしてビルドしたら以下のようなエラーが出た

Module compiled with Swift 5.0.1 cannot be imported by the Swift 5.1.2 compiler

以下のように再度carthageをアップデートすることで解決

$ carthage update