High level Description and Hopeful outcomes
I have been toying around with trying to set up the toolchain and test framework for a java compiler plugin and I have been pretty hung up on the implementation:
I’m looking to further understand:
-
The toolchain/project structure/gradle related questions I’ll pose in this post are probably pretty easy to answer with existing documentation, but I’m finding it difficult to find what I’m looking for. Any tips on using existing documentation more effectively?
-
This is more of a java question, so I understand if this is inappropriate, but by chance are there any opinions on how I’m exposing javac classes and methods? I’m following an unlisted blogpost from a friend r/e how to set that up, and apparently she wasn’t able to find any simlar/alternative existing solutions on the internet anywhere. As a result, I’m shooting a shot in the dark here that maybe someone has opinions on this.
Repo and Commit
here!.
Notes/Problems:
- The abstractions I’ve been laying out for tests are likely horribly wrong. I’m finding it fun (learning experience) to try to draft it up without checking out junit or other common frameworks though, so feel free to gloss over that.
- The bit that I’m specifically searching for advice r/e involves discussing:
- Project structure: I moved the test package into the plugin package because this seems to mirror what most projects do.
- Debug configurations/tasks in gradle. Previously, I couldn’t access javac classes inside the test module this commit removes. I think I maybe would have been able to copy the compiler args back into the other build script to fix the issue, but I didn’t get around to testing it/realizing it until after I decided to move the package. However, now I’ve broken breakpoints. Realistically, I don’t think I need them inside the actual Test classes, I’m more interested in setting breakpoints on the compiler and then letting the tests just go ham with logging instead. Any idea how I can fix this or the correct resources to check out? Gradle has a lot of docs, but sometimes I am finding it difficult to feel confidence that I’m looking in the correct place.