AJ Alt
03/18/2020, 4:39 PMsam
03/18/2020, 5:30 PMAshish Kumar Joy
03/18/2020, 5:35 PMAshish Kumar Joy
03/29/2020, 7:15 AMSerVB
03/31/2020, 5:08 PMsam
04/11/2020, 2:02 PMsam
04/27/2020, 4:44 AMatara
05/01/2020, 1:12 AM> Configure project :
Kotlin Multiplatform Projects are an experimental feature.
The Kotlin source set commonTest was configured but not added to any Kotlin compilation. You can add a source set to a target's compilation by connecting it with the compilation's default source set using 'dependsOn'.
See <https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#connecting-source-sets>
> Task :kotest-fp:compileKotlinNative
Picked up _JAVA_OPTIONS: -Xms4096m -Xmx4096m -XX:MaxMetaspaceSize=1024m
xcrun: error: unable to find utility "xcodebuild", not a developer tool or in PATH
e: org.jetbrains.kotlin.konan.MissingXcodeException: An error occurred during an xcrun execution. Make sure that Xcode and its command line tools are properly installed.
at org.jetbrains.kotlin.konan.target.CurrentXcode.xcrun(Xcode.kt:77)
at org.jetbrains.kotlin.konan.target.CurrentXcode.access$xcrun(Xcode.kt:45)
at org.jetbrains.kotlin.konan.target.CurrentXcode$version$2.invoke(Xcode.kt:70)
at org.jetbrains.kotlin.konan.target.CurrentXcode$version$2.invoke(Xcode.kt:45)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at org.jetbrains.kotlin.konan.target.CurrentXcode.getVersion(Xcode.kt)
at org.jetbrains.kotlin.konan.target.AppleConfigurablesImpl$xcodePartsProvider$2.invoke(Apple.kt:71)
at org.jetbrains.kotlin.konan.target.AppleConfigurablesImpl$xcodePartsProvider$2.invoke(Apple.kt:24)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at org.jetbrains.kotlin.konan.target.AppleConfigurablesImpl.getXcodePartsProvider(Apple.kt)
at org.jetbrains.kotlin.konan.target.AppleConfigurablesImpl.getDependencies(Apple.kt:58)
at org.jetbrains.kotlin.konan.util.DependencyProcessor.<init>(DependencyProcessor.kt:117)
at org.jetbrains.kotlin.konan.util.DependencyProcessor.<init>(DependencyProcessor.kt:114)
at org.jetbrains.kotlin.konan.properties.KonanPropertiesLoader$dependencyProcessor$2.invoke(KonanProperties.kt:59)
at org.jetbrains.kotlin.konan.properties.KonanPropertiesLoader$dependencyProcessor$2.invoke(KonanProperties.kt:34)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at org.jetbrains.kotlin.konan.properties.KonanPropertiesLoader.getDependencyProcessor(KonanProperties.kt)
at org.jetbrains.kotlin.konan.properties.KonanPropertiesLoader.downloadDependencies(KonanProperties.kt:40)
at org.jetbrains.kotlin.konan.target.Platform.downloadDependencies(Platform.kt)
at org.jetbrains.kotlin.backend.konan.KonanConfig.<init>(KonanConfig.kt:64)
at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:63)
atara
05/01/2020, 1:14 AM./gradlew check
and also what is the right way to fix this error upp I already deleted and re install the xcode commandsdr.dreigh
05/11/2020, 5:57 PMexpected:<Foo(a=a, b=a, c=a)> but was:<Foo(a=a, b=b, c=c)>
- diff in field Foo.b: "b" did not equal "a"
- diff in field Foo.c: "c" did not equal "a"
It doesn't hook into the intellij expected pattern to highlight the diff in the comparison window.
If we move the diff bit above the expected / actual section, it works, but I think the text looks a little out of context.
What do you think?!dr.dreigh
05/16/2020, 8:32 AMdata class diff for com.sksamuel.kotest.matchers.Baz
├ booFoo: data class diff for com.sksamuel.kotest.matchers.BooFoo
│ ├ a: expected:<9L> but was:<8L>
│ └ foo: data class diff for com.sksamuel.kotest.matchers.Foo
│ ├ a: expected:<123L> but was:<321L>
│ ├ b: expected:<"a"> but was:<"b">
│ └ c: expected:<"a"> but was:<"c">
├ i: expected:<66> but was:<67>
└ things: expected:<["cheese", 22]> but was:<["egg", 1]>
... however, it's lots of string manipulation. it uses shouldBe
to choose the correct Eq
instance. Then it gets the string from the the Throwable.message
, and if it's a nested data class it does a little more manipulation.
My only thoughts to make this a little cleaner would be to change the Eq
interface (and the instances), such that instead of returning a Throwable?
, it returns a type which contains the differences. That way we don't have string manipulate as we'd have access to the diff data. However this might complicate things for the purpose of one feature. Be good to get the thoughts of people a bit more familiar with the codebase, I'm sure there's a much simper way - I just don't can't see it! 🙈 (If you want to see my extremely hacky POC code for reference).atara
05/19/2020, 8:08 AMcheckAll
function. I would really like to add a change to call beforeTest
and afterTest
(or some other equivalent functions) between each iteration of the property base tests.
Looking at the code I was trying to find a central place of where to add such call. I found this function proptest
but there are many of them and I don’t have access to the Spec from there. The Spec holds the before and after functions. I wonder if someone more familiar with the code can guid me here. Thank yousam
06/06/2020, 5:37 PMdr.dreigh
06/07/2020, 9:17 AMdata class diff for com.sksamuel.kotest.eq.DataClass3
├ x: expected:<99> but was:<88>
├ y: data class diff for com.sksamuel.kotest.eq.DataClass2
│ ├ x: expected:<2> but was:<1>
│ ├ y: expected:<4.4f> but was:<3.4f>
│ └ z: data class diff for com.sksamuel.kotest.eq.DataClass1
│ ├ a: expected:<99> but was:<2>
│ └ b: expected:<7.6f> but was:<4.6f>
└ z: expected:<44.6> but was:<44.4>
I have got as far as I can on my own, there's quite a few bits in the code where I could do with a bit of help, they are marked TODO, or just HELP! 🙂
• I've added Any?.isDataClass
function to return true the instance is a data class and if the platform supports reflection. I'm not sure I've added all the implementations in the right places, or if I actually needed them all? (Non JVM kotlin is new to me!)
• Because this feature is not useful if the user decides to override equals()
in their data class, I've added a propertyConfig value showDetailedDataClassDiff
- however I'm not sure if a) the best way of accessing it form the DataClassEq.kt
class? and b) if this flag should be on a per spec basis rather than project? (or both?)
• I imagine that a very deeply nested data class would cause this code to stack overflow.
• I'm not sure where DataClassEq.kt should live because it contains platform dependent code.
Any help/suggestions/code changes/feedback would be greatly appreciated. Cheers!atara
06/12/2020, 2:07 AMatara
06/13/2020, 10:53 AMclass MyTests : StringSpec({
"length should return size of string" {
"hello".length shouldBe 5
}
"startsWith should test for a prefix" {
"world" should startWith("wor")
}
})
and getting
kotlinx.coroutines.TimeoutKt.withTimeout-lwyi7ZQ(DLkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
java.lang.NoSuchMethodError: kotlinx.coroutines.TimeoutKt.withTimeout-lwyi7ZQ(DLkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
at io.kotest.core.runtime.TestExecutor.executeAndWait(TestExecutor.kt:180)
at io.kotest.core.runtime.TestExecutor.invokeTestCase(TestExecutor.kt:149)
at io.kotest.core.runtime.TestExecutor.executeActiveTest(TestExecutor.kt:118)
at io.kotest.core.runtime.TestExecutor$intercept$2.invokeSuspend(TestExecutor.kt:75)
at io.kotest.core.runtime.TestExecutor$intercept$2.invoke(TestExecutor.kt)
at io.kotest.core.runtime.TestExecutor.executeIfActive(TestExecutor.kt:87)
at io.kotest.core.runtime.TestExecutor.intercept(TestExecutor.kt:75)
at io.kotest.core.runtime.TestExecutor.execute(TestExecutor.kt:56)
at io.kotest.core.engine.SingleInstanceSpecRunner.runTest(SingleInstanceSpecRunner.kt:59)
at io.kotest.core.engine.SingleInstanceSpecRunner$execute$2$invokeSuspend$$inlined$invoke$lambda$1.invokeSuspend(SingleInstanceSpecRunner.kt:69)
at io.kotest.core.engine.SingleInstanceSpecRunner$execute$2$invokeSuspend$$inlined$invoke$lambda$1.invoke(SingleInstanceSpecRunner.kt)
at io.kotest.core.engine.SpecRunner$runParallel$$inlined$map$lambda$1$1.invokeSuspend(SpecRunner.kt:51)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:271)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:79)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:54)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:36)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at io.kotest.core.engine.SpecRunner$runParallel$$inlined$map$lambda$1.run(SpecRunner.kt:50)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Any idea…? Thank youatara
06/14/2020, 12:19 AMmvn clean install
)
.m2/repository/io/kotest/kotest-assertions-shared-jvm/4.1.0.RC2/kotest-assertions-shared-jvm-4.1.0.RC2.jar
java.util.zip.ZipException: zip file is empty
sam
06/19/2020, 1:27 PMAJ Alt
06/19/2020, 4:53 PMAJ Alt
06/19/2020, 5:11 PMkotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen io.kotest.assertions.BasicAssertionCounter@edc548
at kfun:kotlin.Throwable.<init>(kotlin.String?;kotlin.Throwable?)kotlin.Throwable (0000000000456260)
at kfun:kotlin.Throwable.<init>(kotlin.String?)kotlin.Throwable (0000000000456550)
at kfun:kotlin.Exception.<init>(kotlin.String?)kotlin.Exception (000000000044ffe0)
at kfun:kotlin.RuntimeException.<init>(kotlin.String?)kotlin.RuntimeException (000000000044fbd0)
at kfun:kotlin.native.concurrent.InvalidMutabilityException.<init>(kotlin.String)kotlin.native.concurrent.InvalidMutabilityException (000000000047ca30)
at ThrowInvalidMutabilityException (000000000047cbc0)
at MutationCheck (00000000007b8610)
at kfun:io.kotest.assertions.BasicAssertionCounter.<set-counter>#internal (00000000005ef300)
at kfun:io.kotest.assertions.BasicAssertionCounter.inc() (00000000005ef440)
at kfun:io.kotest.matchers.shouldBe@T.(U?){0<kotlin.Any?>;1<T>}Generic (0000000000618230)
at Konan_start (0000000000494fb0)
SerVB
06/19/2020, 8:13 PMshouldBe
?
1.shouldBe(1.0) // passes
"1".shouldMatchJson("1.0") // throws: "expected 1.0 but was 1"
I think it shouldn't throw. Maybe eq should be used. If you agree, I will fix this. I've already decided to split my PR to multiple ones so it will be one more.Samyak Jain
07/04/2020, 7:10 PMreevn
07/22/2020, 6:39 PMbeforeTest
is implemented and followed the same pattern.
I've found the TestLifecycleAware
interface from a 3rd party library which contains beforeTest
and afterTest
that is overridden and executed by our TestLifecycleAwareListener
. Does this also need to somehow be updated, or is that just the one mapping we need to this library and other similar callbacks we add do not need to be mapped to TestlifecycleAware
?Irene Dea
08/05/2020, 1:10 AMIrene Dea
08/05/2020, 10:15 PMsam
08/10/2020, 11:30 AMsam
08/10/2020, 11:30 AMsam
08/10/2020, 7:53 PMdr.dreigh
08/14/2020, 10:50 AMAlanna
08/19/2020, 10:57 PM$ ./gradlew test
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':buildSrc'.
> Could not resolve all artifacts for configuration ':buildSrc:classpath'.
> Could not resolve org.gradle.kotlin:plugins:1.3.6.
Required by:
project :buildSrc > org.gradle.kotlin.kotlin-dsl:org.gradle.kotlin.kotlin-dsl.gradle.plugin:1.3.6
> Could not resolve org.gradle.kotlin:plugins:1.3.6.
> Could not get resource '<https://plugins.gradle.org/m2/org/gradle/kotlin/plugins/1.3.6/plugins-1.3.6.module>'.
> Could not GET '<https://repo.jfrog.org/artifactory/libs-release-bintray/org/gradle/kotlin/plugins/1.3.6/plugins-1.3.6.module?referrer>'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at <https://help.gradle.org>
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See <https://docs.gradle.org/6.5.1/userguide/command_line_interface.html#sec:command_line_warnings>
BUILD FAILED in 2s
When I open up https://plugins.gradle.org/m2/org/gradle/kotlin/plugins/1.3.6/plugins-1.3.6.module in a web browser I get a JSON response with status 404.
Has anyone seen this before or does anyone have any ideas for things to try? I have tried removing both my local and global gradle caches but I still get the error.