Skip to content

Save compilation warnings #256

Description

@montyly

Currently the compilation warnings are not saved by crytic-compile, and they are just being emitted through log:

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)

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions