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

Split the plugin, add annotation-driven configuration #79

Closed
vlsi opened this issue Feb 20, 2023 · 3 comments
Closed

Split the plugin, add annotation-driven configuration #79

vlsi opened this issue Feb 20, 2023 · 3 comments

Comments

@vlsi
Copy link

vlsi commented Feb 20, 2023

Suppose something like

fun assertTrue(
    expression: Boolean,
    @ExpressionText("expression") description: String? = null
)

fun usageSample() {
    assertTrue(2.equals(3))
    // the compiler plugin should convert the call to something like
    assertTrue(2.equals(3), description="2.equals(3)")
}

See https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/caller-argument-expression

WDYT?

@vlsi
Copy link
Author

vlsi commented Feb 27, 2023

In the mean time, I've released https://github.com/vlsi/kotlin-argument-expression#motivation

@bnorm
Copy link
Owner

bnorm commented Mar 1, 2023

I'm hoping to tackle #45 in the coming months and think this would be another perfect fit. This sort of annotation could be a simplified version of what I'm hoping to achieve with the support library, so it will probably be a great first thing to do.

@bnorm
Copy link
Owner

bnorm commented Jun 9, 2024

Ticket has been moved to Kotlin YouTrack: https://youtrack.jetbrains.com/issue/KT-66808

@bnorm bnorm closed this as not planned Won't fix, can't repro, duplicate, stale Jun 9, 2024
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

No branches or pull requests

2 participants