openVirus icon indicating copy to clipboard operation
openVirus copied to clipboard

"Make"-like facility in `AMI`

Open petermr opened this issue 5 years ago • 0 comments

ami operates over a CProject (or a list of CTrees which are often only partially processed. This could be because:

  • new CTrees have been downloaded
  • processing was interrupted (crash, timeout)

It's useful to be able to skip the items already processed, especially as some processes can take seconds or even longer. Skipping is not trivial as the dependencies may be complex but we can give some simple rules. At present we have a facility CMFileUtil.shouldMake

		File svgDir = this.getExistingSVGDir();
		if (svgDir != null && !CMFileUtil.shouldMake(forceMake, svgDir, existingFulltextPDF)) {
			System.out.print("make skipped ");
			return false;
		}

Read as "

build if (forceMake or svgDir is missing or svgDir is olderThan existingFulltextPDF)

This has been implemented in several subcommands. However it's hardcoded and would be much better declaratively and perhaps linked to the @Command itself.

petermr avatar May 25 '20 09:05 petermr