Skip to content

Commit

Permalink
fix: adjust compile path to allow interfaces/ folder
Browse files Browse the repository at this point in the history
by modifying allow_paths to use the project root folder, interfaces
may be included in projects without use of the interface_sources
kwarg. this also allows more expressive error messages when importing
an interface fails.
  • Loading branch information
iamdefinitelyahuman committed Apr 20, 2020
1 parent d1e0308 commit edf8b74
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions brownie/project/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def _compile(self, contract_sources: Dict, compiler_config: Dict, silent: bool)
cwd = os.getcwd()
if self._path is not None:
_install_dependencies(self._path)
allow_paths = self._path.joinpath("contracts").as_posix()
allow_paths = self._path.as_posix()
os.chdir(self._path)

try:
Expand All @@ -84,7 +84,6 @@ def _compile(self, contract_sources: Dict, compiler_config: Dict, silent: bool)
evm_version=compiler_config["evm_version"],
silent=silent,
allow_paths=allow_paths,
interface_sources=self._sources.get_interface_sources(),
remappings=compiler_config["solc"].get("remappings", []),
optimizer=compiler_config["solc"].get("optimizer", None),
)
Expand Down

0 comments on commit edf8b74

Please sign in to comment.