micronaut-projects / micronaut-core

Micronaut Application Framework
http://micronaut.io
Apache License 2.0
6.05k stars 1.06k forks source link

Reactive modules no longer resolvable from Micronaut version catalog #7523

Closed graemerocher closed 2 years ago

graemerocher commented 2 years ago

Expected Behavior

Importing the Micronaut Version Catalogu and using mn.rxjava2 should resolve like in the Micronaut 3.4.x but this commit broke it https://github.com/micronaut-projects/micronaut-core/commit/ff52b313b2622852dee11d97a1342e2c61c3ef49

Also applies to mn.reactor, mn.rxjava3 etc.

Actual Behaviour

* What went wrong:
[57](https://github.com/micronaut-projects/micronaut-tracing/runs/6651567986?check_suite_focus=true#step:8:58)
An exception occurred applying plugin request [id: 'io.micronaut.build.internal.docs']
[58](https://github.com/micronaut-projects/micronaut-tracing/runs/6651567986?check_suite_focus=true#step:8:59)
> Failed to apply plugin class 'io.micronaut.build.docs.JavadocAggregatorPlugin'.
[59](https://github.com/micronaut-projects/micronaut-tracing/runs/6651567986?check_suite_focus=true#step:8:60)
   > A problem occurred configuring project ':tra***ng-bom'.
[60](https://github.com/micronaut-projects/micronaut-tracing/runs/6651567986?check_suite_focus=true#step:8:61)
      > A problem occurred configuring project ':tra***ng-core'.
[61](https://github.com/micronaut-projects/micronaut-tracing/runs/6651567986?check_suite_focus=true#step:8:62)
         > A problem occurred evaluating project ':tra***ng-core'.
[62](https://github.com/micronaut-projects/micronaut-tracing/runs/6651567986?check_suite_focus=true#step:8:63)
            > Could not get unknown property 'rxjava2' for extension 'mn' of type org.gradle.accessors.dm.LibrariesForMn.
[63](https://github.com/micronaut-projects/micronaut-tracing/runs/6651567986?check_suite_focus=true#step:8:64)

[64](https://github.com/micronaut-projects/micronaut-tracing/runs/6651567986?check_suite_focus=true#step:8:65)
* Try:

Steps To Reproduce

Import the 3.5.0 version catalog and use mn.rxjava2

Environment Information

No response

Example Application

No response

Version

3.5.0

graemerocher commented 2 years ago

Also broken in Reactor, RxJava 3 etc.

graemerocher commented 2 years ago

we should probably review if other modules have broken the catalog as well.

/cc @melix @timyates

melix commented 2 years ago

For reference, this is how modules should be defined so that we properly inline entries: https://github.com/micronaut-projects/micronaut-rxjava2/pull/87

When migrating a module, we must make sure that all entries which are currently in the Micronaut BOM have an equivalent entry (with the same alias name) in the modules. Then when we import the module BOM in the catalog, we automatically inline those entries, avoiding breaking changes.

sdelamo commented 2 years ago

cc @timyates

timyates commented 2 years ago

@sdelamo Sorry, missed this one with my vacation 😢

The fix from @melix wasn't released https://github.com/micronaut-projects/micronaut-rxjava2/releases/tag/untagged-487a2c754a5c4ac81093 and I guess now we should target the 3.6.x branch as we're not going to see another 3.5.x? And switch this to 1.3.0?

Comparing the 3.6.x Catalog to the 3.4.x one, I can see we also are missing:

I will get the liquibase one added in, but @graemerocher what should we do with the 2 that have been renamed? The new names seem more sensible, but I realise this doesn't help with compatibility.

timyates commented 2 years ago

I will check 3.6.0 again once the above are in ☝️

timyates commented 2 years ago

With 3.6.0-SNAPSHOT, I can successfully switch back micronaut-tracing to

--- a/tracing-core/build.gradle
+++ b/tracing-core/build.gradle
@@ -14,7 +14,7 @@ dependencies {
     compileOnly libs.kotlinx.coroutines.reactor

     testImplementation mn.reactor
-    testImplementation "io.reactivex.rxjava2:rxjava"
+    testImplementation mn.rxjava2
     testImplementation mn.micronaut.rxjava2.http.client
     testImplementation mn.micronaut.reactor.http.client

Closing this as done