https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
f

fkrauthan

03/17/2020, 7:15 PM
Does anyone know a simple yaml parser library for kotlin multiplatform?
d

Dominaezzz

03/17/2020, 7:18 PM
Oops, it's jvm only. Nvm.
c

Casey Brooks

03/17/2020, 7:23 PM
I don’t know of any pure-Kotlin implementations yet. YAML parsers are very complex and difficult to get right, so if there is one out there, I don’t think I would trust it for production use since MPP is so new. I think your best bet would just to use actual/expect declarations over platform-standard libraries
f

fkrauthan

03/17/2020, 9:27 PM
hmm ok yeah I was worried that I have to go down that route
l

louiscad

03/17/2020, 10:04 PM
@charleskorn Since your library depends on kotlinx.serialization which is multiplatform, maybe it could be multiplatform too? Or are you using JVM-only APIs or dependencies?
f

fkrauthan

03/17/2020, 10:30 PM
I though initally its multiplatform but he uses a JVM library for the actual Yaml parsing.
c

charleskorn

03/18/2020, 7:21 AM
I’ve always planned to create a K/N version using
libyaml
(or similar) to do the parsing, but I haven’t gotten around to it yet - biggest blocker is the lack of support for K/N in Spek.
But yes, right now, it’s JVM-only.
m

magnumrocha

03/18/2020, 8:31 AM
this is a good oportunity to make kaml be multiplatform....
and with it contribute to kmp ecosystem.
r

raniejade

03/18/2020, 2:03 PM
@charleskorn I can start publishing the artifacts you need for using Spek in K/N. Biggest downside is that there is no IDE support yet and gradle reporting is via console only (and also blocked by the upgrade to
1.3.70
- significant changes to the compiler plugin api)
301 Views