smarter enum file parsing (#2765)

* enumInputFiles

* fix
This commit is contained in:
Matthew Kennedy 2021-05-30 16:24:52 -07:00 committed by GitHub
parent 526f1f97a0
commit 8dec425cec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 4 deletions

View File

@ -102,6 +102,7 @@ public class ConfigDefinition {
String cacheZipFile = null;
String signatureDestination = null;
String signaturePrependFile = null;
List<String> enumInputFiles = new ArrayList<>();
CHeaderConsumer.withC_Defines = true;
File[] yamlFiles = null;
@ -172,10 +173,7 @@ public class ConfigDefinition {
signatureDestination = args[i + 1];
break;
case EnumToString.KEY_ENUM_INPUT_FILE:
String inputFile = args[i + 1];
// todo: 1) can we 2) should we move this relatively heavy processing after we've checked if generation is needed?
state.enumsReader.process(".", inputFile);
SystemOut.println(state.enumsReader.getEnums() + " total enumsReader");
enumInputFiles.add(args[i + 1]);
break;
case KEY_CACHE:
cachePath = args[i + 1];
@ -220,6 +218,14 @@ public class ConfigDefinition {
return;
}
if (!enumInputFiles.isEmpty()) {
for (String ef : enumInputFiles) {
state.enumsReader.process(".", ef);
}
SystemOut.println(state.enumsReader.getEnums() + " total enumsReader");
}
long crc32 = signatureHash(tsPath, inputAllFiles);
handleFiringOrder(firingEnumFileName);