New Theory:
The hdk_entry_defs macro is building the entry_defs list and, I suspect, num_entry_types is used to hold the count of entry types. When we have multiple modules within the same integrity zome and each module includes its OWN hdk_entry_defs macro, Holochain is trying to define num_entry_types multiple times -- hence, the error.
Evidence:
I moved all hdk_entry_defs for the holon zome to its lib.rs file and everything built fine.
Next I added a new module Foo with a helper struct named Foo and add an hdk_entry_defs macro call in that file.
the result was error: symbol num_entry_types is already defined
I moved the entry_defs entry from the Foo module file to lib.rs and everything built fine again
Fix: Move the hdk_entry_defs (and hdk_link_defs) to the lib.rs file for the zome (i.e., remove them from the individual module files).
from Steve:
New Theory: The hdk_entry_defs macro is building the entry_defs list and, I suspect, num_entry_types is used to hold the count of entry types. When we have multiple modules within the same integrity zome and each module includes its OWN hdk_entry_defs macro, Holochain is trying to define num_entry_types multiple times -- hence, the error.
Evidence:
Fix: Move the hdk_entry_defs (and hdk_link_defs) to the lib.rs file for the zome (i.e., remove them from the individual module files).