Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor com.riiablo.excel to use annotation processors #135

Open
collinsmith opened this issue Dec 11, 2020 · 3 comments
Open

Refactor com.riiablo.excel to use annotation processors #135

collinsmith opened this issue Dec 11, 2020 · 3 comments

Comments

@collinsmith
Copy link
Owner

This seems like the most appropriate way to handle generating the excel table serializers, however I've had a lot of trouble trying to decouple the com.riiablo.excel hierarchy to support this. The excel table code generation depends on the excel classes, while the serializer generation depends on com.riiablo.io. project(':core') cannot act as it's own annotation processor because that creates a circular dependency (can't process itself if it needs itself to annotate process itself).

Long story short, I'm abandoning this complication for the time being and moving to an automated dependency-driven gradle task. I think implementing this feature will require thought and refactoring to the core classes com.riiablo.excel.Excel, com.riiablo.excel.TxtParser, and com.riiablo.excel.Serializer.

http://hannesdorfmann.com/annotation-processing/annotationprocessing101

@collinsmith
Copy link
Owner Author

Thinking about this issue a bit more, I think it may not be as difficult as I previously thought. I may be able to stub out the dependent classes in the project if I cannot specify them as strings. E.g., create a com.riiablo.io.ByteInput class within :annotation-parser module used for generating code. The Excel class dependencies may be more difficult if their functionality is required.

@collinsmith
Copy link
Owner Author

Implemented as com.riiablo.table package within project(':table').subprojects. Merged back into master so that this project may be shelved for a bit without falling egregiously behind. com.riiablo.excel contains the previous iteration which is basically a step above com.riiablo.codec.excel, but not nearly as refined. project(':excel').subprojects projects contain dependency issues, but the code is still kept until :table is complete. I decided to veer away from naming tables excel because it didn't really fit -- new terms are Table, Schema, Record -- more DB-friendly terms.

@collinsmith collinsmith mentioned this issue Jan 11, 2021
6 tasks
collinsmith added a commit that referenced this issue May 28, 2021
Disable :table:annotation-processor dependency
Exclude com.riiablo.table.*.** from compile to improve performance
@collinsmith
Copy link
Owner Author

Caching is not enabled causing the annotation processor task to run on every build. I've decided to disable it in :core and exclude com.riiablo.table.*.** from compilation in the meantime until I decide to move forward with properly implementing support for this feature.

collinsmith added a commit that referenced this issue Jul 10, 2021
Fix for bf609ac not excluding during test sources compilation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant