Don't check hash while generating hash.
A common usecase of -Lhash is to add a new hash to
a current.txt file. However, doing so requires removing
old hashes which then must be re-added for correctness.
This is because hashes of released interfaces should never be
removed.
Here I've made it so that -Lhash will return a hash for
valid interfaces even if the hash fails. I've also added
this to hidl_hash_test.
Test: hidl_hash_test
Bug: 62858322
Change-Id: I840086ae59656c73c7109b20c142da27b47f80f8
diff --git a/main.cpp b/main.cpp
index b7d5a96..3c29a09 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1147,7 +1147,8 @@
}
for (const auto ¤tFqName : packageInterfaces) {
- AST *ast = coordinator->parse(currentFqName);
+ AST* ast = coordinator->parse(currentFqName, {} /* parsed */,
+ Coordinator::Enforce::NO_HASH /* enforcement */);
if (ast == NULL) {
fprintf(stderr,