`remapSourcesJar` fails with a `@see` linking a package
See original GitHub issueTitle says it all, remapSourcesJar
will fail as soon as it hits a @see
in javadocs pointing to a package, which is the only way to point to a package-info.
This is actually a bug in Mercury, though it’s a bit confusing because it’s supposed to be already fixed? Something’s wrong somewhere, though can’t figure out what.
This has been tested on LambDynamicLights setup with latest loom, and I end up with quite the stacktrace:
java.lang.RuntimeException: Failed to process: /tmp/fabric-loom-src5078637496217298030/dev/lambdaurora/lambdynlights/api/DynamicLightHandler.java
at org.cadixdev.mercury.Mercury.accept(Mercury.java:250)
at org.cadixdev.mercury.Mercury$Requestor.acceptAST(Mercury.java:273)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1065)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:661)
at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:1001)
at org.cadixdev.mercury.Mercury.run(Mercury.java:225)
at org.cadixdev.mercury.Mercury.rewrite(Mercury.java:180)
at net.fabricmc.loom.util.SourceRemapper.remapSourcesInner(SourceRemapper.java:140)
at net.fabricmc.loom.util.SourceRemapper.lambda$scheduleRemapSources$0(SourceRemapper.java:71)
at net.fabricmc.loom.util.SourceRemapper.lambda$remapAll$1(SourceRemapper.java:94)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at net.fabricmc.loom.util.SourceRemapper.remapAll(SourceRemapper.java:94)
at net.fabricmc.loom.util.SourceRemapper.remapSources(SourceRemapper.java:64)
at net.fabricmc.loom.task.RemapSourcesJarTask.remap(RemapSourcesJarTask.java:53)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
Caused by: java.lang.IllegalStateException: Unhandled binding: PackageBinding (1)
Caused by: java.lang.IllegalStateException: Unhandled binding: PackageBinding (1)
at org.cadixdev.mercury.remapper.RemapperVisitor.visit(RemapperVisitor.java:194)
at org.cadixdev.mercury.remapper.SimpleRemapperVisitor.visit(SimpleRemapperVisitor.java:496)
at org.eclipse.jdt.core.dom.SimpleName.accept0(SimpleName.java:198)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3055)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:3103)
at org.eclipse.jdt.core.dom.QualifiedName.accept0(QualifiedName.java:162)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3055)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:3103)
at org.eclipse.jdt.core.dom.QualifiedName.accept0(QualifiedName.java:162)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3055)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:3103)
at org.eclipse.jdt.core.dom.QualifiedName.accept0(QualifiedName.java:162)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3055)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:3126)
at org.eclipse.jdt.core.dom.TagElement.accept0(TagElement.java:317)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3055)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:3126)
at org.eclipse.jdt.core.dom.Javadoc.accept0(Javadoc.java:194)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3055)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:3103)
at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:520)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3055)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:3126)
at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:258)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3055)
at org.cadixdev.mercury.remapper.MercuryRemapper.rewrite(MercuryRemapper.java:54)
at org.cadixdev.mercury.SourceRewriter.process(SourceRewriter.java:20)
at org.cadixdev.mercury.SourceContext.process(SourceContext.java:82)
at org.cadixdev.mercury.RewriteContext.process(RewriteContext.java:111)
at org.cadixdev.mercury.Mercury.accept(Mercury.java:248)
... 141 more
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Cannot build with gradle · Issue #72 - GitHub
I always encounter this exception when running gradle tasks and gradle build: > Configure project : Fabric Loom: 0.5.34 Build(jenkins #34) ...
Read more >documentation:fabric_loom [Fabric Wiki]
migrateMappings : Migrates the current source to the specified mappings. See migratemappings. remapJar : Produces a jar containing the remapped ...
Read more >Fabric : Could not resolve all artifacts for configuration
I try to set up my gradle project from Minecraft Fabric example mode master but when I open project keep get this error....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This happens with loom 0.10.57
It seems like https://github.com/CadixDev/Mercury/commit/7fa0ba1e03bec3facd084e3d69102a2f6e7afa17 only fixes for
@link
, it still fails if you use@see
.https://github.com/badasintended/wthit/runs/5044484184?check_suite_focus=true#step:6:171