Commit Graph
1041 Commits
Author SHA1 Message Date
LlamaLad7 12167db076 Refactor: Don't special case synthetic inner classes.
This was a very strange exception to have in the first place, and the default path works fine.
Notably, you are also allowed to have enums inside Mixins, in which case those would be given different names for each target class and therefore any switch tables referencing them are *not* safe to share.
2026-01-16 20:57:13 +00:00
LlamaLad7 f982c2f933 Fix: Transform field refs to inner classes 2026-01-16 20:57:13 +00:00
modmuss50 549a0cc93c Exclude guava and gson from maven POM as we shade + repackage them. 2025-12-26 12:25:03 +00:00
LlamaLad7 7a217991db Bump version 2025-12-22 14:51:42 +00:00
Finn Radesandjoe 41a0eadd18 Use actual parameter names instead of generic 'argN' names (#191)
* Fix: Use actual parameter names instead of generic 'argN' names

* Address review https://github.com/FabricMC/Mixin/pull/191#pullrequestreview-3552070215

* De-dupe code

* Implement review

* Address review

* Address review

---------

Co-authored-by: joe <[email protected]>
2025-12-22 14:50:46 +00:00
LlamaLad7 10af73058a Improvement: Only check for final method overrides if debug.verify is enabled.
The verifier will catch this anyway, this just gives us a better error which blames the particular mixin, but it's very expensive to check so best avoided in the default case.
2025-10-11 22:38:55 +01:00
LlamaLad7 b0be3b2550 Improvement: Check inner class visibility without using ClassInfos.
The semantics of staticness are likely not identical, but I haven't been able to find a case where they differ. The old one is horribly heuristic anyway.
2025-10-11 22:38:55 +01:00
LlamaLad7 9f8bc5fdce Improvement: Remove warning for string-targeted public classes.
This can be expensive to compute since it requires loading ClassInfos for outer classes, and it is a useless warning anyway which only worsens logspam.
2025-10-11 22:38:55 +01:00
LlamaLad7 2c6ea1834e Fix: Use null as a proper ClassInfo cache value. 2025-10-11 22:38:55 +01:00
LlamaLad7 292070a378 Improvement: Avoid ClassInfo lookups wherever possible without changing behaviour. 2025-10-11 22:38:55 +01:00
LlamaLad7 a3cd81528f Fix: Respect injection point specifier with shift. (#187)
Gated since this is technically breaking.
2025-10-08 11:37:11 +01:00
LlamaLad7 76b38b8a2a Improvement: Avoid reflection in Bytecode opcode name utils. (#186) 2025-10-03 19:36:57 +01:00
cputnam-a11yandcputnam-a11y 5250ed3069 Close resource streams for mixin configs. (#185)
* Close resource streams for mixin configs.

* Close resource streams for mixin configs.

* Simplify

* Remove Unneeded changes & Import

---------

Co-authored-by: cputnam-a11y <[email protected]>
2025-10-03 12:45:38 -04:00
modmuss 5c563d94c8 Bump version 2025-08-26 13:23:41 +01:00
Luke Bemish c958aaa96d Add module version to compiled module-info (#184) 2025-08-26 13:23:13 +01:00
LlamaLad7 776597b002 Merge pull request #182 from vfyjxf/main
fix java8 interface mixin
2025-08-23 17:41:31 +01:00
vfyjxf_ 03b0312177 update code from upstream correctly 2025-08-17 07:38:40 +08:00
vfyjxf 129d9d4083 fix java8 interface mixin 2025-08-16 14:16:12 +08:00
Player baf5b4dac6 Bump version 2025-07-27 14:09:40 -04:00
Player da648eae8d Fix enum MixinEnvironment.Option parsing always using the default (#157)
* Fix enum MixinEnvironment.Option parsing always using the default

* Incorporate Chocohead's suggestion
2025-07-27 14:09:02 -04:00
LlamaLad7 da718519e2 Merge pull request #158 from Player3324/reflectClassInfo
Analyze jdk classes through reflection instead of asm
2025-07-27 12:51:34 +01:00
modmuss c09f39457c Bump version 2025-07-26 15:43:02 +01:00
Luke Bemish de008c2c4d Allow querying whether classes could be transformed by mixin (#176)
* Initial attempt at exposing will-be-transformed-ness of classes via mixin

* Use mixin environment properly

* Fix some ordering

* Make processingCouldTransform default true and log error

* Simplify logic slightly

* Address feedback, sans checkstyle

* Hopefully fix checkstyle

* Log class name as well

* Address feedback

Require that environment passed to `couldTransformClass` be current, and integrate check before `ClassNode` creation in `transformClass` that takes bytes.

* Use locking logic from applyMixins to avoid reentrance issues

* Extract common locking logic

* Add optional byte argument to couldTransform checks

* Revert "Add optional byte argument to couldTransform checks"

This reverts commit 925fa612d02c1001faf54ba6648ccdea6c12b762.

* Revert "Extract common locking logic"

This reverts commit 155fe1568944f72f710ff6895a67b823219378ec.

* Extract common locking logic, but nicer

* Shift around to reduce diff

* Remove unnecessary changes

* Remove more unnecessary format changes

* Update log message to match method name
2025-07-26 15:42:15 +01:00
PlayerandLlamaLad7 a64ce0d7cc Populate class nesting information
Co-authored-by: LlamaLad7 <[email protected]>
2025-07-01 11:52:59 -04:00
modmuss 9f04e07bd0 Bump version 2025-07-01 11:12:16 +01:00
modmuss d628b14f39 Bump version 2025-07-01 11:02:54 +01:00
modmuss 95a00eda6b New Maven Central publishing (#175)
* New Maven Central publishing

* Only Java 21
2025-07-01 11:02:14 +01:00
modmuss 4d0e1dfd9a Update to Gradle 8.14 (#174) 2025-07-01 09:47:57 +01:00
LlamaLad7 5334af3f15 Fix: Synchronize methods in MixinTransformer.
Fixes #166.
Previously `ClassInfo`s were used unsynchronized when writing classes.
2025-06-22 16:19:54 +01:00
modmuss50 fe482da742 Fix typo. 2025-06-18 17:13:26 +01:00
modmuss b205f54956 Add new Java versions (#170) 2025-06-18 12:20:32 +01:00
sschr15 0d455742b9 Fix assuming annotation values were keys (#168) 2025-06-18 09:43:04 +01:00
joe 7c7eac3a70 Don't initialize classes in mixin audit 2025-06-17 22:32:23 +01:00
LlamaLad7 26c8d9c12b Fix: Pass binary class name from agent to transformer.
The transformer expects binary names and internal format ones can cause unexpected behaviour in several places.
2025-01-23 17:35:21 +00:00
Player cfe821a9df Bump version 2024-11-24 15:11:39 -05:00
Geolykt 3b77b68c30 Allow @Desc to match field instructions 2024-11-24 16:49:53 +00:00
LlamaLad7 1c695238c3 Fix: Rework bridge method merging.
The previous implementation did not properly handle pseudo-instructions, sometimes leading to unnecessary mismatches.
2024-11-24 16:47:21 +00:00
LlamaLad7 c516fb7d3f Fix: Properly handle arrays when checking if members are owned by mixins.
No longer throws when a method call is on an array.

Closes #147
2024-10-30 15:11:44 +00:00
modmuss 0b6875f972 Bump version 2024-10-26 18:48:36 +01:00
IThundxr ec76ae4da5 Fix L being dropped from @Shadow's (#154)
Fixes #134
2024-10-26 18:47:48 +01:00
Player 1d7fff6e64 Analyze jdk classes through reflection instead of asm 2024-09-20 14:23:27 -04:00
modmuss c0676344c4 Bump version 2024-09-03 09:12:51 +01:00
LlamaLad7 c3e6d66002 Fix: Fix interface injector visibility checks. (#156)
`InjectionInfo.parse` can be very expensive and in the case of some MixinExtras features is not pure.
The correct approach would be to use `InjectionInfo.getInjectorAnnotation`, but the override is no longer needed anyway since we only support Java 8+ so Mixin will already make injector methods private and synthetic.
Except, Mixin does it based on the current `COMPATIBILITY_LEVEL`, which is wrong, because we could be on JAVA_17 and yet a class compiled with JAVA_8 had no choice but to use public methods.
The original implementation was also incomplete because it forgot about default methods.
2024-09-03 09:12:09 +01:00
LlamaLad7 adcd9526d2 Fix: Rewrite argMap allocation algorithm.
The old one did not properly account for discontinuities in the list, leading to double-width types clobbering meaningful locals and causing mysterious VerifyErrors.
2024-08-30 12:04:41 +01:00
LlamaLad7 023e393348 Build: Bump version. 2024-08-15 12:18:01 +01:00
LlamaLad7 4254da4433 Revert "Compat: Gate NEW descriptor filtering." 2024-08-15 11:55:59 +01:00
LlamaLad7 2307a333b0 Revert "Fix: Fix NEW descriptor gating."
This reverts commit 74a1696d99.
2024-08-15 11:51:36 +01:00
modmuss a4aaaa92c6 Bump version 2024-08-13 08:40:50 +01:00
LlamaLad7 81284c8401 Fix: Remove incorrect PUTFIELD owner check when inspecting initialisers.
These will never match because the LHS is the mixin name and the RHS is the target name.
This restores the 0.8.5 behaviour which does not check the owner at all.
We have never supported assignment expressions in initialisers until now anyway, and even if we check the owner we cannot determine whether the instruction is operating on the current *instance* without proper static analysis, so IMO there's not much point bothering.
2024-07-19 18:42:45 +01:00
LlamaLad7 74a1696d99 Fix: Fix NEW descriptor gating.
Bafflingly, Mixin fails to match a `NEW` instruction whose `<init>` call is outside the slice range, *iff the user specified a descriptor*.
I'm even more surprised that a mod relied on this.
Fixes #152.
2024-07-19 18:40:44 +01:00