https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
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
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
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
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 Linen
ksp
  • p

    parth

    10/13/2021, 4:34 PM
    KSP only reads kotlin source files IIRC
    y
    • 2
    • 4
  • s

    spierce7

    10/13/2021, 5:17 PM
    IDEs are currently unable to detect KSP-generated declarations on the fly,
    Does t his mean even after building we still can’t see the generated sources and reference them in code?
    e
    • 2
    • 2
  • j

    jameskleeh

    10/13/2021, 6:48 PM
    Is it possible to determine if an annotation value is present because it was the default or if it was set manually?
    g
    j
    • 3
    • 19
  • e

    eygraber

    10/14/2021, 1:53 PM
    Is it possible to use KSP to fail the build if callers of an annotated function aren't calling it in a specified way, or is a compiler plugin required for something like that?
    b
    e
    +3
    • 6
    • 9
  • a

    Adrien Poupard

    10/22/2021, 9:18 AM
    Hi, I'm doing some experimentation with KSP on multiplatform projects and one of my goal would be to generate classes only for a specific plateform (JS) but I didn't in the KSP models where is the information about the plateform. Any idea on how I could to that?
    e
    e
    g
    • 4
    • 6
  • e

    evant

    10/24/2021, 8:08 PM
    So I'm trying to handle multiple rounds and having trouble figuring out how to have the best user experience. Is there some way to distinguish between a type will be available in a later round and one that will never be? I've run into cases where ksp will always fail to resolve the type (trying to reference a generated class for view binding is a good example). And having it just skip and never generate anything isn't great.
    z
    y
    j
    • 4
    • 11
  • e

    evant

    10/24/2021, 8:16 PM
    And separate question. Is the expected behavior for the predicate passed to KSValidateVisitor to be returning true means to check the node and false means to skip assuming it's valid? Seeing some inconsistent behavior in it's implementation and wondering if it's a bug.
    j
    • 2
    • 6
  • e

    evant

    10/24/2021, 8:21 PM
    And @Zac Sweers I've noticed that passing an error ksp type to kotlin poet's converter function will throw some internal ksp errors. Not sure if this is something it should handle or just expect the type to be validated first.
    z
    • 2
    • 4
  • a

    Alexandru Hadăr

    10/26/2021, 7:25 PM
    Hello guys, I’m trying to run my own processor, but I keep getting
    w: [ksp] Unable to process:com.sample.demo.DemoAnnotationProcessor:   DemoClass;Foo
    IS there any command to see more details about why it’s not working ?
    e
    j
    • 3
    • 10
  • e

    elihart

    10/27/2021, 2:26 AM
    I’m running into a pretty tricky XProcessing/KSP crash, and trying to figure out what the root cause is.
    Caused by: java.lang.IllegalArgumentException: EpoxyModel<*> is not a sub type of the class/interface that contains `equals` (EpoxyModel)
            at com.google.devtools.ksp.processing.impl.ResolverImpl.computeAsMemberOf(ResolverImpl.kt:972)
            at com.google.devtools.ksp.processing.impl.ResolverImpl.asMemberOf$compiler_plugin(ResolverImpl.kt:954)
            at com.google.devtools.ksp.symbol.impl.java.KSFunctionDeclarationJavaImpl.asMemberOf(KSFunctionDeclarationJavaImpl.kt:124)
            at androidx.room.compiler.processing.ksp.KSAsMemberOfKt.typeAsMemberOf(KSAsMemberOf.kt:67)
            at androidx.room.compiler.processing.ksp.KspExecutableParameterElement$type$2.invoke(KspExecutableParameterElement.kt:44)
            at androidx.room.compiler.processing.ksp.KspExecutableParameterElement$type$2.invoke(KspExecutableParameterElement.kt:43)
            at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
            at androidx.room.compiler.processing.ksp.KspExecutableParameterElement.getType(KspExecutableParameterElement.kt:43)
            at androidx.room.compiler.processing.ksp.KspExecutableParameterElement.getType(KspExecutableParameterElement.kt:26)
    This happens when I access a certain`XVariableElement.type` , which is a parameter of a function inside my EpoxyModel<T> class. There seems to be a bug with how the generics are handled, but I can’t tell if it is something XProcessing is doing wrong or KSP itself. What is strange is that when
    ResolverImpl.computeAsMemberOf
    fails the check for
    containing.kotlinType.isSubtypeOf(functionDeclaredIn)
    it doesn’t consider
    EpoxyModel<*>
    as a subclass of
    EpoxyModel
    . I have tried to reproduce this in a unit test, and can’t so far, because other cases like
    ArrayList<*>
    vs
    ArrayList
    work fine. Digging deeper into it, the
    isSubtypeOf
    function ends up comparing two
    LazyJavaClassDescriptor
    instances representing the same class, but that type doesn’t seem to implement “equals” so because they are different instances the check fails.
    y
    j
    • 3
    • 9
  • n

    natario1

    10/27/2021, 10:46 AM
    I am trying to replace kapt with ksp with androidx.room , but it fails at runtime because the generated Database_Impl does not exist. Indeed
    build/generated/ksp
    is empty. Does anyone know how to debug this issue? I tried to run the ksp task with --info, but did not get anything useful. Using room 2.3.0 and ksp 1.5.31-1.0.0, which might be a mismatch but I'd expect the build to fail then?
    y
    j
    • 3
    • 3
  • j

    jameskleeh

    10/27/2021, 1:34 PM
    Are there snapshots published for KSP?
    e
    j
    • 3
    • 2
  • a

    Alexandru Hadăr

    10/27/2021, 3:20 PM
    Hey guys, Does anybody know why this piece create an infinite number of files?
    override fun process(resolver: Resolver): List<KSAnnotated> {
            val time = System.currentTimeMillis()
            logger.warn("Running $time")
            codeGenerator.createNewFile(
                dependencies = Dependencies.ALL_FILES,
                packageName = "sample.demo",
                fileName = "File_$time"
            ).close()
    
            return emptyList()
        }
    e
    • 2
    • 15
  • e

    elihart

    10/28/2021, 8:36 PM
    I think I’m seeing variance handled incorrectly by KSP, but could use a sanity check. For the built in
    List<out T>
    it should be covariant, and javac processors view it that way, but KSP reports the argument as invariant. I have a repro using xprocessing. I don’t think it is a problem within xProcessing because the debugger shows the originating
    KSTypeImpl
    to have an invariant argument
    @Test
        fun testListVariance() {
            val libSource = Source.kotlin(
                "lib.kt",
                """
                class KotlinClass {
                    fun foo(list: List<CharSequence>) {}
                }
                """.trimIndent()
            )
            runProcessorTest(listOf(libSource)) { invocation ->
                val clazz = invocation.processingEnv.requireTypeElement("KotlinClass")
                val param = clazz.getDeclaredMethods().single().parameters.single()
    
                if (invocation.isKsp) {
                    expectThat(param.type.typeName.toString())
                        .isEqualTo("java.util.List<java.lang.CharSequence>")
                } else {
                    expectThat(param.type.typeName.toString())
                        .isEqualTo("java.util.List<? extends java.lang.CharSequence>")
                }
            }
        }
    j
    t
    • 3
    • 12
  • r

    russhwolf

    10/29/2021, 3:01 PM
    Is there a minimum supported gradle version for 1.0.1-RC? I've been getting sync errors using 7.0.2 but bumping to 7.2 seems to help.
    j
    • 2
    • 3
  • e

    elihart

    10/29/2021, 8:03 PM
    I think I’ve noticed a bug with deferred symbols. If I defer a property symbol (KSPropertySetterDescriptorImpl) it does not show up again in the next round when using
    getSymbolsWithAnnotation
    .
    j
    • 2
    • 16
  • g

    Grégory Lureau

    10/30/2021, 8:51 PM
    Hi, I've create a sample compiler + a KMP lib, testing with a sample project but I have an issue with KMP/JS : KSP don't find my annotated class, unless I duplicate the annotation from the lib to the KMP project (can be in commonMain or jsMain, both works for some reasons). Am I missing something in the project setup?
    j
    • 2
    • 10
  • v

    Vaios Tsitsonis

    11/01/2021, 5:44 PM
    is there a way to pass an option to ksp extension based on the results of a gradle task? 🤔
    e
    • 2
    • 7
  • e

    elihart

    11/01/2021, 9:29 PM
    I am seeing pretty bad performance in KSP compared to KAPT that is fairly concerning (version 1.5.31-1.0.0) I am just about done migrating Epoxy to support KSP via XProcessing (https://github.com/airbnb/epoxy/pull/1244) and took some time to benchmark ksp vs kapt via both gradle build scans and manual timing print statements in the processor. All of our processors now support both ksp and kapt, and I can switch between modes to compare them, but numbers are much worse on KSP for clean builds. Here are processors timings we manually logged for a clean build of one of our larger modules: Paris - 1100ms kapt , 3600ms ksp : 3.27x slower Epoxy - 675ms kapt , 4800ms ksp : 7.1x slower another in house processor - 375ms kapt , 1800ms ksp : 4.8x slower Even with taking kapt stub generation into account KSP does worse, when looking at gradle tasks. ksp mode: - :kspDebugKotlin 18.992s kapt mode: - :kaptDebugKotlin 5.652s - :kaptGenerateStubsDebugKotlin 3.814s I haven’t done any in depth profiling yet to know where this comes from - not sure if it would mainly be xprocessing or KSP itself. Room uses xprocessing though and claimed 2x speed increase so I’m curious if that is still correct or if maybe there was a regression? I believe we used to actually see better performance with KSP a few months ago
    y
    j
    t
    • 4
    • 33
  • a

    arnaud.giuliani

    11/02/2021, 11:17 AM
    Hi there, I’m the #koin project lead. Just to say that I’ve started to work on a ksp compiler for Koin (https://github.com/InsertKoinIO/koin/tree/ksp-compiler/compiler) and I have something starting to be stable enough, to soonly share it.
    🎉 13
    l
    • 2
    • 5
  • s

    salomonbrys

    11/03/2021, 9:21 AM
    Hey guys. I am having a weird problem. I have a SymbolProcessor that generates source files, which I use on a Multiplatform Project. When I run
    kspTestKotlinJvm
    (the SP is supposed to be applied on test sources), generation happens normally and
    build/generated/ksp/jvmTest/kotlin
    is properly populated. However, if I run
    kspTestKotlinJvm
    a second time (without changing anything), all generated files are removed and
    build/generated/ksp/jvmTest
    is left empty (which of course makes the compilation fail). I’ve tracked it down to this gradle configuration:
    sourceSets {
        val jvmTest by getting {
            kotlin.srcDir("build/generated/ksp/jvmTest/kotlin")
        }
    }
    So, the fact that I add the generated sources as a sourceset makes KSP remove them ?!?
    • 1
    • 1
  • z

    Zac Sweers

    11/03/2021, 5:34 PM
    Found what seems like a pretty significant bug for processors handling serialization of any sort - jvm modifiers from externally-compiled classes are not visible to subclasses in the current compilation https://github.com/google/ksp/issues/710
    y
    j
    t
    • 4
    • 22
  • p

    Paul Woitaschek

    11/04/2021, 7:38 AM
    I want to process all functions returning a
    kotlinx.coroutines.flow.Flow
    . When entering
    visitFunctionDeclaration
    is there any way to get the complete return type? (not only "Flow")? The only solution I have found so far is to call:
    function.returnType?.resolve()?.declaration?.qualifiedName?.asString()
    but that would force me to resolve just all functions which is documented as "expensive". Is there a way to do it without resolving all functions?
    e
    g
    +2
    • 5
    • 12
  • p

    Paul Woitaschek

    11/04/2021, 10:15 AM
    Ksp seems to delete my previous generated files when there is a change. In my module I have about 10 files that lead to 10 generated files. If I do a change in one of the file, one file is generated for it while the other 9 are deleted. Turns out that in
    process
    ,
    resolver.getAllFiles()
    is only returning the changed files. What can cause this?
    w
    • 2
    • 1
  • e

    elect

    11/05/2021, 2:49 PM
    anyone here is using KSP on Eclipse? I'd like to gather some feedbacks (I'm trying to port some code over to Gradle & KSP, but devs there are used with Eclipse..)
    b
    e
    • 3
    • 12
  • m

    Maik

    11/08/2021, 12:37 PM
    Hi all, I would like to examine the following property definition with ksp:
    @ClassID
    val classID: Long = 0x180
    I found the expression easily using
    getSymbolsWithAnnotation
    and was able to find out several things, such as the type of the property and its name. The only thing I could not determine was the actual value of the getter
    0x180
    . Is this possible in principle with ksp and how would one solve this problem? I would be grateful for any hints or advice on how to solve this!
    p
    • 2
    • 1
  • p

    Paul Woitaschek

    11/09/2021, 2:26 PM
    Found it! Just write the exact same file twice in ksp and it breaks :kspKotlinMetadata
    e
    • 2
    • 4
  • p

    Paul Woitaschek

    11/10/2021, 10:29 AM
    Whats the state of kapt-ksp interop? I use kotlin-inject to generate kotlin-inject components in our kmm project. I'd now like to utilize ksp to generate a delegating dagger component but that would bring up the need to run ksp before kapt. Is the order in which they run defined?
    g
    • 2
    • 2
  • p

    Paul Woitaschek

    11/10/2021, 11:28 AM
    And is it possible to define processor order? In the aforementioned task I like to generate code based on another processors code
    j
    • 2
    • 1
  • p

    Paul Woitaschek

    11/11/2021, 8:28 AM
    Is it possible to leverage ksp to generate non kotlin code? I'd like to leverage the symbol processing to generate swift files
    b
    e
    +2
    • 5
    • 31
Powered by Linen
Title
p

Paul Woitaschek

11/11/2021, 8:28 AM
Is it possible to leverage ksp to generate non kotlin code? I'd like to leverage the symbol processing to generate swift files
b

Big Chungus

11/11/2021, 9:16 AM
Can't see why not. Just write them via jvm File api
p

Paul Woitaschek

11/11/2021, 9:16 AM
But that breaks incremental things right? How would I know which files to delete and which ones to keep?
b

Big Chungus

11/11/2021, 9:17 AM
Oh you mean you want to fully replace some kotlin files with swift?
p

Paul Woitaschek

11/11/2021, 9:19 AM
No of cause not 😛 But right now when I generate a file based on a kotlin file and compile, the generated file gets created. When I now delete the originating file and compile, the generated file will also be deleted. But that step wouldn't happen when I just use the file api so dead generated files will be left I guess?
b

Big Chungus

11/11/2021, 9:21 AM
Just write a file to different dir not controlled by ksp. You can pass on the path via ksp gradle options
p

Paul Woitaschek

11/11/2021, 9:22 AM
But how would I know when to delete the file?
b

Big Chungus

11/11/2021, 9:22 AM
It won't. That's for you to manage either manually or with a gradle task
p

Paul Woitaschek

11/11/2021, 9:23 AM
But how could I possibly know that?
b

Big Chungus

11/11/2021, 9:24 AM
Keep your own cache during generation maybe? Could be as simple as storing a json map of kt sources ang generated swift files. Then at the end of each ksp task compare the new such map with previous one and clean up
In short, generate map during ksp, compare new map with cached one in your custom gradle task (or doLast {} block in ksp task), cleanip and move new map to cache
p

Paul Woitaschek

11/11/2021, 9:29 AM
But what would be in that map?
On incremental rounds, the ksp allFiles() will only contain the changed ones
b

Big Chungus

11/11/2021, 9:30 AM
{
  "path/to/source.kt": "path/to/geterated.swift"
}
☝️ 1
e

elect

11/11/2021, 10:10 AM
I used KSP the other day to generate plain java sources. The previous implementation was using Apache Velocity, Kotlin proved extremely nice
g

Grégory Lureau

11/11/2021, 1:23 PM
Why not just using CodeGenerator.createNewFile(Dependencies(false, false, listOf(“source.kt")), .., extensionName = "swift") ?
p

Paul Woitaschek

11/11/2021, 1:25 PM
Because that would put it in the kotlin sourceset?
g

Grégory Lureau

11/11/2021, 1:25 PM
Mmmh, from memory it goes into a resource directory
Not finding the documentation right now, but an extension ".kt" goes into /kotlin, ".java" into /java and anything else I suppose will go into /resources
Here's an example of associating not-kotlin files to one or multiple class declaration: https://github.com/google/ksp/blob/a38ac896fa80a659907485c02bfa688b7d79ca25/integr[…]es/incremental-classpath/validator/src/main/kotlin/Validator.kt
p

Paul Woitaschek

11/11/2021, 1:37 PM
Uh that might work!
It half works. It creates the files but then ksp crashes with:
> Task :lifecycle:kspKotlinMetadata FAILED
e: Source file or directory not found: /home/paul/repos/yazio/shared/lifecycle/build/generated/ksp/commonMain/kotlin
This is happening when only swift files are generated but no kotlin files for the module
e

elect

11/11/2021, 4:11 PM
open an issue, they are usually quite prompt to reply
p

Paul Woitaschek

11/11/2021, 4:11 PM
Will do 🙂
e

elect

11/11/2021, 4:11 PM
anyway, cool experiments Paul, keep us updated
g

glureau

11/11/2021, 4:54 PM
Is it because the kotlin directory is removed (not normal but known bug AFAIK) and you still have an explicit reference in your build.gradle on this directory?
p

Paul Woitaschek

11/11/2021, 5:20 PM
But what removes it?
g

Grégory Lureau

11/11/2021, 7:33 PM
I was thinking about this feedback, I experienced the same behaviour myself https://kotlinlang.slack.com/archives/C013BA8EQSE/p1635931295085600
p

Paul Woitaschek

11/19/2021, 7:34 AM
@elect
anyway, cool experiments Paul, keep us updated
Keeping you updated 😉 https://medium.com/@woitaschek/kotlin-native-using-swift-not-objective-c-d7742c040539
👏 2
g

Grégory Lureau

11/19/2021, 7:49 AM
Thanks ! Do you plan to open-source your tool? (I'm working on similar stuff from JS myself, and could be interested by this one too.)
p

Paul Woitaschek

11/19/2021, 7:51 AM
I don't believe that it would work on a one-library-fits-all level. It has many things specific to our language and also some exceptions for non generated code integration. Also this only works because all our data structures are immutable. If you would generate structs from mutable structures that would probably lead to unexpected behavior.
g

Grégory Lureau

11/19/2021, 8:01 AM
Exactly the same problem for JS, that's why I'm providing wrapper by defaults, so those forward everything (binding 2 ways, changing types in the middle)...
View count: 7