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 URLSession concurrency method in Swift 6(Linux, Windows) #58

Merged
merged 7 commits into from
Jul 17, 2024
Merged

support URLSession concurrency method in Swift 6(Linux, Windows) #58

merged 7 commits into from
Jul 17, 2024

Conversation

zunda-pixel
Copy link
Contributor

  • support URLSession concurrency method in Swift 6(Linux, Windows)
  • add DerivedData to .gitignore for Xcode

@zunda-pixel zunda-pixel changed the title support URLSession method in Swift 6(Linux, Windows) support URLSession concurrency method in Swift 6(Linux, Windows) Jul 14, 2024
@guoye-zhang
Copy link
Contributor

@swift-ci test

@guoye-zhang
Copy link
Contributor

@jrflat Would you take a look at this?


@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
extension URLSession {
Copy link
Contributor Author

@zunda-pixel zunda-pixel Jul 15, 2024

Choose a reason for hiding this comment

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

AsyncBytes supports Apple Platform, but doesn't support Linux and Windows.
swiftlang/swift-corelibs-foundation#3036


#endif

#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(visionOS)
Copy link

Choose a reason for hiding this comment

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

Can we guard only the bytes func with this directive? That way we don't have to do the #endif/#if and split the extension. LGTM otherwise!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I put it all together in one extension.

@zunda-pixel zunda-pixel requested a review from jrflat July 16, 2024 05:43
Copy link

@jrflat jrflat left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good to merge once CI passes.

@jrflat
Copy link

jrflat commented Jul 16, 2024

@swift-ci please test

@jrflat
Copy link

jrflat commented Jul 16, 2024

@swift-ci test

.gitignore Outdated
@@ -12,3 +12,4 @@ Package.resolved

# DocC generated files
.docc-build
DerivedData
Copy link
Contributor

Choose a reason for hiding this comment

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

Would you move it up to the Xcode section and delete one of the .xcodes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I moved it under .xcode

@guoye-zhang guoye-zhang merged commit c30771e into apple:main Jul 17, 2024
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