Closed skycatminepokie closed 2 months ago
ah yeah, split sources will be the offender. I'll look into it
hmm, I assumed incorrectly.. I followed your reproduction steps .. and it worked; well except I found a different issue related to the classes being generated in both source sets which is less than ideal
Maybe it's IDE settings? I tried without split sources and it still broke. Annotation processors seem to be per-project, and I didn't touch those, but I haven't gotten anywhere messing with them either.
Hmm. Unlikely. Btw you should be able to debug builds by 1. running clean
task and then 2. debugging the compileJava
task. If there is already compiled classes and no changes are present in the source it won't hit the debugger as the annotation processor is not ran.
That worked. Looks like the part that's throwing the error is FabricSourceProvider#getConfigFile
- java.nio.file.NoSuchFileException: src\main\resources\fabric.mod.json
. It's looking at C:\Users\MyName\.gradle\daemon\8.10\src\main\resources\fabric.mod.json
, which does not exist. Maybe Paths#get
is finding a different place on different systems? I'm running Windows 10.
That would be annoying if that were the case. On Unix systems it looks in your root project dir. I'll see if I can find a work around. It'd be great if the java annotation processing api actually.. idk.. had more features like "where is the build dir" or "where is the project dir" but it doesn't
Configurable-1.0.4-fabric-yarn+1.21.1.jar.zip
Try this. Do note that split-sources is currently broken, and I am looking into how I can handle it. Annotation processors have no context of where they're running and they run per-source-set. This means that if you put configurable elements in the client and main sources then two configs and loaders will be generated, each containing only the configurable elements in that source set, which is problematic, especially considering the main source set can't access client classes which the screen factory uses. Oversight on my part, and sort of a limitation of java's annotation processing
Alright, I'll give it a shot tomorrow, I'm out of time today. Ty 🙏
Should be all fixed in 1.1.0; close if so See this for split sources: https://github.com/Bawnorton/Configurable/wiki#%EF%B8%8F-note-about-split-sources-%EF%B8%8F
It's fixed, thank you!
When setting up Configurable in one of my projects, I found it worked fine until I used the
@Configurable
annotation. Then, it threw anIllegalArgumentException: Unable to determine source provider
.What I figured out:
FabricSourceProvider#FabricSourceProvider(Filer, Gson)
,gson.fromJson(...)
either returnsnull
or throwsIOException
fmj == null
SourceProviders#getSourceProvider(Filer)
,provier.matches()
(sic) returnsfalse
ConfigurableProcessor#process
To reproduce:
fabric
,yarn
,1.0.3+1.21.1
)TemplateModClient
(orTemplateMod
)Full output with
--stacktrace
:Let me know if there's anything else I can provide. I'm excited to try this library out :D