-
Notifications
You must be signed in to change notification settings - Fork 344
Identical packages in opentracing-api and opentracing-noop cause build failure with JDK 9 + jigsaw #145
Comments
This fixed this problem in my current dependency - 0.21.0 (release-0.21.0 tag) |
Agree that @kratz74 do you have steps to reproduce your build? |
bugSample.zip |
Added PR against temporary fork in my workspace. I'll delete this fork when this is merged. @bhs here it is
Edit: Now tested against patched 0.30.1-SNAPSHOT and build passed. |
@kratz74 thanks for submitting #150 I agree that noop should ideally live in a separate package. I am wondering whether there are other solutions to this (as it will be breaking change). I will have a closer loot tomorrow.
confirmed it does not build with provided configuration. |
Jigsaw does not allow same package name in two or more modules. So I guess only reasonable option is to rename one of the packages as #150 suggests. Note: When two modules has same package and both exports it and other module reads them, it fails at compile time (your case). |
Maven dependency on opentracing-util required to use GlobalTracer.get() introduced transitive dependency on opentracing-noop and opentracing-api.
Unfortunately both opentracing-noop and opentracing-api contains the same package "io.opentracing" and this causes error in JDK 9 + jigsaw projects containing module-info.java.
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] module <module_name> reads package io.opentracing from both opentracing.api and opentracing.noop
[ERROR] module reads package io.opentracing from both opentracing.noop and opentracing.api
[ERROR] module opentracing.api reads package io.opentracing from both opentracing.noop and opentracing.api
[ERROR] module opentracing.util reads package io.opentracing from both opentracing.noop and opentracing.api
[ERROR] module opentracing.noop reads package io.opentracing from both opentracing.noop and opentracing.api
It would be good to rename "io.opentracing" package in opentracing-noop to something like "io.opentracing.noop"
The text was updated successfully, but these errors were encountered: