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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃摑 Inlining KotoolsTypesVersion in API reference using KSP #596

Open
LVMVRQUXL opened this issue Mar 20, 2024 · 0 comments
Open

馃摑 Inlining KotoolsTypesVersion in API reference using KSP #596

LVMVRQUXL opened this issue Mar 20, 2024 · 0 comments
Labels
automation Automating things. documentation Improvements or additions to documentation.

Comments

@LVMVRQUXL
Copy link
Contributor

馃摑 Description

We would like to create an internal compiler plugin for inlining KotoolsTypesVersion in our API reference using Kotlin Symbol Processing (KSP).
For each declaration using the ExperimentalSince, the Since and the DeprecatedSince annotations, we want to generate an equivalent annotation accepting a String that should be documented instead of the explicit ones from the kotools.types.internal annotation.

Here's an example of a simple type declaration:

package kotools.types.web

import kotools.types.internal.ExperimentalSince
import kotools.types.internal.KotoolsTypesVersion

@ExperimentalSince(version = KotoolsTypesVersion.V4_4_0)
public interface EmailAddress

The goal is to generate the following code:

package kotools.types.web

@MustBeDocumented
private annotation class ExperimentalSince(val version: String)

@ExperimentalSince(version = "4.4.0")
public interface EmailAddress
@LVMVRQUXL LVMVRQUXL added documentation Improvements or additions to documentation. automation Automating things. labels Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation Automating things. documentation Improvements or additions to documentation.
Projects
None yet
Development

No branches or pull requests

1 participant