Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix duplicate num_entry_types #36

Open
dauphin3 opened this issue Mar 26, 2023 · 1 comment · Fixed by #35
Open

fix duplicate num_entry_types #36

dauphin3 opened this issue Mar 26, 2023 · 1 comment · Fixed by #35

Comments

@dauphin3
Copy link
Collaborator

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:

  • 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).

@evomimic evomimic linked a pull request Apr 11, 2023 that will close this issue
@nphias
Copy link
Collaborator

nphias commented Apr 13, 2023

re-opening as branch has not been deleted

@nphias nphias reopened this Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants