aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2021-09-19 02:48:26 +0800
committershedaniel <daniel@shedaniel.me>2021-09-19 02:53:31 +0800
commit8216479edffded7e2d0ddc5e3b332a7fb7470d88 (patch)
treee27b5e2067cbf0e48ec2bdc53256e2502495dc81 /src
parentc40d33b9960ddd0d2757c41c42b37ea86af5e3a0 (diff)
parentae9a9e120d525afac3e8ad49b80a0507c010f052 (diff)
downloadarchitectury-loom-8216479edffded7e2d0ddc5e3b332a7fb7470d88.tar.gz
architectury-loom-8216479edffded7e2d0ddc5e3b332a7fb7470d88.tar.bz2
architectury-loom-8216479edffded7e2d0ddc5e3b332a7fb7470d88.zip
Merge remote-tracking branch 'FabricMC/dev/0.10' into dev/0.10.0
Signed-off-by: shedaniel <daniel@shedaniel.me> # Conflicts: # build.gradle # src/main/java/net/fabricmc/loom/util/TinyRemapperHelper.java
Diffstat (limited to 'src')
-rw-r--r--src/main/java/net/fabricmc/loom/util/TinyRemapperHelper.java9
-rw-r--r--src/test/groovy/net/fabricmc/loom/test/integration/FabricAPITest.groovy2
2 files changed, 9 insertions, 2 deletions
diff --git a/src/main/java/net/fabricmc/loom/util/TinyRemapperHelper.java b/src/main/java/net/fabricmc/loom/util/TinyRemapperHelper.java
index 5a50047a..12eb9185 100644
--- a/src/main/java/net/fabricmc/loom/util/TinyRemapperHelper.java
+++ b/src/main/java/net/fabricmc/loom/util/TinyRemapperHelper.java
@@ -28,6 +28,7 @@ import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.util.Map;
+import java.util.regex.Pattern;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
@@ -48,6 +49,11 @@ public final class TinyRemapperHelper {
.put("javax/annotation/concurrent/Immutable", "org/jetbrains/annotations/Unmodifiable")
.build();
+ /**
+ * Matches the new local variable naming format introduced in 21w37a.
+ */
+ private static final Pattern MC_LV_PATTERN = Pattern.compile("\\$\\$\\d+");
+
private TinyRemapperHelper() {
}
@@ -81,7 +87,8 @@ public final class TinyRemapperHelper {
builder.fixPackageAccess(true);
}
- return builder.build();
+ return builder.invalidLvNamePattern(MC_LV_PATTERN)
+ .build();
}
public static TinyRemapper getTinyRemapper(Project project) throws IOException {
diff --git a/src/test/groovy/net/fabricmc/loom/test/integration/FabricAPITest.groovy b/src/test/groovy/net/fabricmc/loom/test/integration/FabricAPITest.groovy
index 1ad80e87..7c1246b5 100644
--- a/src/test/groovy/net/fabricmc/loom/test/integration/FabricAPITest.groovy
+++ b/src/test/groovy/net/fabricmc/loom/test/integration/FabricAPITest.groovy
@@ -44,7 +44,7 @@ class FabricAPITest extends Specification implements GradleProjectTestTrait {
setup:
def gradle = gradleProject(
repo: "https://github.com/FabricMC/fabric.git",
- commit: "fc40aa9d88e9457957bdf3f8cec9698846828cd3",
+ commit: "46582230fb580d4c1f71e4b0737df27417ec9cb1",
version: version,
patch: "fabric_api"
)