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

Incremental Files containing the full path of the inputs preventing Incremental Build #118

Open
mehmetsalgar opened this issue Jun 5, 2023 · 0 comments

Comments

@mehmetsalgar
Copy link

Hi,

I like to ask the reason to put full absolute file paths to the Incremental Build state file...

for ex, for me when I realise an incremental build contains the following path and hash information

xptd/builds/tikari/tikari-test/src/main/java/org/salgar/tikari/App.javaw��/xq�~��sq�~�!����u��N�������%q�~��w���������sq�~��t�

We are trying to use the Incremental Build feature of Takari in our Gitlab Build system (a la Gradle), when a Gitlab Job runs it puts the contents of the 'target/incremental' directory to the cache, so if the same job triggered because another condition in the pipeline (we are working with a monorepo, there are several Services, let say this is Service 3 and Service 1 can have a change and trigger the pipeline but Service 3 has no change, so we want to skip compile), it will skip the compile phase, use the compile binaries as jar from the cache.

The problem with it, every time job runs on a different gitlab runner, absolute path changes (the 'xptd' is the runner name in the next run it can be 'ABCD'), so takari thinks everytime file changed but there is absolutely no change / commit to the repository.

Would it not be enough to put file relative to maven project root (${project.base.dir}) in the incremental file at the end of the day, if the file is there relative to maven and hash code is same, it means file didn't change.

If it would be breaking change to implement such a thing, is it possible to make at least configurable, like for ex, 'absolute_path_for_incremental_state' true or false?

Or is there another reason to have this as absolute path that I am missing...

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

No branches or pull requests

1 participant