Skip to content

Conversation

@koperagen
Copy link
Collaborator

I thought, let's employ a bit shorted syntax to reduce noise
Maybe there are other annotations that can be squashed, i squashed only the most popular

@koperagen koperagen added this to the 1.0.0-Beta5 milestone Dec 18, 2025
@koperagen koperagen self-assigned this Dec 18, 2025
@Jolanrensen
Copy link
Collaborator

Jolanrensen commented Dec 18, 2025

I would try to follow/create a little style guide for all our annotations. I just submitted an issue for ktlint pinterest/ktlint#3212 for this, as it doesn't seem to know @[] notations.

You now create:

@[Deprecated(DEPRECATED_ACCESS_API) AccessApiOverload]
@Suppress("INAPPLICABLE_JVM_NAME")
@JvmName("frameColDataFrameKProperty")
public fun <C> AnyColumnGroupAccessor.frameCol...

I would recommend putting the @[] at the bottom. It looks a bit cleaner, in my opinion:
You now create:

@Suppress("INAPPLICABLE_JVM_NAME")
@JvmName("frameColDataFrameKProperty")
@[Deprecated(DEPRECATED_ACCESS_API) AccessApiOverload]
public fun <C> AnyColumnGroupAccessor.frameCol...

Also, we don't really honor an order. What about just lexicographically?

@JvmName("frameColDataFrameKProperty")
@Suppress("INAPPLICABLE_JVM_NAME")
@[AccessApiOverload Deprecated(DEPRECATED_ACCESS_API)]
public fun <C> AnyColumnGroupAccessor.frameCol...

Next, the plan is to "compact" multiple annotations that are often used together?

We could probably include the JvmName one then too:

@[AccessApiOverload Deprecated(DEPRECATED_ACCESS_API)]
@[JvmName("frameColDataFrameKProperty") Suppress("INAPPLICABLE_JVM_NAME")]
public fun <C> AnyColumnGroupAccessor.frameCol...

wdyt?

@AndreiKingsley
Copy link
Collaborator

@Jolanrensen to be honest, it doesn't look very pretty to me, however the idea of grouping annotations seems great!

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 this pull request may close these issues.

4 participants