Closed norrisjeremy closed 1 year ago
FYI, it appears that using disabling classfile
type warnings (-Xlint:all,-classfile
) seems to workaround this issue.
Thanks for bringing this up, @norrisjeremy !
I'm reluctant to add compiler-annotations
as a full dependency, mostly because these annotations are supposed to be specific to compiling the class files/building the project. The fact that they get exported to users of the junixsocket library is actually undesired, but deemed acceptable.
How much of a problem is this to you, now that you have a workaround?
I'm asking because a proper fix is actually far from being straightforward (with including compiler-annotations
as a dependency not being an option at all).
Hi @kohlschuetter,
I think disabling the classfile
warnings will suffice for us, thanks!
Thanks, Jeremy
Describe the bug The
com.kohlschutter:compiler-annotations
needs to be declared as a full dependency, not just aprovided
scope dependency, else it leads to compiler warnings when-Xlint:all
is enabled, like this in downstream projects that use junixsocket:Guava faced a similar issue several years ago, see https://github.com/google/guava/issues/2721.
This happens because maven does not pull in a transient dependency for
com.kohlschutter:compiler-annotations
(since it is marked with as aprovided
scope dependency ofcom.kohlschutter.junixsocket:junixsocket-common
).This has forced us to explicitly declare a direct dependency on
com.kohlschutter:compiler-annotations
over at https://github.com/mwiede/jsch, since we enable-Xlint:all -Werror
in our javac flags.We would rather not have to declare an explicit dependency on
com.kohlschutter:compiler-annotations
since we aren't actually directly utilizing any of these annotations in the JSch code.To Reproduce
Expected behavior Project to compile successfully.
Output/Screenshots
Environment (please complete the following information):
Notes https://github.com/mwiede/jsch/blob/master/pom.xml#L96 https://github.com/mwiede/jsch/blob/master/pom.xml#L101 https://github.com/google/guava/issues/2721
Lastly, please make sure to test the problem still occurs on the latest version of junixsocket Yes, this occurs with current
2.6.2
release.