SourceKitten icon indicating copy to clipboard operation
SourceKitten copied to clipboard

Support Swift 5.10

Open johnfairh opened this issue 1 year ago • 2 comments

(e: hit the button too soon...)

Main thing is that SwiftPM's yaml file changed format which needs some actual coding. Fixture updates minimal:

cursorinfo

  • Replacement of Foo.Protocol with Foo.Type for protocol metatypes
  • @_eagerMove appearing on Swift.String (no, me neither)

objc

  • Ubiquitous any for Swift versions of APIs eg. any NSCopying

Code completion

  • any in various fields
  • a load of completions have disappeared but they all seem to be for Double leaving just the Int ones which seems like an improvement

johnfairh avatar Feb 29 '24 11:02 johnfairh

Unexpected struggle getting this to work: Xcode 15.3 has an undocumented feature in xcodebuild and other places where environment variables from the invoking environment are discarded. This includes DEVELOPER_DIR.

So when sourcekitten tries to fork xcodebuild, it gets the system default version (15.0.1 in the GHA image) which does not work.

Changed CI to use the xcode-select method instead. This is only necessary for the xcodebuild runner but I changed the others for consistency.

Dev forums, FB linked from there.

(Presumably intended as a hermetic testing improvement but shame on them for not mentioning it, or coordinating with SwiftPM, or…)

johnfairh avatar Apr 04 '24 12:04 johnfairh

Longer than I meant to take getting back to this.

Apple has confirmed that this env. var thing is working as designed -- sounds like the alternative to xcode-select is to set both DEVELOPER_DIR and TEST_RUNNER_DEVELOPER_DIR. I think using xcode-select is probably fine & the right advice for consumers.

@jpsim fyi, will merge this in a few days.

johnfairh avatar Apr 28 '24 16:04 johnfairh

Thanks for driving all this, @johnfairh!

jpsim avatar May 05 '24 18:05 jpsim