question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`remapSourcesJar` fails with a `@see` linking a package

See original GitHub issue

Title 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:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
LambdAuroracommented, Nov 19, 2021

This happens with loom 0.10.57

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found