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

Avoid .java regeneration when source model file is not modified #304

Merged
merged 16 commits into from Aug 30, 2022

Conversation

neofreko
Copy link

@neofreko neofreko commented Aug 9, 2022

My projects keep generating the test source files on every build although model files was not touched. Turned out, isModified method keeps returning true.

This PR change isModified comparison to use milliseconds comparison instead of native equals method from FileTime class.

While also:

  1. Upgrade reflection library due to After migrating to 0.9.12, Getting exception : org.reflections.RflectionException: Scanner SubTypeScanner was not configured , even after configuring the scanner. ronmamo/reflections#273
  2. Memoized list of class loaders and context loaders as it is getting called on each processed file.
  3. Added tests for SimpleCache
  4. Added tests CodeGenerator fix
  5. Minor adjustments

The following out was produced for 299 model files by mvn graphwalker:generate-test-sources.

Before:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  09:51 min
[INFO] Finished at: 2022-08-09T11:23:34+09:00
[INFO] ------------------------------------------------------------------------

After:

[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  6.173 s
[INFO] Finished at: 2022-08-09T11:27:03+09:00
[INFO] ------------------------------------------------------------------------

@KristianKarl
Copy link
Contributor

Hi @afathonih!
Thanks for the PR Akhmad 👍

I have a question about JitPack. How is it related to the regeneration of java source files issue? Could the 2topics be separated into 2 PRs instead?

Best Kristian

@neofreko
Copy link
Author

Hi @KristianKarl ,
I will remove Jitpack bits tomorrow.
I was trying to put the artifact on Jitpack but maven plugin does not work straight forward there.
Thanks for checking the PR.

@KristianKarl KristianKarl merged commit 4c088e1 into GraphWalker:master Aug 30, 2022
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.

None yet

3 participants