Nathan Bedell

    Nathan Bedell

    9 months ago
    Hello. Does anyone have any examples they could point me to for a gradle project (either groovy or .kts) making use of the arrow proofs plugin? I understand it is not yet released just yet -- but I wanted to try it out for myself before then in some of my projects. I know there are tests showing how the plugin is used in the arrow-meta repository, but I am trying to figure out how to use the plugin in an actual standalone gradle project.
    simon.vergauwen

    simon.vergauwen

    9 months ago
    Here you can see how I consume the Arrow Optics Plugin: https://github.com/arrow-kt/Arrow-MPP-Template/compare/arrow-optics-plugin?expand=1
    I haven’t tried the proofs one yet, but it should be possible to try in this way
    Nathan Bedell

    Nathan Bedell

    9 months ago
    @simon.vergauwen thanks, I think I pretty much did the same thing with the proofs plugin, but I'll try it again first with the template and see if I can get it to work there. At first glance, I think there may have been a Kotlin version incompatibility when I tried before (I was not on 1.6).
    simon.vergauwen

    simon.vergauwen

    9 months ago
    Oh yes, that was probably the issue. You need to use the same compiler version as Arrow Meta, since the compiler API will only be stable in 1.7.x. It’s a similar limitation as Jetpack Compose.
    Nathan Bedell

    Nathan Bedell

    9 months ago
    1.5.31-SNAPSHOT should be compatible with Kotlin 1.5.31, right? For the project I'm most interested in, unfortunately, I'm stuck on that Kotlin version (actually, due to compose!)
    Looks like the compiler plugin is working now, thanks!
    It does seem like (at least in the 1.5.31 snapshot)
    @Given
    annotations have issues with unresolved references (i.e. not using fully qualified names or the right imports) in the compiler generated code. If this is not a known issue, or has not already been resolved, let me know, and I'd be happy to open up a ticket.
    Also, I guess I should ask in general: At this stage in development of the proofs plugin, would it be helpful for me to open tickets for any issues I run into using the latest snapshots?
    simon.vergauwen

    simon.vergauwen

    9 months ago
    cc\ @raulraja
    raulraja

    raulraja

    9 months ago
    Hi @Nathan Bedell, It’s going to change based on what Multiple Context receivers end up looking in Kotlin but feel free to create any issues and if you want to help with them I’ll be happy to show you where they may be fixed. @Javier and I are planning on putting some time on it at some point before we release.