https://kotlinlang.org logo
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
benchmarks
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
confetti
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
lincheck
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by
Title
k

kierans777

02/08/2022, 11:30 PM
Hi all. I'm new to Kotest, but I am loving it. I'm writing a library that needs to be cross platform so using MPP, and Kotest for my all my tests. I can't seem to run my tests in iOS because of a linking error, and was hoping to get some help.
> Task :my-library:linkDebugTestIosX64 FAILED
e: Could not find "io.kotest:kotest-assertions-api" in [ ... ]
FAILURE: Build failed with an exception.
// kotestVersion = "5.1.0"
commonTest {
    dependencies {
        implementation "io.kotest:kotest-framework-engine:${rootProject.ext.kotestVersion}"
        implementation "io.kotest:kotest-assertions-core:${rootProject.ext.kotestVersion}"
        implementation "io.kotest:kotest-property:${rootProject.ext.kotestVersion}"
        implementation "io.kotest.extensions:kotest-assertions-arrow:1.2.2"

        runtimeOnly "io.kotest:kotest-assertions-api:${rootProject.ext.kotestVersion}"
    }
}
s

sam

02/08/2022, 11:32 PM
I don't use a mac. Maybe @Imran/Malic has seen a similar error
👍 1
k

kierans777

02/08/2022, 11:57 PM
Thanks @sam. This is unfortunately blocking my progress so I hope to figure it out soon 😄
I think it's an issue with where the linker is searching for test libs. The
kotest-assertions-api-iosarm64
lib is on disk as is
arrow-core-iosarm64
(which is a
commonMain
dependency). However the linker isn't looking in the
cache
directory in the list of paths. I might ask this question over on the #multiplatform channel.
s

sam

02/09/2022, 1:41 AM
Ok might make sense to ask them yeah
k

kierans777

02/09/2022, 2:28 AM
I ran
./gradlew iosX64Test --info
and it might be an issue integrating
kotest-assertions-arrow
Classpath = [
        /Users/kieran/.konan/kotlin-native-prebuilt-macos-x86_64-1.6.0/konan/lib/kotlin-native.jar
        /Users/kieran/.konan/kotlin-native-prebuilt-macos-x86_64-1.6.0/konan/lib/trove4j.jar
]
Arguments = [
        -p
        static_cache
        -target
        ios_x64
        -g
        -Xexternal-dependencies=/var/folders/90/rnmkftm10551d62mjt897mym0000gn/T/kotlin-native-external-dependencies4001252806988445666.deps
        -Xadd-cache=/Users/kieran/.gradle/caches/modules-2/files-2.1/io.kotest.extensions/kotest-assertions-arrow-iosx64/1.2.2/2da466c9780a787c5b7f8cd310cf37c82b36f754/kotest-assertions-arrow.klib
        -Xcache-directory=/Users/kieran/.konan/kotlin-native-prebuilt-macos-x86_64-1.6.0/klib/cache/ios_x64-gSTATIC/kotest-assertions-arrow-iosx64/1.2.2/7cbae098c9d28e7b9d2d5cc67e2abbde4474614cc1168b690793b82432bd28dc
        -Xcache-directory=/Users/kieran/.konan/kotlin-native-prebuilt-macos-x86_64-1.6.0/klib/cache/ios_x64-gSTATIC
]
Transformed arguments = [
        konanc
        -p
        static_cache
        -target
        ios_x64
        -g
        -Xexternal-dependencies=/var/folders/90/rnmkftm10551d62mjt897mym0000gn/T/kotlin-native-external-dependencies4001252806988445666.deps
        -Xadd-cache=/Users/kieran/.gradle/caches/modules-2/files-2.1/io.kotest.extensions/kotest-assertions-arrow-iosx64/1.2.2/2da466c9780a787c5b7f8cd310cf37c82b36f754/kotest-assertions-arrow.klib
        -Xcache-directory=/Users/kieran/.konan/kotlin-native-prebuilt-macos-x86_64-1.6.0/klib/cache/ios_x64-gSTATIC/kotest-assertions-arrow-iosx64/1.2.2/7cbae098c9d28e7b9d2d5cc67e2abbde4474614cc1168b690793b82432bd28dc
        -Xcache-directory=/Users/kieran/.konan/kotlin-native-prebuilt-macos-x86_64-1.6.0/klib/cache/ios_x64-gSTATIC
]
e: Could not find "io.kotest:kotest-assertions-api" in ...
Maybe when @Imran/Malic is around he can take a look.
s

sam

02/09/2022, 2:39 AM
Does it work if you remove hte arrow deps ?
k

kierans777

02/09/2022, 2:55 AM
I'm migrating an existing codebase, so it would fail at the compilation step
s

sam

02/09/2022, 2:56 AM
ah
k

kierans777

02/09/2022, 2:56 AM
I also ported all the tests from Junit to Kotest, and love the Arrow matchers
s

sam

02/09/2022, 2:56 AM
Yeah me too.
@Imran/Malic does most of the work on the arrow matchers and such a good job
k

kierans777

02/09/2022, 2:57 AM
It issue might be a packaging issue for the native code. as I notice
compileOnly
dependencies which MPP does give a warning about (however they've been suppressed via the
gradle.properties
)
I'm hoping that @Imran/Malic has used the matchers in a native project and can help me figure out what I need to do.
s

sam

02/09/2022, 3:00 AM
maybe
I don't think the arrow stuff itself is entirely setup right for mpp as I can't get the core commons stuff to load on another project
k

kierans777

02/09/2022, 3:11 AM
Interesting. I haven't had an issue using Arrow itself. It's the tests that have given me issue.
s

sam

02/09/2022, 3:12 AM
Arrow is great, was just having an issue adding it to commonMain
k

kierans777

02/09/2022, 8:53 AM
If there's anything I can do @Imran/Malic to help, please let me know 😄
i

Imran/Malic

02/09/2022, 10:57 AM
Hi, @kierans777 I am on a different timezone, that’s why I didn’t answer. Thanks for bringing this up. I was able to reproduce it here https://github.com/arrow-kt/Arrow-MPP-Template/pull/25. Let me create a PR in kotest-arrow to change the dependency tree. And then we can ask @sam to publish a new release I don’t have access to that
k

kierans777

02/09/2022, 10:58 AM
@Imran/Malic Thanks so much ❤️ (I know from your profile that you're in GMT+1 so I had to wait. I'm in Melbourne Aus so GMT+11)
👌🏾 1
Hopefully @sam can merge/publish when he's awake 😆
i

Imran/Malic

02/09/2022, 11:07 AM
Issue is set up and let me check with a local publication if my changes work https://github.com/kotest/kotest-extensions-arrow/issues/140
s

sam

02/09/2022, 11:13 AM
Happy for you to merge without me btw
:thank-you: 2
k

kierans777

02/09/2022, 12:26 PM
I'm probably going to bed now, so tag me if you need anything. Hopefully it's an easy fix 🙏
i

Imran/Malic

02/09/2022, 12:41 PM
I went through some publications locally, but changing the dependency tree didn’t work. I am going to try something out later after work in 6h. I’ll keep y’all updated
I am going to check out Team City later for issues regarding these two platforms, bc this issue only arises in iosX64 and macosX64 check out the latest commit https://github.com/arrow-kt/Arrow-MPP-Template/pull/25
@sam
I don’t think the arrow stuff itself is entirely setup right for mpp as I can’t get the core commons stuff to load on another project
What for instance the kotlin-stdlib has as
kotlin-stdlib-commons
is in arrow just the artifact name. So in the case of Arrow core it’s just
arrow-core
, the changes in the publication can be seen here https://github.com/arrow-kt/arrow-gradle-config/blob/5037bfd3b6c3bd000163123876635[…]%3Afirst-of-type%2C%20%5Bdata-pjax-container%5D%3Afirst-of-type
s

sam

02/09/2022, 1:36 PM
I was talking about another project I have. I can talk to you about it later on.
👍🏾 1
i

Imran/Malic

02/09/2022, 8:48 PM
I am probably going to look into this in the following days, and ask other maintainers at Arrow @kierans777, probably we’re doing something wrong while publishing the artifacts in
kotest-assertions-arrow
k

kierans777

02/09/2022, 9:29 PM
Thanks @Imran/Malic.
I've also had the issue with iosArm64Test
i

Imran/Malic

02/09/2022, 10:28 PM
Yeah seems all native targets are affected
I had the same with linux, but sorry @kierans777 I couldn't find a fast solution to this. On the weekend I'll have more time to dig deeper and have something merged in the repo
Hi @kierans777 I published a SNAPSHOT
1.1.0.98-SNAPSHOT
which works fine now and I was able to run it here https://github.com/arrow-kt/Arrow-MPP-Template/pull/25/files if it works for you too I can create a
1.3.0
release with those changes or
1.2.3
k

kierans777

02/13/2022, 11:24 PM
@Imran/Malic The build works now. Great job. Thanks 🙏
💪🏾 1
i

Imran/Malic

02/14/2022, 11:33 PM
We published
1.2.3
as a stable release thanks to @sam 🙌🏾 and @kierans777 for bringing it up
❤️ 2
Just a heads up, seems like in the
1.2.3
release the watchOsX86 is failing with the current node js version 14.17.0
> Task :watchosX86MainKlibrary
356
> Task :compileTestKotlinWatchosX86
357
> Task :linkDebugTestWatchosX86
358
> Task :watchosX86Test SKIPPED
359
> Task :allTests FAILED
360

361

362
FAILURE: Build failed with an exception.
363
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
364

365

366
* What went wrong:
367
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
368
Execution failed for task ':allTests'.
369

370
> Failed to execute all tests:
371
See <https://docs.gradle.org/7.4/userguide/command_line_interface.html#sec:command_line_warnings>
372
  :jsBrowserTest: java.lang.IllegalStateException: command '/Users/runner/.gradle/nodejs/node-v14.17.0-darwin-x64/bin/node' exited with errors (exit code: 1)
373
67 actionable tasks: 67 executed
https://github.com/arrow-kt/Arrow-MPP-Template/runs/5196846760?check_suite_focus=true I am reverting to the Snapshot to check if this is a problem with out artifacts
👍 1
Just leaving this here for @sam, but the artifact for
1.2.3
doesn’t seem to work on CI builds with a macos 11 runner. https://github.com/arrow-kt/Arrow-MPP-Template/runs/5197021874?check_suite_focus=true I rerun the snapshot and it worked with the same runner. On my local machine macos 12.X both work without issues
everything works fine now @kierans777 in
1.2.3
just merged it here https://github.com/arrow-kt/Arrow-MPP-Template
👍 1