-
Notifications
You must be signed in to change notification settings - Fork 66
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
Prepare compilation pipeline that hides API overloads - KProperty and ColumnAccessor, for compiler plugin workflow #959
Conversation
Maybe the name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would have taken a lot of time, wouldn't it? haha. Nice job thinking about the user experience in combination with the compiler plugin :)
I just have some suggestions regarding naming to prevent future headaches :)
(the module name is perfect btw, very descriptive :) )
core/build.gradle.kts
Outdated
} | ||
|
||
val experimentalJarSources by tasks.registering(Jar::class) { | ||
dependsOn("kspKotlin") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's dependent on the generated sources, it should probably also depend on the task processKDocsMain
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, it seems to be modified by jar substitution rn, but i probably re-check and make an explicit dependency
core/build.gradle.kts
Outdated
publication { | ||
publicationName = "dataframe-experimental" | ||
description = "Excel support for Kotlin Dataframe" | ||
composeOfTaskOutputs(listOf(experimentalJar, experimentalJarSources)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
omg, I'm gonna have to look into doing this for the publishing of generated sources too. That's way easier than temporarily modifying the kotlin main sourceset before publishing each time.
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/annotations/Plugin.kt
Outdated
Show resolved
Hide resolved
import org.jetbrains.kotlin.name.FqName | ||
|
||
@OptIn(ExperimentalCompilerApi::class) | ||
class PublicApiModifierRegistrar : CompilerPluginRegistrar() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a good template compiler plugin haha. I don't think many are as easy as this one :)
I was thinking |
Maybe... Although "compact" suggests everything is still included, just more compressed somehow, which is not the case, we actually take stuff out. AI suggestions:
Yeah I see what you mean.. Anyway, we can always rename the annotation later :) AI suggestions:
|
7ed1f1f
to
1100d90
Compare
@Jolanrensen I decided to split this PR. I'll setup publishing later - it's trickier than i thought :( |
With DataFrame public API now, for most operations there're 4 overloads.
KProperty and ColumnAccessor overloads were needed to support more convenient, robust safe access to columns. With compiler plugin, there's an idea these overloads won't be useful and only clutter code completion popup and make on-boarding harder.
This PR adds new tiny compiler plugin to compile the same sources where all these overloads are public, and make them internal in the process.
Publication of a new artifact will be in a separate PR because it's trickier that i thought
experimental:
core: