Skip to content

Support Swift 6/Xcode 16#828

Merged
johnfairh merged 4 commits intojpsim:mainfrom
SimplyDanny:update-xcode
Feb 11, 2025
Merged

Support Swift 6/Xcode 16#828
johnfairh merged 4 commits intojpsim:mainfrom
SimplyDanny:update-xcode

Conversation

@SimplyDanny
Copy link
Contributor

@SimplyDanny SimplyDanny commented Nov 30, 2024

14.x versions are no longer available on macOS 14 images as can be seen in a recent PR build.

Building successfully with Xcode 16 requires to update a few test dependencies. It especially seems to have issues parsing files with unknown dependencies now.

@SimplyDanny SimplyDanny changed the title Update Xcode versions to tests Update Xcode versions to test Nov 30, 2024
@SimplyDanny SimplyDanny force-pushed the update-xcode branch 3 times, most recently from 8d16e9a to d3fa1ed Compare December 1, 2024 00:35
@SimplyDanny SimplyDanny changed the title Update Xcode versions to test Support Swift 6/Xcode 16 Dec 1, 2024
@SimplyDanny
Copy link
Contributor Author

Hey @johnfairh! I'd appreciate your feedback on this PR and the other PRs building on top of it. 🙏

@johnfairh
Copy link
Collaborator

All the attribute / version / fixtures stuff looks good - the way I handled the WinSDK issue before is to shim them enough to make macOS SourceKit happy with the types. In hindsight I ought to have added a comment to the failing test as well...

I think this a bit more future-proof than rummaging through the json & keeping track of which / how many errors we expect - if the windows people do get interested in sourcekitten again then maybe they can centralise the shims or figure out a better approach. This at the top of WindowsError.swift means the testLibraryWrappersAreUpToDate() test runs unchanged:

#if !os(Windows)
// Shims for !windows SourceKit - see LibraryWrapperGeneratorTests.testLibraryWrappersAreUpToDate
private typealias WORD = UInt
private typealias DWORD = WORD
private typealias WCHAR = WORD
private let FORMAT_MESSAGE_ALLOCATE_BUFFER = 0
private let FORMAT_MESSAGE_FROM_SYSTEM = 0
private let FORMAT_MESSAGE_IGNORE_INSERTS = 0
private func FormatMessageW(_ a: DWORD, _ b: Int?, _ c: DWORD, _ d: DWORD, _ e: Any?, _ f: Int, _ g: Int?) -> DWORD { 0 }
#endif

@SimplyDanny
Copy link
Contributor Author

All the attribute / version / fixtures stuff looks good - the way I handled the WinSDK issue before is to shim them enough to make macOS SourceKit happy with the types. In hindsight I ought to have added a comment to the failing test as well...

I think this a bit more future-proof than rummaging through the json & keeping track of which / how many errors we expect - if the windows people do get interested in sourcekitten again then maybe they can centralise the shims or figure out a better approach. This at the top of WindowsError.swift means the testLibraryWrappersAreUpToDate() test runs unchanged:

#if !os(Windows)
// Shims for !windows SourceKit - see LibraryWrapperGeneratorTests.testLibraryWrappersAreUpToDate
private typealias WORD = UInt
private typealias DWORD = WORD
private typealias WCHAR = WORD
private let FORMAT_MESSAGE_ALLOCATE_BUFFER = 0
private let FORMAT_MESSAGE_FROM_SYSTEM = 0
private let FORMAT_MESSAGE_IGNORE_INSERTS = 0
private func FormatMessageW(_ a: DWORD, _ b: Int?, _ c: DWORD, _ d: DWORD, _ e: Any?, _ f: Int, _ g: Int?) -> DWORD { 0 }
#endif

Thank you for the tip. That works without changes in the test.

@johnfairh johnfairh merged commit 25a2348 into jpsim:main Feb 11, 2025
23 checks passed
@johnfairh
Copy link
Collaborator

@SimplyDanny looks good. I’ll merge this; 827 & 829 should be good to rebase after that.

#830 - SWXMLHash has a cocoapods implication - what’s the reason for updating that one? (depending on the reason we could maybe leave cocoapods sourcekitten with the ~>7 rule)

Then we can ping JP & see if he has time to do a release - if not we can figure that out.

@SimplyDanny
Copy link
Contributor Author

@SimplyDanny looks good. I’ll merge this; 827 & 829 should be good to rebase after that.

Done.

#830 - SWXMLHash has a cocoapods implication - what’s the reason for updating that one? (depending on the reason we could maybe leave cocoapods sourcekitten with the ~>7 rule)

I closed the PR. Cannot remember the reason for updating it.

Then we can ping JP & see if he has time to do a release - if not we can figure that out.

I'd love to see a new release once #827 is merged.

@SimplyDanny SimplyDanny deleted the update-xcode branch February 12, 2025 09:20
@johnfairh
Copy link
Collaborator

Hi @jpsim - we could do with a SourceKitten release if you have time - let us know if not & I'll can have a go at it.

@johnfairh
Copy link
Collaborator

OK I did the thing - just another light release like the last few.

@SimplyDanny
Copy link
Contributor Author

OK I did the thing - just another light release like the last few.

Thank you, @johnfairh! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants