Skip to content

Commit

Permalink
fix a parallelization bug (#66)
Browse files Browse the repository at this point in the history
for performance reasons, vyper exceptions can have lambdas in them.
resolve the lambdas before raising to the parent process
  • Loading branch information
charles-cooper authored Sep 22, 2024
1 parent 4868c4d commit 4e702fe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion moccasin/commands/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from boa.contracts.vvm.vvm_contract import VVMDeployer
from boa.contracts.vyper.vyper_contract import VyperDeployer
from vyper.compiler.phases import CompilerData
from vyper.exceptions import VersionException
from vyper.exceptions import VersionException, _BaseVyperException

from moccasin.config import get_config, initialize_global_config
from moccasin.constants.vars import BUILD_FOLDER, CONTRACTS_FOLDER, MOCCASIN_GITHUB
Expand Down Expand Up @@ -125,6 +125,10 @@ def compile_(
logger.info(f"Perhaps make an issue on the GitHub repo: {MOCCASIN_GITHUB}")
logger.info("If this contract is optional, you can ignore this error.")
return None
except _BaseVyperException as exc:
if callable(exc._hint):
exc._hint = exc._hint()
raise exc

abi: list
bytecode: bytes
Expand Down

0 comments on commit 4e702fe

Please sign in to comment.