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

Preprocessor Gradle plugin behavior #620

Closed
Jolanrensen opened this issue Mar 12, 2024 · 2 comments · Fixed by #731
Closed

Preprocessor Gradle plugin behavior #620

Jolanrensen opened this issue Mar 12, 2024 · 2 comments · Fixed by #731
Assignees
Labels
enhancement New feature or request performance Something related to how fast the library can handle data research This requires a deeper dive to gather a better understanding
Milestone

Comments

@Jolanrensen
Copy link
Collaborator

Jolanrensen commented Mar 12, 2024

As discussed in #616 and Jolanrensen/KoDEx#40 (comment) 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:

  • You cannot specify which generated files to commit without turning off the commit hook
  • The processor is run each time a Jar is created or something is committed, even when nothing has changed in the source/generated files

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

  • the input has changed
  • the output has changed (if we make the output Read only, we only need to detect file deletions

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.

@Jolanrensen Jolanrensen added enhancement New feature or request research This requires a deeper dive to gather a better understanding performance Something related to how fast the library can handle data labels Mar 12, 2024
@Jolanrensen Jolanrensen added this to the Backlog milestone Mar 12, 2024
@Jolanrensen Jolanrensen self-assigned this Mar 12, 2024
@koperagen
Copy link
Collaborator

koperagen commented Mar 12, 2024

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
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance Something related to how fast the library can handle data research This requires a deeper dive to gather a better understanding
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants