-
Notifications
You must be signed in to change notification settings - Fork 20
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
🏗️ Add KSP artifact #61
Conversation
c6e8bc1
to
dadf372
Compare
@heytherewill Nice! KSP and Poet look great together. I didn't expect to understand the code soo easily 😅 There seems to be a bug tho. When I copy public fun mapAppActionToSettingsAction(appAction: AppAction): SettingsAction? = if(appAction is
.AppAction.Settings) appAction.settingsAction else null
public fun mapSettingsActionToAppAction(settingsAction: SettingsAction): AppAction.Settings =
.AppAction.Settings(settingsAction) There is that extra dot there in front of It looks like adding a val parentActionTypeName = parentActionClassName.canonicalName.substring(parentActionClassName.packageName.length + 1, parentActionClassName.canonicalName.length) Solves the issue but idk if it's the most robust solution to the problem. |
Nice find. My original problem was that just getting the class name would not resolve nested classes properly. Adding the |
67d7281
to
9a45ac5
Compare
9a45ac5
to
9df030b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! Updated the comment, merge away! |
Summary
This adds the base artifact and the first Symbol Processor for this project
Relationships
Groundwork for #60
Technical considerations
This PR is just the baseline and the code generation for the actions. I'll create subsequent issues for the State and Pullback generation
Tests
I'm testing both generation and the compiler error.
Review pointers
Please review not only the generated code's behavior, but also the overall architecture and ergonomics of the library, specially when applied to actual code.
Merge permissions
Go for it!