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

Fix Operation.swift Operation addDependency bug #2488

Merged
merged 2 commits into from
Aug 27, 2019

Conversation

dannliu
Copy link
Contributor

@dannliu dannliu commented Aug 24, 2019

In this commit, I only fixed the addDependency bug. However, there is a critical bug https://bugs.swift.org/browse/SR-11333, exists from swift5.0 (I didn't check swift version < 5.0).

I created a test case for OperationQueue and Operation which testing the dependency.

@dannliu
Copy link
Contributor Author

dannliu commented Aug 24, 2019

Everything works fine on the Darwin platform. As the Operation.swift changes so much between swift-5.0 and the current master branch. I guess the Foundation team may have a new design for Operation&OperationQueue and everything is in progress.

@millenomi
Copy link
Contributor

@swift-ci please test and merge

@millenomi
Copy link
Contributor

The new test is segfaulting.

@dannliu
Copy link
Contributor Author

dannliu commented Aug 27, 2019

@millenomi The test case failed as I only fixed the addDependency. For the dependency logic in OperationQueue there is still a bug here which I haven't fixed. You can take a look at SR-11333.

@dannliu
Copy link
Contributor Author

dannliu commented Aug 27, 2019

@swift-ci please test

@dannliu
Copy link
Contributor Author

dannliu commented Aug 27, 2019

@millenomi I updated the test case to only handle the addDependency method. According to SR-11333, is that properly I could work and fix that? However, I am not sure if the foundation team there has already got a plan and overall design for Operation & OperationQueue. Looking forward to get how do you think this.

@millenomi
Copy link
Contributor

The other test uncovered a separate bug that we need to look into.

The design you see is the design we have. (It's very close to the way Darwin's works.) We need to bugfix for sure, and patches are welcome; there's a lot of work and nonobvious behavior that's gone into the Darwin version, and the patches will need to clear a pretty high bar, but if you want to send a PR please do.

@millenomi
Copy link
Contributor

@swift-ci please test and merge

3 similar comments
@millenomi
Copy link
Contributor

@swift-ci please test and merge

@millenomi
Copy link
Contributor

@swift-ci please test and merge

@millenomi
Copy link
Contributor

@swift-ci please test and merge

@swift-ci swift-ci merged commit f3065c3 into swiftlang:master Aug 27, 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.

3 participants