`mimaExcludeAnnotations` doesn't work with `object`s
lolgab opened this issue ยท 8 comments
Since the implementation seems the same as Sbt Mima, my best guess is that there is some dependency clash that creates it.
The next thing I'm going to try is to run the tool from an insulated classloader.
Edit
Blocked by lightbend/mima#689
This might be related to
Also, once you isolate the MiMa classloader from Mill, you need to provide some other way to configure exclusions.
I'm replicating the MiMa classes instances here and make the same API available (except for the mima imports).
Let's see how it goes.
Moved to a separate classloader #42 but the problem persists.
Then I reproduced the problem in sbt, so it is not a bug in the mill plugin.
millExcludeAnnotations
doesn't work with object
s but only with class
es
Oh, ok. Is this something not possible or is it just a missing feature from MiMa? Any links?
Lots of work to find out, but at least, it is not for nothing. Having MiMa as a worker will keep the Mill classloader lighter and allows for easier MiMa version bumps (without new mill-mima releases). ๐
Yes, I like the classloader change either way :-) I think we should make it easier to write plugins with the implementation in a separate classloader so it can become the new default.
About the Mima bug, I couldn't find anything, so I'm opening one right now.
Some of my annotations which I think were ignored were on def
s in trait
s. The annotations were scala.annotation.StaticAnnotation
. I don't know if this is visible enough for MiMa, or if they need to be written in Java. I didn't find any info about that.
I think StaticAnnotation
s are fine because tests use them, but maybe trait
s aren't supported as well as object
s.
Also the annotation should be present already in the previous version, adding it at a later point doesn't work.
Thanks for these information.