Arrow: Exception when running arrow core extensions ans arrow effects reactor extensions

Created on 4 May 2020  路  4Comments  路  Source: arrow-kt/arrow

Hello,

I am using the monadic comprehensions in my project with reactor, however the binding are not working. It compiles but when running the application it does not work. I get the following error:

java.lang.NoSuchMethodError: arrow.effects.reactor.extensions.FluxKMonad.binding(Lkotlin/jvm/functions/Function2;)Larrow/Kind;
at arrow.effects.reactor.extensions.fluxk.monad.FluxKMonadKt.binding(FluxKMonad.kt:189) ~[arrow-effects-reactor-extensions-0.9.0.jar:na]

I guess it is because of the versions of arrow-kt and arrow core extensions and arrow effects reactor extensions. I cannot find new versions of the last two projects.

Can you give me hints to fix my issue?

Thanks in advance!

    <dependency>
        <groupId>io.arrow-kt</groupId>
        <artifactId>arrow-core</artifactId>
        <version>0.10.4</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/io.arrow-kt/arrow-core-extensions -->
    <dependency>
        <groupId>io.arrow-kt</groupId>
        <artifactId>arrow-core-extensions</artifactId>
        <version>0.9.0</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/io.arrow-kt/arrow-effects-reactor-extensions -->
    <dependency>
        <groupId>io.arrow-kt</groupId>
        <artifactId>arrow-effects-reactor-extensions</artifactId>
        <version>0.9.0</version>
    </dependency>

Most helpful comment

Thank you @pakoito , @PhBastiani and @rachelcarmena!
Your comments were really helpful. I solved the issue by using the same version in all the arrow dependencies. I just realized after your comments that the extensions project was renamed to fx.
I am waiting for the BOM file feature!

Great community! Keep the good work!

All 4 comments

You're pulling two incompatible version of arrows, see that they aren't on the same semver. Update to 0.10.5 where you can!

Reactor extensions can be found on mavencentral : https://mvnrepository.com/artifact/io.arrow-kt/arrow-fx-reactor

Arrow Core Extensions can be found here : https://mvnrepository.com/artifact/io.arrow-kt/arrow-core

The artifacts have been renamed

As a note about next features and thanks to #2129 by @ps-feng, BOM file was introduced in #2131 so it will be possible to avoid this problem when maintaining the version in just one place:

  <!-- Import BOM file with the desired Arrow version -->
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.arrow-kt</groupId>
        <artifactId>arrow-stack</artifactId>
        <!-- Just available for latest SNAPSHOT right now -->
        <version>0.11.0-SNAPSHOT</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <!-- Arrow dependencies won't need the version -->
  <dependencies>
    <dependency>
      <groupId>io.arrow-kt</groupId>
      <artifactId>arrow-core</artifactId>
    </dependency>
    <dependency>
      <groupId>io.arrow-kt</groupId>
      <artifactId>arrow-fx-reactor</artifactId>
    </dependency>
  </dependencies>

It will be available from the next RELEASE version :+1:

Thank you @pakoito , @PhBastiani and @rachelcarmena!
Your comments were really helpful. I solved the issue by using the same version in all the arrow dependencies. I just realized after your comments that the extensions project was renamed to fx.
I am waiting for the BOM file feature!

Great community! Keep the good work!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lgtout picture lgtout  路  4Comments

1Jajen1 picture 1Jajen1  路  3Comments

JLLeitschuh picture JLLeitschuh  路  4Comments

gortiz picture gortiz  路  3Comments

pakoito picture pakoito  路  4Comments