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

Add useResolvedOwners option to swap the owner in member accesses with the resolved class #90

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Add --useResolvedOwners arg, improve cli help
  • Loading branch information
sfPlayer1 committed Mar 14, 2022
commit d2539ff7e45fcacfe421e5b345ea85407acefa11
2 changes: 1 addition & 1 deletion src/main/java/net/fabricmc/tinyremapper/AsmRemapper.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, 2018, Player, asie
* Copyright (c) 2018, 2021, FabricMC
* Copyright (c) 2018, 2022, FabricMC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
Expand Down
27 changes: 25 additions & 2 deletions src/main/java/net/fabricmc/tinyremapper/Main.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, 2018, Player, asie
* Copyright (c) 2016, 2021, FabricMC
* Copyright (c) 2016, 2022, FabricMC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
Expand Down Expand Up @@ -46,6 +46,7 @@ public static void main(String[] rawArgs) {
Set<String> forcePropagation = Collections.emptySet();
File forcePropagationFile = null;
boolean ignoreConflicts = false;
boolean useResolvedOwners = false;
boolean checkPackageAccess = false;
boolean fixPackageAccess = false;
boolean resolveMissing = false;
Expand Down Expand Up @@ -91,6 +92,9 @@ public static void main(String[] rawArgs) {
case "ignoreconflicts":
ignoreConflicts = true;
break;
case "useresolvedowners":
useResolvedOwners = true;
break;
case "checkpackageaccess":
checkPackageAccess = true;
break;
Expand Down Expand Up @@ -145,7 +149,25 @@ public static void main(String[] rawArgs) {
}

if (args.size() < 5) {
System.out.println("usage: <input> <output> <mappings> <from> <to> [<classpath>]... [--reverse] [--forcePropagation=<file>] [--propagatePrivate] [--ignoreConflicts]");
System.out.printf("usage: <input> <output> <mappings> <from> <to> [<classpath>]... [OPTIONS]%n"
+ "options:%n"
+ " --ignoreFieldDesc%n"
+ " --forcePropagation=<file>%n"
+ " --propagatePrivate%n"
+ " --propagateBridges=(disabled|enabled|compatible)%n"
+ " --removeFrames%n"
+ " --ignoreConflicts%n"
+ " --useResolvedOwners%n"
+ " --checkPackagAaccess%n"
+ " --fixPackageAccess%n"
+ " --resolveMissing%n"
+ " --rebuildSourceFilenames%n"
+ " --skipLocalVariableMapping%n"
+ " --renameInvalidLocals%n"
+ " --invalidLvNamePattern=<pattern>%n"
+ " --nonClassCopyMode=(unchanged|fixmeta|skipmeta)%n"
+ " --threads=<n>%n"
+ " --mixin%n");
System.exit(1);
}

Expand Down Expand Up @@ -212,6 +234,7 @@ public static void main(String[] rawArgs) {
.propagateBridges(propagateBridges)
.removeFrames(removeFrames)
.ignoreConflicts(ignoreConflicts)
.useResolvedOwners(useResolvedOwners)
.checkPackageAccess(checkPackageAccess)
.fixPackageAccess(fixPackageAccess)
.resolveMissing(resolveMissing)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/fabricmc/tinyremapper/TinyRemapper.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, 2018, Player, asie
* Copyright (c) 2016, 2021, FabricMC
* Copyright (c) 2016, 2022, FabricMC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
Expand Down