Are there any services to consume to help implemen...
# plugin-development
j
Are there any services to consume to help implementing a per-file compilation avoidance cache? For a custom language or process.
j
How int he world did I miss that. Hehe. Thanks
So I've implemented that in some of my tasks. But, I have a task which extends Sync, early in the process (renames files to a destination for later tasks to process). It looks like Sync invalidates everything and causes the later tasks to run full.
Not sure why though.... I would think Sync would do nothing for files that haven't changed already.
v
Whatever
Sync
does should be quite irrelevant except if it touches the outputs of that other task or actually modifies the inputs of that other task. Hard to tell what might be the issue without having the build at hand. But
--info
also should tell you why an incremental inputs task is not run incrementally.
j
So, I have a source dir, a temp dir, and an output dir (this is actually much simpler than it really is). Sync runs first and copies from source to temp. TheWorkTask runs second and processes temp into output.
Reading around it looks like Sync and Copy both are still non incremental, and rewrite everything.
v
Yes, they do, but that should be irrelevant.
j
Build cache key for task ':vcprepAwgBatchCobol' is a6ce6eff52cf44d0fcc1f0a849d0c88b Task ':vcprepAwgBatchCobol' is not up-to-date because: Input property '$1' file D:\awg\awg-mainframe\build\tmp\initAwgBatchCobol\ABENDL.cbl has changed. The input changes require a full rebuild for incremental task ':vcprepAwgBatchCobol'. full
That's sorta the best I get.....
It does in fact know only a single file changed!
v
Yeah, but
Input property '$1'
, that means something you registered with
inputs.file
and not something in your incremental inputs.
If any input besides the explicitly declared incremental input is changing, it cannot run incrementally, as that means an input that affects all of the incremental input files has changed
If you for example have an incremental input with 10 files Your incremental action is to replace a placeholder with a version in those files You have an additional input that defines the version to fill in. If one of the incremental files changes, your task can run incrementally and only handle that file. But if the version changes, all files have to be processed.
j
I don't follow. I mean, it says which file changed. But isIncremental returns false.
Or are you saying... maybe... that because I have an incrmentalinputs property (setSource), but ALSO register the same files with getInputs(), that the latter invalidates the whole thing?
Ahh. Yup. That was it.
v
Exactly