-
-
Notifications
You must be signed in to change notification settings - Fork 119
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
Changes needed for compiler plugin #474
Changes needed for compiler plugin #474
Conversation
@oshai, can you have a look at these small changes? I want to merge this in before I move compiler plugin to a separate repository. |
Looking at it now. The change in LogbackLoggerFactory seems ok, but if possible I would like to avoid the rest. Even on the expense of some duplication on the compiler plugin. public extension functions can really clutter IDE autocomplete and confuses users. So I suggest to have them in a separate module, either only dependent at runtime, or bundle with the compiler plugin somehow. |
Another option: Mark methods as deprecated - I think there is an option they will only be visible to compiler. |
These extension functions can be replaced with static non-extension functions. Would that be acceptable? While less elegant to read, at least they will not show up in IDE auto-complete. I would like to avoid run-time dependency on the compiler plugin project. |
Non extension functions is also an option. iiuc it will only be seen in bytecode inspection, right? |
The functions themselves are visible on the classpath but IDE will not suggest them as they are not defined as (extension) functions on particular type. |
yes I understand that. If the package or class name is marked as internal I expect users to understand that they shouldn't use it or rely on it. Again, it's also possible to use the "HIDDEN" deprecation level as well so users can use it: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-deprecation-level/#412239310%2FClasslikes%2F1895087430 Maybe we can do that (hidden) also to |
If we make Here is a trick that works:
So, for I now applied this change, have a look. |
I now hid also |
lgtm. anything you would like to add before I merge it? |
Nope, should be complete from my side. |
merged, thanks! |
See also: