Thread
#arrow-meta
    thanh

    thanh

    3 years ago
    I have one question about the plugin, If I have a library that uses arrow-meta plugin, when an app uses my library, does it need to use arrow-meta as well?
    shikasd

    shikasd

    3 years ago
    It doesn't, as libraries are published as compiled artifacts. All the magic will be done before you publish the library 🙂
    raulraja

    raulraja

    3 years ago
    For most use cases it won’t but some meta plugins would encourage this. For example if you are defining
    @extension object Whatever: TypeClass<Whatever>
    and you users want call site automatic resolution they would need the plugin so we can scan their call sites. Kotlin compiler plugins are much more than kapt and codegen and is not limited to stubs since you can also alter body function resolution like the Typeclass plugin does.
    I think as a rule of thumb if you just plan on codegen then no, but if you want to provide compiler features for call sites you would need to since you would have to compile the user module with the plugin so call sites can be resolved by the compiler plugin and insert injections accordingly. Of course you don’t need to use it if you want on the call site a Kotlin vanilla experience that just consumes the generated code. For example the optics plugin would be like this since it would just generate codegen for a companion for the most part
    thanh

    thanh

    3 years ago
    thanks, it's clear now 👍