Skip to content

[SR-10428] URLSession.getTasksWithCompletion method implemented #2105

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

Merged

Conversation

karthikkeyan
Copy link
Contributor

  • New private property hasTriggredResume introduced to track whether the task actually move past the suspendCount in execution
  • New internal property isSuspendedAfterResume introduced to find the accurate state reason for .suspend state

Bug Link: https://bugs.swift.org/browse/SR-10428

@millenomi
Copy link
Contributor

cc @ianpartridge

@millenomi
Copy link
Contributor

@swift-ci please test

@ianpartridge ianpartridge requested a review from pushkarnk April 13, 2019 05:43
@pushkarnk
Copy link
Member

fatal error: error in backend: IO failure on output stream. Looks like an unrelated CI failure? Kicking off the CI again.

@pushkarnk
Copy link
Member

@swift-ci test

@pushkarnk
Copy link
Member

Looks like a different failure this time. A compilation error in Dispatch

error: no such module '_SwiftDispatchOverlayShims'

I'm not sure why this is coming up. Let's start the CI for one more time.

@pushkarnk
Copy link
Member

@swift-ci test

@spevans
Copy link
Contributor

spevans commented Apr 15, 2019

@pushkarnk Dispatch always seems to have problems building, unfortunately the underlying build errors are hidden in the logs which makes fixing them harder.

@pushkarnk
Copy link
Member

@spevans Oh, thanks for that info. I can see other PR builds going through. Do you have some ways to work around this situation? :)

Copy link
Member

@pushkarnk pushkarnk left a comment

Choose a reason for hiding this comment

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

Looks good to me! We only need to fix the build issues now.

@karthikkeyan
Copy link
Contributor Author

@pushkarnk Is there anything I had to update in the PR to get the build working?

@spevans
Copy link
Contributor

spevans commented Apr 15, 2019

@swift-ci test

@karthikkeyan karthikkeyan force-pushed the karthik/SR-10428-gettaskswithcompletion branch from c7f8251 to 5093191 Compare April 16, 2019 02:34
@karthikkeyan
Copy link
Contributor Author

In my last CI build successfully ran in Linux but failed in macOS X. In my local machine, the project is building successfully with Swift Developer Snapshot 2019-04-04(a). I guess the reason for the build failure has something to do with the CI setup. Anyway, I rebased my branch to have all the latest code. Please trigger the CI build one more time.

@spevans @pushkarnk

@pushkarnk
Copy link
Member

@swift-ci test

@pushkarnk
Copy link
Member

@karthikkeyan I don't think it has anything to do with the PR. Seems like a CI issue.

@pushkarnk
Copy link
Member

@swift-ci test

@pushkarnk
Copy link
Member

A different problem this time:

/Users/buildnode/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-master/swiftpm/Sources/SPMLLBuild/llbuild.swift:13:19: error: compiled module was created by an older version of the compiler; rebuild 'llbuildSwift' and try again: /Users/buildnode/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-master/Ninja-ReleaseAssert/llbuild-macosx-x86_64/products/llbuildSwift/llbuildSwift.swiftmodule

@pushkarnk
Copy link
Member

@shahmishal We're seeing the CI fail with different kinds of issues here (see comments above). Can you please help us out?

@shahmishal
Copy link
Member

@swift-ci clean test

3 similar comments
@shahmishal
Copy link
Member

@swift-ci clean test

@pushkarnk
Copy link
Member

@swift-ci clean test

@shahmishal
Copy link
Member

@swift-ci clean test

@shahmishal
Copy link
Member

@swift-ci test

@shahmishal
Copy link
Member

@pushkarnk Sorry, clean is not support. I thought it was.

@spevans
Copy link
Contributor

spevans commented Apr 16, 2019

@swift-ci test macOS

@pushkarnk
Copy link
Member

Thanks @shahmishal .. the CI has passed this time!

@pushkarnk
Copy link
Member

@karthikkeyan I realised that this pull request also fixes a bug in URLSession.getAllTasks(). We wrongly returned tasks that were in the initial, suspended state (not resumed before being suspended). May I request you to add a test for URLSession.getAllTasks() as well?

@karthikkeyan
Copy link
Contributor Author

@karthikkeyan I realised that this pull request also fixes a bug in URLSession.getAllTasks(). We wrongly returned tasks that were in the initial, suspended state (not resumed before being suspended). May I request you to add a test for URLSession.getAllTasks() as well?

Of course Pushkar, I will added on more unit test.

* New private property hasTriggredResume introduces to track whether the task actually move passed the suspendCount in execution
* New internal property isSuspendedAfterResume introduced to find the accurate state reason for suspend state
@karthikkeyan karthikkeyan force-pushed the karthik/SR-10428-gettaskswithcompletion branch from 5093191 to 1833606 Compare April 16, 2019 18:53
@karthikkeyan
Copy link
Contributor Author

karthikkeyan commented Apr 16, 2019

@pushkarnk Thanks for reviewing the PR earlier, I have added unit test for getAllTasks method as well. Please review again when you get a chance.

@spevans
Copy link
Contributor

spevans commented Apr 16, 2019

@swift-ci test

@pushkarnk
Copy link
Member

Thanks @karthikkeyan

@pushkarnk
Copy link
Member

@swift-ci test and merge

1 similar comment
@pushkarnk
Copy link
Member

@swift-ci test and merge

@swift-ci swift-ci merged commit dffdfe6 into swiftlang:master Apr 17, 2019
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.

6 participants