Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixins 0.8.7 #5

Merged
merged 92 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
ad1d110
Bump version to 0.8.6-SNAPSHOT
Mumfrey Dec 1, 2021
45856b4
Replace guava deleteRecursively with internal version for guava compat
Mumfrey Dec 4, 2021
a60200d
Restore compat with ASM 5.0.3 by dynamically creating ClassRemapper
Mumfrey Dec 4, 2021
89acb83
Prioritise TypeHandleASM when it is available.
LlamaLad7 Jul 24, 2022
1cec8b1
AP: Fix several cases of ASM TypeHandles breaking code that relies on…
LlamaLad7 Feb 13, 2023
2e4bf96
Fix resolution of upper bounds of intersection types.
LlamaLad7 Jul 24, 2022
be3b94d
AP: Skip superclass validation for imaginary and simulated targets.
LlamaLad7 Feb 16, 2023
ebc72cf
AP: Improve validation of mixin superclasses.
LlamaLad7 Feb 16, 2023
74c25d2
AP: Fix and simplify checking of factory invoker return types.
LlamaLad7 Feb 24, 2023
d633516
Bump AP to Java 8.
LlamaLad7 Aug 12, 2023
1edd5f1
Fix NPE when resolving fields in `TypeHandleASM`.
LlamaLad7 Aug 12, 2023
a40c96a
Rely on the ML-Specification version present in the ModLauncher envir…
shartte Jan 7, 2024
9e8af15
Style fixes
shartte Jan 8, 2024
e02f4ca
Refactoring cherry-pick from 0.8.6-dev for target selectors
Mumfrey Jan 21, 2024
5aa23b5
Update to register VirtualJar for synthetic classes
Mumfrey Jan 21, 2024
7a3cd42
Update ASM and add support for inject into constructor
Mumfrey Jan 21, 2024
f695176
Track source of mixin configs and use source id in conformed names
Mumfrey Jan 21, 2024
d5fc662
Add support for injectors in interface mixins
Mumfrey Jan 21, 2024
3104a5b
Revert method change which breaks MixinExtras
Mumfrey Jan 21, 2024
6948758
Merge remote-tracking branch 'origin/pr/638'
Mumfrey Jan 21, 2024
41a6885
Merge remote-tracking branch 'origin/pr/657'
Mumfrey Jan 21, 2024
3c8c913
Fix checkstyle and stale imports
Mumfrey Jan 24, 2024
738638f
Fix: Strip synthetic LVT entries after exporting. (#135)
LlamaLad7 Apr 3, 2024
eb44a33
Set maven pom name
modmuss50 Apr 3, 2024
989efeb
Bump version
modmuss50 Apr 3, 2024
a209179
Fix indent
modmuss50 Apr 3, 2024
320b74c
Fix: Reset Unique field counters on Mixin application. (#136)
LlamaLad7 Apr 11, 2024
ba80661
Bump version
modmuss50 Apr 12, 2024
e779303
Use 0 as class reader flags in Modlauncher bytecode provider (#137)
Su5eD Apr 16, 2024
2f35deb
Bump version
modmuss50 Apr 16, 2024
73def35
Restore ctor init merging to previous logic, introduce PRE_BODY enforcer
Mumfrey Feb 3, 2024
9c1abe3
Fix broken invokers when target is an interface
Mumfrey Feb 3, 2024
a87babe
Fix missing field assignment for source in MixinConfig
Mumfrey Feb 3, 2024
c970d84
Wrap logger abstraction in agent classes to prevent crash at startup
Mumfrey Feb 10, 2024
5f57d50
Add fallback shim for synthetic package for older ModLauncher versions
Mumfrey Mar 2, 2024
f0d2cd2
Add constructor invokers to refmap when type is implied, closes #454
Mumfrey May 10, 2024
2e5a4b0
Fix descriptor filtering for NEW injection point, closes #515
Mumfrey May 10, 2024
1accf3f
Check for null when inspecting Mixin superclass, closes #546
Mumfrey May 10, 2024
480bd3d
Add missing toString override, closes #562
Mumfrey May 12, 2024
d2d1fbc
Move staticness check for mixin field after unique check, closes #576
Mumfrey May 12, 2024
53aa500
Update build.gradle for hardware signing token
Mumfrey May 12, 2024
2c9a967
Mixin 0.8.6 RELEASE
Mumfrey May 12, 2024
a95dcd9
Bump version to 0.8.7-SNAPSHOT
Mumfrey May 14, 2024
902c343
Restore old findInitNodeFor used by MixinExtras, mark as deprecated
Mumfrey May 14, 2024
a13f0c0
Convert EXPAND_FRAMES ClassReader flag to tunable, default to 0
Mumfrey May 14, 2024
e212511
Replace zip-based ML legacy VirtualJar shim with inline SecureJar shim
Mumfrey May 15, 2024
54f3644
Don't create logger in MixinServiceAbstract ctor, updates #569
Mumfrey May 15, 2024
b04e6d6
Propagate argument offsets when applying Redirect, closes #544
Mumfrey May 16, 2024
0816867
Really only linear offsets are supported with base assumption
Mumfrey May 17, 2024
a2751aa
Apply injectors in discrete phases, ensure Redirects always go last(ish)
Mumfrey May 18, 2024
1f34ee9
Run all preinject operations before starting any actual injections
Mumfrey May 18, 2024
3a090bd
Revert "New: Allow injection point specifiers anywhere. (#129)"
LlamaLad7 May 19, 2024
9cf325d
Revert "Allowing injecting in constructor's (#30 #40)"
LlamaLad7 May 19, 2024
998f057
Initial merge for 0.8.6
LlamaLad7 May 19, 2024
a1d5bec
Fabric: Fall back to modid in MethodMapper#getMixinSourceId.
LlamaLad7 May 19, 2024
8fda508
Fabric: Re-allow jumps and array accesses inside initialisers.
LlamaLad7 May 19, 2024
fda52dc
Fix: Resolve inappropriate `null` default in Mixins#addConfiguration.
LlamaLad7 May 19, 2024
92a64e3
Fabric: Default `At#unsafe` to true.
LlamaLad7 May 19, 2024
0165cf9
Restore old findInitNodeFor used by MixinExtras, mark as deprecated
Mumfrey May 14, 2024
ab4dab0
buildscript: Relevant changes from 0.8.6
LlamaLad7 May 19, 2024
afb9f13
Fix: Restore removed methods relating to configs.
LlamaLad7 May 20, 2024
02bf3d2
Change: Add stack checking to old `Target#findInitNodeFor` overload a…
LlamaLad7 May 21, 2024
02d7470
Allow authors to specify order on injector annotations
Mumfrey May 24, 2024
1bae530
Merge remote-tracking branch 'origin/pr/667'
Mumfrey May 24, 2024
ea733f9
Change: Add stack checking to old `Target#findInitNodeFor` overload a…
LlamaLad7 May 21, 2024
18f632c
Build: Bump version.
LlamaLad7 Jun 1, 2024
8d413b8
Compat: Gate `NEW` descriptor filtering.
LlamaLad7 Jun 1, 2024
02f8479
Merge pull request #141 from LlamaLad7/merge/0.8.6
modmuss50 Jun 2, 2024
35c079a
Fix: Resolve occasional NPE in Locals calculations.
LlamaLad7 Jun 2, 2024
c093311
Fix: Overhaul MixinVerifier supertype logic.
LlamaLad7 Jun 2, 2024
2d14c78
Fix bug with option flags from previous commit
Mumfrey Jun 7, 2024
a362aad
Fix AP file writer issue with non-file outputs, fixed #622
Mumfrey Jun 7, 2024
a8254c7
Fix: Properly extend the stack in `ModifyArgInjector`. (#144)
LlamaLad7 Jun 8, 2024
d0a6ebd
Update Gradle (#148)
modmuss50 Jun 19, 2024
8f0bb79
Add fuzz and skip options to AfterInvoke, closes #653
Mumfrey Jun 20, 2024
d2105c6
Display correct node type in printLocals
Mumfrey Jun 20, 2024
017eecf
Propagate local context through compounds via decoration, closes #532
Mumfrey Jun 25, 2024
2edfbc4
Fix: Do not re-parent calls to interface super methods. (#150)
LlamaLad7 Jul 1, 2024
2cd49e6
Enable checkstyle (#149)
modmuss50 Jul 1, 2024
96e81bb
Use ClassReader flags tunable for metadata ClassNodes too, updates #671
Mumfrey Jul 4, 2024
0239904
Handle offset arg window correctly for ModifyArg injector, updates #544
Mumfrey Jul 5, 2024
0c79de4
Handle offset arg window correctly for ModifyArgs injector, updates #544
Mumfrey Jul 6, 2024
c8be3ca
Use InjectorOrder.DEFAULT for field, fixes third-party injector order
Mumfrey Jul 6, 2024
7d7d4dc
Properly handle empty args window and report name of the original method
Mumfrey Jul 6, 2024
4053421
Mixin 0.8.7 RELEASE
Mumfrey Jul 6, 2024
60aa12f
Revert "Use 0 as class reader flags in Modlauncher bytecode provider …
LlamaLad7 Jul 9, 2024
b20b9b3
Revert "Fix: Check the staticness of the original call not the curren…
LlamaLad7 Jul 9, 2024
96b758d
Revert "Fix/modifyarg(s) after redirect (#128)"
LlamaLad7 Jul 9, 2024
55670f2
Merge branch 'refs/heads/0.8.7' into merge/0.8.7
LlamaLad7 Jul 9, 2024
7f00ee3
Build: Bump version.
LlamaLad7 Jul 9, 2024
9aca17d
Merge pull request #151 from FabricMC/merge/0.8.7
modmuss50 Jul 9, 2024
f2f93d5
Merge remote-tracking branch 'upstream/main'
mitchej123 Jul 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [8-jdk, 11-jdk, 16-jdk, 17-jdk]
runs-on: ubuntu-20.04
java: [17-jdk, 21-jdk]
runs-on: ubuntu-24.04
container:
image: openjdk:${{ matrix.java }}
image: eclipse-temurin:${{ matrix.java }}
options: --user root
steps:
- uses: actions/checkout@v1
- uses: gradle/wrapper-validation-action@v1
- run: ./gradlew build publishToMavenLocal --stacktrace
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
- run: ./gradlew build publishToMavenLocal --stacktrace --warning-mode fail
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ name: Release
on: [workflow_dispatch] # Manual trigger
jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
container:
image: openjdk:17-jdk
image: eclipse-temurin:21-jdk
options: --user root
steps:
- uses: actions/checkout@v1
- uses: gradle/wrapper-validation-action@v1
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
- run: ./gradlew checkVersion build publish --stacktrace
env:
MAVEN_URL: ${{ secrets.MAVEN_URL }}
Expand Down
136 changes: 68 additions & 68 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ buildscript {
}
dependencies {
classpath 'gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.16.1'
classpath 'gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.0.0'
classpath 'com.guardsquare:proguard-gradle:' + (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11) ? '7.2.0' : '7.1.0')
classpath 'com.guardsquare:proguard-gradle:' + (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11) ? '7.5.0' : '7.1.0')
}
}

plugins {
id "me.modmuss50.remotesign" version "0.4.0"
id "me.modmuss50.remotesign" version "0.4.0"
id "io.github.goooler.shadow" version "8.1.7"
}

import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
Expand All @@ -24,17 +24,18 @@ apply plugin: 'checkstyle'
apply plugin: 'maven-publish'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'potemkin-modules'

// Default tasks
defaultTasks 'licenseFormat', 'check', 'build'

// Basic project information
group = 'io.github.legacymoddingmc'
archivesBaseName = 'sponge-mixin'
version = buildVersion + "+mixin." + upstreamMixinVersion

base {
archivesName = 'sponge-mixin'
}

def ENV = System.getenv()
if (!ENV.CI) {
Expand All @@ -50,12 +51,13 @@ ext.packaging = 'jar'
ext.asmVersion = project.hasProperty("asmVersion") ? asmVersion : '9.0'
ext.legacyForgeAsmVersion = project.hasProperty("legacyForgeAsmVersion") ? asmVersion : '5.0.3'

// Minimum version of Java required
sourceCompatibility = '1.8'
targetCompatibility = '1.8'

java {
modularity.inferModulePath = false
disableAutoTargetJvm()

// Minimum version of Java required
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}

// Project repositories
Expand All @@ -71,40 +73,20 @@ repositories {
}
maven {
// For modlauncher
name = 'forge'
url = 'https://files.minecraftforge.net/maven'
}
}

configurations {
stagingJar

exampleImplementation .extendsFrom implementation
fernflowerImplementation .extendsFrom implementation
launchwrapperImplementation .extendsFrom implementation
agentImplementation .extendsFrom implementation
modlauncherImplementation .extendsFrom implementation
modlauncher9Implementation .extendsFrom modlauncherImplementation
modularityImplementation .extendsFrom modlauncher9Implementation
modularityCompileOnly .extendsFrom compileOnly

proguard {
extendsFrom fernflowerImplementation
extendsFrom launchwrapperImplementation
extendsFrom modlauncherImplementation
extendsFrom compileClasspath
name = 'neoforged'
url = 'https://maven.neoforged.net/releases'
}
}

sourceSets {
legacy {
ext.languageVersion = 8
ext.compatibility = '1.6'
ext.compatibility = '1.8'
}
main {
compileClasspath += legacy.output
ext.languageVersion = 8
ext.compatibility = '1.6'
ext.compatibility = '1.8'
}
ap {
compileClasspath += main.output
Expand All @@ -114,13 +96,13 @@ sourceSets {
fernflower {
compileClasspath += main.output
ext.languageVersion = 8
ext.compatibility = '1.6'
ext.compatibility = '1.8'
ext.modularityExcluded = true
}
agent {
compileClasspath += main.output
ext.languageVersion = 8
ext.compatibility = '1.6'
ext.compatibility = '1.8'
}
bridge {
compileClasspath += main.output
Expand Down Expand Up @@ -164,6 +146,26 @@ sourceSets {
modularityDummy {}
}

configurations {
stagingJar

exampleImplementation .extendsFrom implementation
fernflowerImplementation .extendsFrom implementation
launchwrapperImplementation .extendsFrom implementation
agentImplementation .extendsFrom implementation
modlauncherImplementation .extendsFrom implementation
modlauncher9Implementation .extendsFrom modlauncherImplementation
modularityImplementation .extendsFrom modlauncher9Implementation
modularityCompileOnly .extendsFrom compileOnly

proguard {
extendsFrom fernflowerImplementation
extendsFrom launchwrapperImplementation
extendsFrom modlauncherImplementation
extendsFrom compileClasspath
}
}

// Because Mixin aims to support a variety of environments, we have to be able to run with older versions of GSON and Guava that lack official module
// names. This means the same library may appear with multiple module names. We want to be able to link our module with either of these two at
// runtime, without having to have two versions of the library on our compile-time module path. To do this, we generate empty "potemkin" jars with
Expand Down Expand Up @@ -226,7 +228,7 @@ dependencies {
modlauncher9Implementation ("cpw.mods:modlauncher:$modlauncherVersion") {
exclude module: 'jopt-simple'
}
modlauncher9Implementation 'cpw.mods:securejarhandler:0.9.+'
modlauncher9Implementation 'cpw.mods:securejarhandler:2.1.24'

// asm bridge
bridgeImplementation 'org.apache.logging.log4j:log4j-core:2.0-beta9'
Expand All @@ -243,11 +245,11 @@ javadoc {
source sourceSets.ap.allJava
options.encoding = 'UTF-8'
exclude {
it.relativePath.file && it.relativePath.pathString =~ 'tools' && !(it.name =~ /SuppressedBy|package-info/) }
it.relativePath.file && it.relativePath.pathString =~ 'tools' && !(it.name =~ /SuppressedBy|package-info/)
}
options {
docTitle 'Welcome to the Mixin Javadoc'
overview 'docs/javadoc/overview.html'
stylesheetFile file('docs/javadoc/mixin.css')
addBooleanOption '-allow-script-in-comments', true
}
doLast {
Expand Down Expand Up @@ -320,7 +322,7 @@ checkstyle {
"year" : project.inceptionYear
]
configFile = file("checkstyle.xml")
toolVersion = '8.44'
toolVersion = '10.17.0'
}

// Source compiler configuration
Expand All @@ -333,10 +335,8 @@ tasks.withType(JavaCompile) {
def modularityInputs = objects.fileCollection()

project.sourceSets.each { set -> {
if (set.ext.has("languageVersion")) {
project.tasks[set.compileJavaTaskName].javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(set.ext.languageVersion)
}
if (set.ext.has("languageVersion") && JavaVersion.current().isJava9Compatible()) {
project.tasks[set.compileJavaTaskName].options.release = set.ext.languageVersion
}
if (set.ext.has("compatibility")) {
project.tasks[set.compileJavaTaskName].sourceCompatibility = set.ext.compatibility
Expand Down Expand Up @@ -439,7 +439,7 @@ task sourceJar(type: Jar) {
}

task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
from javadoc.destinationDir
archiveClassifier = "javadoc"
}

Expand All @@ -464,7 +464,7 @@ publishing {
publications {
developer(MavenPublication) { publication ->
groupId project.group
artifactId project.archivesBaseName
artifactId project.base.archivesName.get()
version project.version

artifact sourceJar
Expand Down Expand Up @@ -519,8 +519,8 @@ publishing {
}
}

developers {
// Et. al. that arent in the fabric org on maven central
developers {
// Et. al. that arent in the fabric org on maven central

developer {
id = "makamys"
Expand All @@ -534,13 +534,13 @@ publishing {
email = "modmuss50@fabricmc.net"
}

developer {
id = "sfPlayer"
name = "Player"
email = "player@fabricmc.net"
}
}
}
developer {
id = "sfPlayer"
name = "Player"
email = "player@fabricmc.net"
}
}
}
}
}

Expand All @@ -555,24 +555,24 @@ publishing {
}
}

if (ENV.MAVEN_CENTRAL_URL) {
repositories.maven {
name "central"
url ENV.MAVEN_CENTRAL_URL
credentials {
username ENV.MAVEN_CENTRAL_USERNAME
password ENV.MAVEN_CENTRAL_PASSWORD
}
}
}
if (ENV.MAVEN_CENTRAL_URL) {
repositories.maven {
name "central"
url ENV.MAVEN_CENTRAL_URL
credentials {
username ENV.MAVEN_CENTRAL_USERNAME
password ENV.MAVEN_CENTRAL_PASSWORD
}
}
}
}
}

remoteSign {
requestUrl = ENV.SIGNING_SERVER
pgpAuthKey = ENV.SIGNING_PGP_KEY
useDummyForTesting = ENV.SIGNING_SERVER == null
sign publishing.publications.developer
requestUrl = ENV.SIGNING_SERVER
pgpAuthKey = ENV.SIGNING_PGP_KEY
useDummyForTesting = ENV.SIGNING_SERVER == null
sign publishing.publications.developer
}

// A task to ensure that the version being released has not already been released.
Expand Down
9 changes: 1 addition & 8 deletions checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Description: none
-->
<module name="Checker">
<property name="severity" value="warning"/>
<property name="severity" value="error"/>
<property name="charset" value="UTF-8"/>
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$"/>
Expand Down Expand Up @@ -131,13 +131,6 @@
<module name="UncommentedMain"/>
<module name="SuppressionCommentFilter"/>
</module>
<module name="LineLength">
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
<property name="max" value="150"/>
</module>
<module name="LineLength">
<property name="ignorePattern" value="^[ ]*([a-zA-Z0-9\{\}\+\|\&amp;\&quot;@\(\)\?\.\:]|//)"/>
</module>
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ packaging=jar
description=Mixin (LegacyModdingMC fork)
url=https://github.com/LegacyModdingMC
organization=LegacyModdingMC
buildVersion=0.13.0
upstreamMixinVersion=0.8.5
buildVersion=0.15.0
upstreamMixinVersion=0.8.7
buildType=RELEASE
asmVersion=9.6
legacyForgeAsmVersion=5.0.3
modlauncherAsmVersion=9.1
modlauncherVersion=9.0.7
modlauncherAsmVersion=9.5
modlauncherVersion=10.0.9
legacyModlauncherVersion=7.0.0
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading