-
-
Notifications
You must be signed in to change notification settings - Fork 211
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 plugin for generating Expect<..> accessors #1358
Comments
Thanks for the idea. We were considering this in the past. Back then we came to the conclusion that maintenance vs. benefit does pay out. I am kind of glad we decided that way back then as we would have used Kapt which now is deprecated. I am not sure how stable KSP is already so that we can really built upon it. On the other hand, a migration to another tool in a few years is most likely simple. I am open for the topic but we should re-asses if it is worth it, especially considering that we plan to introduce a compiler plugin.
|
I believe they complement each other. A compiler plugin can't contribute to IDE's autocomplete. KSP plugin can help here by generating boilerplate functions and property accessors, so the user can write code without installing IDE plugins. In other words,
I would start with annotations first, and then evaluate how it goes. |
https://guava.dev/releases/23.0/api/docs/com/google/common/annotations/VisibleForTesting.html 😉 |
exactly from I suggest we generate feature extractors also for I rethought if we should include methods, I think it us enough to start with properties only. |
It looks like the case for generating feature extractors for third-party code is pretty real: #1421 |
yapp, that's what I expected. thus configuration file seems more appropriate. suggestion regarding format of the configuration file? I dislike yaml due to all the indentation problems I already encountered. |
I wonder if semething like jackon's mixin would be enough. Then the user could declare a dummy class and configure "theat its annotations as if they were specified at SQLException" |
I guess we could somehow support an annotation based approach but I think a configuration file will be a better fit for this as you can for instance define excludes (or includes) via regex and the like and I think we will quickly need this flexiblity |
Platform (all, jvm, js): all
Extension (none, kotlin 1.3): none
Code related feature
Suppose the user creates a class
Then Atrium could automatically generate expectation accessors:
The text was updated successfully, but these errors were encountered: