Don't auto write p2pProtocol macro expansion to file (#678)

This commit is contained in:
andri lim 2024-02-16 14:13:03 +07:00 committed by GitHub
parent b9c40e1380
commit efe610e27f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 5 deletions

View File

@ -1005,11 +1005,13 @@ macro emitForSingleBackend(
peerState.getType, networkState.getType)
result = p.genCode()
try:
result.storeMacroResult true
except IOError:
# IO error so the generated nim code might not be stored, don't sweat it.
discard
when defined(p2pProtocolDebug):
try:
result.storeMacroResult true
except IOError:
# IO error so the generated nim code might not be stored, don't sweat it.
discard
macro emitForAllBackends(backendSyms: typed, options: untyped, body: untyped): untyped =
let name = $(options[0])