Are "fix" suggestions in Xcode coming from Swift or Xcode?

Hello

I want to open a discussion about a "fix" suggestion on how to address an async / await compiler error in Xcode, but I am unsure if that fix is coming from the Swift language and if this forum is the correct place to ask, or if it is something coming from Xcode and I have to open a topic on the Apple forums?

Thanks

Fix suggestions generally come directly from the Swift compiler. (Xcode can add its own warnings (and possibly fix-its?) for issues relating to Xcode-specific featues, such as asset catalogs, but that's probably not relevant here.)

For example, here's the compiler's code for the fix-it suggesting to force-unwrap an optional: swift/lib/Sema/CSDiagnostics.cpp at 1eb0ad28bf7652ebc1b1a9add5d135c61f19fc86 · swiftlang/swift · GitHub (I found this by searching for "fixit" in the Swift repo (requires GitHub login).)

So yes, this forum or opening an issue at github.com/swiftlang/swift are the right places to discuss/propose additional fix-its.

(Sidenote: third-party macros can also provide their own custom fix-its. These end up using the same compiler mechanism and thus also appear automatically in IDEs like Xcode.)

2 Likes

Thanks a lot Ole :)

1 Like