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

Wrong remap of super method with local static method of same name #87

Open
kennytv opened this issue Mar 5, 2022 · 3 comments · May be fixed by #90
Open

Wrong remap of super method with local static method of same name #87

kennytv opened this issue Mar 5, 2022 · 3 comments · May be fixed by #90

Comments

@kennytv
Copy link

kennytv commented Mar 5, 2022

Given the following mappings, a remap of the super, non-static method getStringRaw results in a mangled call due to the local static method with the same remapped name (being a synthetic lambda method):

c    net/minecraft/server/dedicated/Settings    net/minecraft/server/dedicated/PropertyManager
    m    (Ljava/lang/String;)Ljava/lang/String;    getStringRaw    c
c    net/minecraft/server/dedicated/DedicatedServerProperties    net/minecraft/server/dedicated/DedicatedServerProperties
    m    (Ljava/lang/String;)Ljava/lang/String;    lambda$new$3    c

DedicatedServerProperties being an extending class of Settings:

public class DedicatedServerProperties extends Settings<DedicatedServerProperties> {

The error is:

java.lang.IncompatibleClassChangeError: Expecting non-static method 'java.lang.String net.minecraft.server.dedicated.DedicatedServerProperties.c(java.lang.String)'

Specifically, this happens when cloning Paper and running the runReobf gradle task (or running the jar given by createReobfBundlerJar)
... but apparently only when doing so on Windows, not Mac or Linux

Any help or possible fix would be appreciated

@kennytv kennytv changed the title Wrong remap due to static super method of same name Wrong remap of super method with local static method of same name Mar 5, 2022
KabanFriends added a commit to KabanFriends/tiny-remapper that referenced this issue Mar 14, 2022
@KabanFriends KabanFriends mentioned this issue Mar 14, 2022
sfPlayer1 added a commit to sfPlayer1/tiny-remapper that referenced this issue Mar 14, 2022
sfPlayer1 added a commit to sfPlayer1/tiny-remapper that referenced this issue Mar 14, 2022
@repeater64
Copy link

Hello, I'm facing this issue right now and really need to build a paper jar, is there any workaround I can use to get around this issue before the pull request is merged?

@MoritzR200
Copy link

MoritzR200 commented Mar 18, 2022

Hello, I'm facing this issue right now and really need to build a paper jar, is there any workaround I can use to get around this issue before the pull request is merged?

simply add


# Workaround by MoritzR200
c	net/minecraft/server/dedicated/DedicatedServerProperties	net/minecraft/server/dedicated/DedicatedServerProperties
	m	(Ljava/lang/String;)Ljava/lang/String;	lambda$new$3	d

to the end of the "reobf-mappings-patch.tiny" in the "build-data" folder

@repeater64
Copy link

Hello, I'm facing this issue right now and really need to build a paper jar, is there any workaround I can use to get around this issue before the pull request is merged?

simply add


# Workaround by MoritzR200
c	net/minecraft/server/dedicated/DedicatedServerProperties	net/minecraft/server/dedicated/DedicatedServerProperties
	m	(Ljava/lang/String;)Ljava/lang/String;	lambda$new$3	d

to the end of the "reobf-mappings-patch.tiny" in the "build-data" folder

Thanks, before I saw this I just tried running the build from Windows Subsystem for Linux which worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants