Repository navigation
Save compilation warnings #256
Copy link
Copy link
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
Currently the compilation warnings are not saved by crytic-compile, and they are just being emitted through log:
crytic-compile/crytic_compile/platform/solc.py
Lines 534 to 541 in 35d95d6
| stdout_, stderr_ = process.communicate() | |
| stdout, stderr = ( | |
| stdout_.decode(encoding="utf-8", errors="ignore"), | |
| stderr_.decode(encoding="utf-8", errors="ignore"), | |
| ) # convert bytestrings to unicode strings | |
| if stderr and (not solc_disable_warnings): | |
| LOGGER.info("Compilation warnings/errors on %s:\n%s", filename, stderr) |
crytic-compile/crytic_compile/platform/truffle.py
Lines 178 to 189 in 35d95d6
| stdout, stderr = ( | |
| stdout_bytes.decode(), | |
| stderr_bytes.decode(), | |
| ) # convert bytestrings to unicode strings | |
| if truffle_overwrite_config: | |
| assert config_used | |
| _reload_config(Path(self._target), config_saved, config_used) | |
| LOGGER.info(stdout) | |
| if stderr: | |
| LOGGER.error(stderr) |
etc..
We could save the log, and make them available for third parties analyses. We need to check what errors are reported by every tool (stdout/stderr).
This will require to update our standard export to load/save the new info: https://github.com/crytic/crytic-compile/blob/master/crytic_compile/platform/standard.py
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed
Activity