Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Xcode 15.3 and Swift 5.10 #113

Merged
merged 22 commits into from
Jan 30, 2024
Merged

Support Xcode 15.3 and Swift 5.10 #113

merged 22 commits into from
Jan 30, 2024

Conversation

giginet
Copy link
Owner

@giginet giginet commented Jan 29, 2024

Support Xcode 15.3 beta 1

  • Support Swift 5.10 & Xcode 15.3
  • Modify test matrix to 5.8, 5.9, 5.10

@giginet giginet requested review from mtj0928 and freddi-kit January 29, 2024 02:33
Copy link
Collaborator

@mtj0928 mtj0928 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +29 to +31
if [[ -n "${{ env.TOOLCHAINS }}" ]]; then
xcrun --toolchain ${{ env.TOOLCHAINS }} swift test --verbose
else
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note why this workaround is necessary by comments

Sources/ScipioKit/SwiftPM+Compatibility.swift Outdated Show resolved Hide resolved
Sources/ScipioKit/SwiftPM+Compatibility.swift Outdated Show resolved Hide resolved
Sources/ScipioKit/SwiftPM+Compatibility.swift Outdated Show resolved Hide resolved
Sources/ScipioKit/SwiftPM+Compatibility.swift Outdated Show resolved Hide resolved
Comment on lines +17 to +24
typealias ScipioAbsolutePath = TSCBasic.AbsolutePath
typealias SwiftPMAbsolutePath = Basics.AbsolutePath

#else

// Below Swift 5.9, Basics.AbsolutePath is not implemented yet. So this is required to keep backward-compatibility

typealias ScipioAbsolutePath = TSCBasic.AbsolutePath
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move it to out side of #if block? like below. And please add comment to actual place where we need to typealias

typealias ScipioAbsolutePath = TSCBasic.AbsolutePath

#if swift(>=5.10)
// Above Swift 5.10, SwiftPM requires their own AbsolutePath,
// so we have to bridge them to Scipio requires by typealias
typealias SwiftPMAbsolutePath = Basics.AbsolutePath
#else 
...

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's easy to understand to define this in both paths

Tests/ScipioKitTests/RunnerTests.swift Show resolved Hide resolved
giginet and others added 4 commits January 29, 2024 18:59
@giginet giginet merged commit b62d108 into main Jan 30, 2024
4 checks passed
@giginet giginet deleted the swift-510 branch January 30, 2024 00:07
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.

3 participants