You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mixin makes assumptions about the FileObject returned from the java compilation. It assumes that the URI returned by .toUri() can be passed into new File(URI), which requires that the URI represents a real file (check the source of new File(URI)). This may be most of the time true, but it can fail, and it does for me. My implementation of the JavaFileManager keeps the files in memory, for faster compilation. The .toUri() method only "Returns a URI identifying this file object." (see javadoc for it), it does not require the URI to have the file scheme.
Fix: Either remove the logging, or make it print the URI directly, there's no need to force it into being a real file.
java.lang.IllegalArgumentException: URI scheme is not "file"
at java.io.File.<init>(File.java:423)
at org.spongepowered.tools.obfuscation.ReferenceManager.newWriter(ReferenceManager.java:158)
at org.spongepowered.tools.obfuscation.ReferenceManager.write(ReferenceManager.java:131)
at org.spongepowered.tools.obfuscation.ObfuscationManager.writeReferences(ObfuscationManager.java:126)
at org.spongepowered.tools.obfuscation.AnnotatedMixins.writeReferences(AnnotatedMixins.java:345)
at org.spongepowered.tools.obfuscation.MixinObfuscationProcessorTargets.postProcess(MixinObfuscationProcessorTargets.java:87)
at org.spongepowered.tools.obfuscation.MixinObfuscationProcessorTargets.process(MixinObfuscationProcessorTargets.java:67)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:802)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$200(JavacProcessingEnvironment.java:91)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.runContributingProcs(JavacProcessingEnvironment.java:635)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1041)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1206)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
at com.sun.tools.javac.main.Main.compile(Main.java:523)
at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
...
The text was updated successfully, but these errors were encountered:
Mixin makes assumptions about the
FileObject
returned from the java compilation. It assumes that the URI returned by.toUri()
can be passed intonew File(URI)
, which requires that the URI represents a real file (check the source ofnew File(URI)
). This may be most of the time true, but it can fail, and it does for me. My implementation of the JavaFileManager keeps the files in memory, for faster compilation. The.toUri()
method only "Returns a URI identifying this file object." (see javadoc for it), it does not require the URI to have thefile
scheme.Fix: Either remove the logging, or make it print the URI directly, there's no need to force it into being a real file.
Mixin/src/ap/java/org/spongepowered/tools/obfuscation/ReferenceManager.java
Lines 157 to 158 in 1e1aa7f
The text was updated successfully, but these errors were encountered: