Kotlin / dataframe

Structured data processing in Kotlin
https://kotlin.github.io/dataframe/overview.html
Apache License 2.0
768 stars 48 forks source link

Preprocessor Gradle plugin behavior #620

Closed Jolanrensen closed 2 weeks ago

Jolanrensen commented 3 months ago

As discussed in https://github.com/Kotlin/dataframe/pull/616 and https://github.com/Jolanrensen/docProcessorGradlePlugin/issues/40#issuecomment-1991382530 the preprocessor plugin can sometimes behave a bit odd.

Currently, it's configured to run automatically on each commit and add all newly generated files to Git. This comes with a few downsides:

Actually, the generated files only need to be updated when:

And as for the SimpleGit auto-add, only the files that are added/have commits in the src folder should be added in the generated-sources folder.

koperagen commented 3 months ago

In the IDEA there's similar thing: you can run analysis for commit. Now it would not block the commit itself, but only notify user afterwards when analysis is finished. We cannot create IDE notification, but anyway if preprocessor will run and generate new files it should be enough for author to notice and maybe amend commit themselves. So i propose to not block commit / run post-commit hook that only generates files (without automatically adding them)

Jolanrensen commented 1 month ago

https://github.com/Jolanrensen/docProcessorGradlePlugin/releases/tag/v0.3.6 fixes a small piece of the behavior