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

Remove TestCoroutineContext.kt completely #3291

Merged
merged 2 commits into from May 23, 2022
Merged

Conversation

qwwdfsad
Copy link
Member

@qwwdfsad qwwdfsad commented May 18, 2022

While we typically avoid breaking experimental API in minor releases, even if we're allowed to, this one seems to be acceptable. It was obsolete since the very 1.0.0 and was never integrated into structured concurrency, and on the other side it prevents using kotlinx-coroutines-core along with kotlinx-coroutines-test in a modularized environment due to split package kotlinx.coroutines.test.

Fixes #3218

Copy link
Collaborator

@dkhalanskyjb dkhalanskyjb left a comment

Choose a reason for hiding this comment

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

Grepping for the mentions of the package, I also see things to remove in

  • kotlinx-coroutines-core/README.md
  • kotlinx-coroutines-core/build.gradle

@@ -77,9 +77,6 @@ public class CoroutinesBlockHoundIntegration : BlockHoundIntegration {
for (method in listOf("clear", "peek", "removeFirstOrNull", "addLast")) {
allowBlockingCallsInside("kotlinx.coroutines.internal.ThreadSafeHeap", method)
}
// [addLastIf] is only used in [EventLoop.common]. Users of [removeFirstIf]:
allowBlockingCallsInside("kotlinx.coroutines.test.TestCoroutineDispatcher", "doActionsUntil")
allowBlockingCallsInside("kotlinx.coroutines.test.TestCoroutineContext", "triggerActions")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not directly related, but looking at this, I don't know how I feel about it being forbidden to do the test module's runCurrent and advance* from Dispatchers.Default when BlockHound is used, even if the operations themselves are completely fine. I don't think this is a realistic concern, but it still feels a bit semantically unclean.

@qwwdfsad qwwdfsad merged commit 59488d1 into develop May 23, 2022
@qwwdfsad qwwdfsad deleted the remove-test-context branch May 23, 2022 12:06
pablobaxter pushed a commit to pablobaxter/kotlinx.coroutines that referenced this pull request Sep 14, 2022
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.

None yet

2 participants