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

Add support for coroutines #332

Merged
merged 4 commits into from
Jun 2, 2018
Merged

Add support for coroutines #332

merged 4 commits into from
Jun 2, 2018

Conversation

andrzejressel
Copy link
Contributor

Closes #323

@sksamuel
Copy link
Member

Both builds seem to have failed.

Copy link
Contributor

@imanushin imanushin left a comment

Choose a reason for hiding this comment

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

@jereksel , this it what I wanted

zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not 4.7 ?

Copy link
Member

Choose a reason for hiding this comment

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

4.7 has a bug, see #336

fun When(name: String, test: WhenContext.() -> Unit) = `when`(name, test)
fun `when`(name: String, test: WhenContext.() -> Unit) = add("When: $name", test)
private fun add(name: String, test: WhenContext.() -> Unit) =
fun And(name: String, test: suspend WhenContext.() -> Unit) = and(name, test)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know what is better, however possible right solution is duplicate functions: with corotines support and without it

@sksamuel sksamuel merged commit a6417dc into kotest:master Jun 2, 2018
@sschuberth
Copy link
Member

sschuberth commented Jun 8, 2018

Is there a way we can disable coroutines, maybe even by default? Otherwise the mix of Gradle 4.8, kotlintest 3.1.6 and allWarningsAsErrors = true breaks the build with

e: warnings found and -Werror specified
w: oss-review-toolkit\downloader\src\test\kotlin\CvsTest.kt: (51, 45): The feature "coroutines" is experimental (see: https://kotlinlang.org/docs/diagnostics/experimental-coroutines)

@sksamuel
Copy link
Member

sksamuel commented Jun 8, 2018

I can make it so there's two versions of the functions.

@sschuberth
Copy link
Member

Not sure if that helps as coroutines would still be generally enabled on the Gradle-level...

@sksamuel
Copy link
Member

sksamuel commented Jun 8, 2018

Yes of course, doh.

Ok maybe it will have to be another module kotlintest-core-coroutines which gives you overloaded specs with coroutines enabled.

@imanushin
Copy link
Contributor

@sksamuel , I see, that coroutines support is missed after version 3.1.6. How it is better to enabled it back?

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.

4 participants