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

Artifact Transformer. Asm(java 8) cannot parse java module info(java 9+) classes #3

Open
sumeru2 opened this issue Dec 7, 2023 · 1 comment
Labels
question Further information is requested

Comments

@sumeru2
Copy link

sumeru2 commented Dec 7, 2023

Hello! I need assistance in resolving an issue related to artifact transformation in Gradle. I've encountered an error due to ASM (Java 8) being unable to process classes with Java module information (Java 9+). If you have the opportunity to analyze the code and identify potential issues, I would appreciate your help. Thank you! snippets of code: build.gradle - https://hastebin.com/share/nujemijoyu.javascript buildSrc/src/main/groovy/org/example/JavaModuleTransform.groovy - https://hastebin.com/share/ofiwevahow.java
Errors:
https://pastebin.com/pbnBXt0C
Java 8 Gradle 8.1.1

@jjohannes
Copy link
Owner

Hi @NikitaFeaucher. The error you shared looks like the problem is not (directly) related to artifact transforms. The stack points at ASMModParser:

at org.objectweb.asm.ClassReader.<init>(ClassReader.java:439) ~[asm-debug-all-5.2.jar:5.2]
at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:57) ~[ASMModParser.class:?]

That is using a very old version of ASM here (asm-debug-all-5.2). You should try to upgrade that somehow. ideally to asm-9.6implementation("org.ow2.asm:asm:9.6"). Unfortunately from what you shared I cannot see how this all plays together in your project.

Can you maybe share a complete reproducer project that I can try out?

@jjohannes jjohannes added the question Further information is requested label Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants