swift icon indicating copy to clipboard operation
swift copied to clipboard

Homebrew version does not work with Xcode 16.3

Open rayray opened this issue 8 months ago • 1 comments

If Xcode 16.3 is installed/selected when using Homebrew to install danger-swift, danger-swift will fail on execution with the following error:

Run danger-swift ci --failOnErrors
/var/folders/fh/wfb80fm57y5_v_21dnc599640000gp/T/danger/629370B0-4BCF-4435-8E29-B9D3DE8AF18A/_tmp_dangerfile.swift:1:8: error: module compiled with Swift 6.0 cannot be imported by the Swift 6.1 compiler: /opt/homebrew/lib/danger/Danger.swiftmodule
   1 | import Danger
     |        `- error: module compiled with Swift 6.0 cannot be imported by the Swift 6.1 compiler: /opt/homebrew/lib/danger/Danger.swiftmodule
   2 | import Foundation
   3 | 

There is a potential workaround to use older versions of Xcode (unconfirmed), but danger-swift, either in implementation or Homebrew formula, should be updated to function with the latest version of Xcode.

rayray avatar May 07 '25 20:05 rayray

Xcode 16.2 contains Swift 6.0, whereas Xcode 16.3 contains Swift 6.1. (source https://xcodereleases.com)

What seems to be working for us, is to try a re-install with

brew reinstall danger/tap/danger-swift

msrutek-paylocity avatar Aug 21 '25 13:08 msrutek-paylocity