* Fix unique fields crashing when staticness mismatches an existing field
FixesSpongePowered/Mixin#576
* Fix mismatching mixin fields silently being dropped
Allowing them to be included will throw a VerifyError
The previous implementation gathers InjectionInfos for all annotated
methods in the target class, which after a previous injection means that
it'll see injected methods from unrelated mixins if they happen to
target the same class. This caused it to analyze foreign injections
without the proper refmap and mixin association.
Gson and Guava are both used in pre- and post-modular versions in
environments where Mixin is used on the module path, so we have to be
able to link against both in the compile-time module descriptor.
* Account for inheritance when testing for callback use
Fixes#68
* Log a bit less for the expected case
It's expected most of the time there won't be any children to check
* Remove troublesome check
It's the child which will certainly have the detached super
* Fix File/Memory leak in Annotation Processor.
Mixin's AP requires the minecraft jar + deps on the AP classpath to generate a refmap. These files are then opened by the classloader.
TargetMap uses Java's object Serialization to save/load itself from files. When doing so it gets placed into ObjectStreamClass.Caches, this does not get garbage collected enough to allow the Classloader to close, and thus close the file handles it has open.
This commit uses Gson to read/write TargetMap to prevent this class form being added to the global JVM cache.
* Manually build/read json structure
* Fix annotating fields with unique
Whilst other mixins are taken into account for making methods unique, fields previously did not
* Still compiling to Java 6
This allows the shadow task to apply its own merging logic for
resources that are validly duplicated, in this case service files
The checkstyle exclusion for module-info is moved from the
buildscript to checkstyle.xml, for application within IDEs, not just
Gradle.
A small fix to PrettyPrinter is included as well, based on a line
incorrectly converted from log4j2.