We are happily using micrometer 1.1.1 from Scala 2.12.8. Everything runs fine except that we get the following compile error:
[warn] While parsing annotations in /...https/repo1.maven.org/maven2/io/micrometer/micrometer-core/1.1.0/micrometer-core-1.1.0.jar(io/micrometer/core/lang/Nullable.class), could not find MAYBE in enum <none>.
[warn] This is likely due to an implementation restriction: an annotation argument cannot refer to a member of the annotated class (scala/bug#7014).
[warn] one warning found
Of course it looks like a bug in the scala compiler and might not be related to this project I was just wondering if we can still fix it somehow in micrometer of it makes sense to do that? I would be willing to help with a PR if any hints into the right direction could be given.
@fkoehler I don't have much expertise on Scala but looking into it a bit, Scala doesn't seem to ignore missing meta-annotated classes when it's used on return types (it seems okay when it's used on parameters) unlike Java. Micrometer's @Nullable implementation is the same as the implementation of the Spring framework. So if you use StringUtils.quoteIfString() from the Spring framework, you will see the same warning.
It's a warning, not an error, so you can simply ignore it or if it bothers you, you can add the following optional dependency as a workaround:
libraryDependencies += "com.google.code.findbugs" % "jsr305" % "3.0.2" % Optional
Someone who is a Scala developer might give you a better advice.
FTR there's the same question on the StackOverflow: https://stackoverflow.com/questions/50881031/while-parsing-annotations-could-not-find-maybe-in-enum-none-scala-micromete
I have tried adding the dependency and it works, the warning goes away. Thanks.
Most helpful comment
I have tried adding the dependency and it works, the warning goes away. Thanks.