Skip to content

Commit

Permalink
Don't auto write p2pProtocol macro expansion to file (#678)
Browse files Browse the repository at this point in the history
  • Loading branch information
jangko committed Feb 16, 2024
1 parent b9c40e1 commit efe610e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions eth/p2p/p2p_protocol_dsl.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit efe610e

Please sign in to comment.