Skip to content

Add option to prevent Gradle plugin from adding dependency on KSP #571

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

Merged
merged 4 commits into from
Jan 26, 2024

Conversation

koperagen
Copy link
Collaborator

@koperagen koperagen commented Jan 25, 2024

We add plugin automatically for better onboarding experience, but it makes project depend on some specific KSP version. KSP complains when people use it with different version of compiler:
ksp-1.9.0-1.0.12 is too old for kotlin-1.9.21. Please upgrade ksp or downgrade kotlin-gradle-plugin to 1.9.0.

Still, it's ok to use preprocessor built for 1.9.0 with KSP 1.9.21. That's why we need an option for people to decide version of KSP they need in their project.
People will be able to use our preprocessor built for older versions of KSP API most of the time without problems thanks to backward compatibility
In dataframe project itself we always need to update Kotlin version in two steps. With this change (and one more PR later) it won't be necessary anymore

@koperagen
Copy link
Collaborator Author

koperagen commented Jan 25, 2024

Let's keep this somewhat internal for a while. I'll come up with good explanation for setup page later. For now i'd like to merge it without docs and update our own project to use it to simplify publishing process.

We add plugin automatically for better onboarding experience, but it makes project depend on some specific KSP version. KSP complains when people use it with different version of compiler:
ksp-1.9.0-1.0.12 is too old for kotlin-1.9.21. Please upgrade ksp or downgrade kotlin-gradle-plugin to 1.9.0.
In dataframe project itself we always need to update Kotlin version in two steps. With this change (and one more PR later) it won't be necessary anymore

Still, it's ok to use preprocessor built for 1.9.0 with KSP 1.9.21. That's why we need an option for people to decide version of KSP they need in their project.
People will be able to use our preprocessor built for older versions of KSP API most of the time without problems thanks to backward compatibility
}

fun List<String>.joinToCamelCaseString(): String {
return joinToString(separator = "") { it.capitalize() }
return joinToString(separator = "") { s -> s.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() } }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, changes in the behaviour is not clear for me here. Is it related to the KSP update, isn't it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

capitalize was deprecated some time ago. I come across the warning and decided to fix it

@koperagen koperagen merged commit d3b278f into master Jan 26, 2024
@Jolanrensen Jolanrensen deleted the update-ksp-1921 branch January 26, 2024 15:36
@koperagen koperagen added this to the 0.13.0 milestone Feb 2, 2024
@Jolanrensen Jolanrensen restored the update-ksp-1921 branch February 15, 2024 12:57
@Jolanrensen
Copy link
Collaborator

Jolanrensen commented Feb 15, 2024

One problem I found:
If kotlin.dataframe.add.ksp=false, KspPluginApplier isn't run which skips the line that makes ksp depend on symbol-processor-all.

This makes it so that the processor doesn't work at all.

@Jolanrensen Jolanrensen deleted the update-ksp-1921 branch February 15, 2024 13:32
@Jolanrensen Jolanrensen mentioned this pull request Feb 15, 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

Successfully merging this pull request may close these issues.

3 participants