https://kotlinlang.org logo
#random
Title
m

Marc Knaup

08/24/2020, 1:03 AM
I forgot to mention that it’s a library. So I cannot rely on files.
n

Nikky

08/24/2020, 1:55 AM
unless the files are bundled as resources with the library and is loaded from classpath
m

Marc Knaup

08/24/2020, 1:56 AM
Yes, but as far as I know resources bundling is problematic with multiplatform on /JS and /Native?
n

Nikky

08/24/2020, 1:56 AM
but i guess this is not possible on js target
m

Marc Knaup

08/24/2020, 1:56 AM
Anyway it’s working now. I just had to split up the code in 600 files 😄
n

Nikky

08/24/2020, 1:59 AM
i had a issue where i had too many generated
val
in a single oblect, breaking bytecode limits.. but turning it into inline getter functions was fine because that is functions and also is inlined by the consumer at the end and it compiled
val generatedStuff: String inline get() = "blub"
m

Marc Knaup

08/24/2020, 2:06 AM
I only had one property so that wasn’t an option ^^ Putting the data into 600 files also has the benefit of lazy loading. File-level properties are only inititalized on first access (of the file facet).