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

Discovery of a locations of the usages of an internal or experimental Micronaut APIs #11043

Closed
mancze opened this issue Aug 1, 2024 · 1 comment · Fixed by #11249
Closed

Comments

@mancze
Copy link

mancze commented Aug 1, 2024

Feature description

We get warnings on the usage an internal or experimental Micronaut API in our project during compilation. The output we get from a Gradle task is (example):

> Task :awesome-app:compileJava
warning: Element extends or implements an internal or experimental Micronaut API
warning: Element extends or implements an internal or experimental Micronaut API
warning: Overriding an internal Micronaut API may result in breaking changes in minor or patch versions of the framework. Proceed with caution!
Note: Creating bean classes for 7 type elements
warning: Overriding an internal Micronaut API may result in breaking changes in minor or patch versions of the framework. Proceed with caution!
warning: Overriding an internal Micronaut API may result in breaking changes in minor or patch versions of the framework. Proceed with caution!
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
5 warnings

How can we find out location of the reported usages in the sources? Without this information it is hard to keep track on what is beeing overriden and where. It'd be great to have a way to discover these (e.g. write it out to the output. similarly like it's done for Java @Deprecated usages).

@nilols
Copy link

nilols commented Aug 2, 2024

maybe not a solution for you, but because I was curious to see how this would look in my code that uses ksp I extended a internal class and ran a build, and with ksp I got this output that states the location of the issue

:kspKotlin
w: [ksp] /path/to/the/file/extending/internal/class/ExtendInternal.kt:43: Element extends or implements an internal or experimental Micronaut API
w: [ksp] Element extends or implements an internal or experimental Micronaut API
w: [ksp] Element extends or implements an internal or experimental Micronaut API
w: [ksp] Element extends or implements an internal or experimental Micronaut API
w: [ksp] /path/to/the/file/extending/internal/class/ExtendInternal.kt:45: Element extends or implements an internal or experimental Micronaut API
w: [ksp] Overriding an internal Micronaut API may result in breaking changes in minor or patch versions of the framework. Proceed with caution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants