Commit Graph
868 Commits
Author SHA1 Message Date
Chocohead e2c9aa449c Fix unique fields conflicting where they shouldn't (#92)
* Fix unique fields crashing when staticness mismatches an existing field

Fixes SpongePowered/Mixin#576

* Fix mismatching mixin fields silently being dropped

Allowing them to be included will throw a VerifyError
2023-02-13 15:15:56 +00:00
Chocohead f466542370 Auto-prefix mod handlers & unique annotated methods (#97)
Aims to avoid double prefixing where a mod has correctly prefixed already
2023-02-13 15:15:29 +00:00
Chocohead 3bb4cbfaf8 Fix injectors without groups being retained (#99)
Avoids leaking memory after a mixin has been applied
2023-02-13 15:15:00 +00:00
modmuss50 515e6a2d74 Bump the correct version.
Previous build was removed from maven.
2022-05-03 19:15:05 +01:00
modmuss50 455666deb7 Bump version. 2022-05-03 19:09:21 +01:00
Jared 350bf5adcb Rename mixin target mapid system property to fix clashes (#88)
Fabric mixin stores data in a different format than Sponge mixin expects, leading to clashes when both try to read and write to the same file.
2022-05-03 19:08:45 +01:00
Player 20b3cd9036 Bump version 2022-04-01 13:20:04 +02:00
Player 599fd57a15 Add system properties to bypass ServiceLoader mixin service discovery.
Workaround for https://github.com/SpongePowered/Mixin/issues/569
2022-04-01 11:19:31 +00:00
Player a699d81c1e Generalize mod context printing to cover more cases 2022-04-01 11:19:20 +00:00
modmuss50 59d5af0ee7 Bump version. 2022-02-11 16:47:42 +00:00
Player a7ea7a5b35 Fix invalid cross-mixin interaction in interface applicator preparation. (#83)
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.
2022-02-11 16:47:21 +00:00
modmuss50andshedaniel 0e1bace9a8 Work around https://github.com/SpongePowered/Mixin/issues/560
Co-authored-by: shedaniel <[email protected]>
2022-01-31 20:15:34 +00:00
modmuss50 a9b3e66eea Bump version 2022-01-28 14:32:36 +00:00
modmuss50 63837a0952 Update gradle 2022-01-28 14:14:49 +00:00
shedaniel 345e73663c Fix FabricMC/Mixin#80 2022-01-18 19:50:56 +00:00
modmuss50 03b0b8f571 Merge remote-tracking branch 'SpongePowered/0.8.5'
# Conflicts:
#	build.gradle
#	gradle.properties
#	src/ap/java/org/spongepowered/tools/obfuscation/AnnotatedMixin.java
#	src/ap/java/org/spongepowered/tools/obfuscation/AnnotatedMixinElementHandlerInjector.java
#	src/ap/java/org/spongepowered/tools/obfuscation/AnnotatedMixins.java
#	src/ap/java/org/spongepowered/tools/obfuscation/ObfuscationEnvironment.java
#	src/ap/java/org/spongepowered/tools/obfuscation/ReferenceManager.java
#	src/ap/java/org/spongepowered/tools/obfuscation/mapping/common/MappingWriter.java
#	src/ap/java/org/spongepowered/tools/obfuscation/service/ObfuscationServices.java
#	src/main/java/org/spongepowered/asm/launch/platform/MainAttributes.java
2021-12-13 16:18:54 +00:00
Mumfrey 155314e6e9 Mixin 0.8.5 RELEASE 2021-12-01 20:33:17 +00:00
Mumfrey a396db8cd1 Update checkstyle 2021-12-01 20:25:07 +00:00
Mumfrey a40e4bc59a Move potemkin generator to buildSrc and switch to groovy 2021-12-01 19:30:51 +00:00
Mumfrey b47627fd01 Merge remote-tracking branch 'origin/pr/538' into 0.8.5 2021-12-01 18:23:59 +00:00
zml 8cd66d8241 build: Synthesize modules to link with multiple versions of libraries
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.
2021-12-01 08:15:18 -08:00
Player f81f94c3a7 Bump version 2021-11-30 12:39:04 +01:00
Mumfrey 1a328c339d Fix handling of UNC paths when converting from URI to File, fixes #534 2021-11-17 21:22:04 +00:00
modmuss50 21b9d4714f Fix crash when running on UNC (windows) network share.
See: https://bugs.openjdk.java.net/browse/JDK-8178726
2021-11-12 16:44:51 +00:00
modmuss50 f49c13481b Update gradle.properties 2021-11-05 15:03:16 +00:00
Player 1cccdecaf7 Add mod id to another kind of prepare/apply error message 2021-11-05 12:11:43 +00:00
Chocohead f6722f4f29 Fix package-private mixin inheritance
Back at it again trying to fix #68
2021-11-05 12:11:28 +00:00
Mumfrey 1e1aa7fb52 Resolve anonymous inner classes in AP via classpath + ASM where possible
Fixes #518
2021-11-04 20:33:03 +00:00
Mumfrey a9581dd7d9 Remove switch on string 2021-11-01 22:24:02 +00:00
modmuss50 20d9184f4c Update gradle.properties 2021-10-30 21:30:06 +01:00
modmuss50 02d368a219 Don't append to existing json files when writing TargetMap to disk. Fixes #72 2021-10-28 22:21:04 +01:00
Chocohead a63d9f6fda Try warning for likely failed interface shadows (#71)
If a final field has a constant primitive value, said value will probably be used rather than referencing the shadowed field
2021-10-28 22:18:43 +01:00
Chocohead 8e78d31487 Account for name mangling when finding callback overrides (#70)
Fixes #68 a bit better
2021-10-28 22:18:36 +01:00
modmuss50 d30763c433 Bump version 2021-10-24 18:53:12 +01:00
Chocohead e992480867 Account for inheritance when testing for callback use (#69)
* 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
2021-10-20 19:56:55 +00:00
Mumfrey 812bfcc811 Enhanced AP messaging, detect IDEA, support configurable message levels 2021-10-16 13:24:30 +01:00
modmuss50 35e33e46cc Bump version 2021-10-16 12:20:32 +01:00
modmuss50 87f48a945c Fix File/Memory leak in Annotation Processor. (#67)
* 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
2021-10-16 12:17:12 +01:00
Player a9683d9a88 Fix LOAD slice only when not running in compat mode 2021-10-10 18:46:17 +00:00
Mumfrey 8dbd876225 Bump version to 0.8.5-SNAPSHOT 2021-09-08 17:13:08 +01:00
modmuss50 6f9accb5a0 Fix proguard stripping enum values 2021-09-08 13:36:14 +01:00
Chocohead ed00253bda Fix annotating fields with @Unique (#64)
* 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
2021-09-08 12:39:11 +01:00
Chocohead 65d0d66a93 Allow shadow fields in interfaces (#63)
* Allow shadow fields in interfaces

A bit of a niche use case but apparently one people want

* Missed a tab
2021-09-08 12:39:04 +01:00
modmuss50 24faba3496 Work around #518 (#65) 2021-09-08 11:32:46 +01:00
modmuss50 b7c9b81b04 Merge remote-tracking branch 'SpongePowered/0.8.4'
# Conflicts:
#	build.gradle
#	gradle.properties
2021-09-07 21:59:34 +01:00
Mumfrey 2accda5000 Mixin 0.8.4 RELEASE 2021-09-07 18:49:11 +01:00
Mumfrey c9586f548e Use static module requires because JPMS is just awful 2021-09-06 18:27:28 +01:00
Mumfrey e10ac704e1 Numbers are hard, typing version numbers doubly so... apparently. 2021-09-06 18:27:02 +01:00
Mumfrey 9b3b4819cd Merge remote-tracking branch 'origin/pr/520' 2021-09-01 16:11:06 +01:00
zml 87b36f6707 Adjust modularity build configuration to avoid duplicate sources
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.
2021-08-30 22:53:08 -07:00