You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are having a lot of issues in Slither due to bugs in the underlying compilation platforms that lead to broken ASTs.
We could overcome these issues by running solc directly. The main pitfalls to use solc is to select what files are needed in the compilation units, and the configuration (solc version, optimization, etc). However, the underlying compilation platform might be able to give us the correct list of files, even if the ASTs are incorrect, or at least give us most of the files and the configuration.
As a result, we could have an "auto recompile" mode that we could trigger automatically in case of failure that would do:
Collect the filenames from the underlying platform
Allow the users to specify missing files (if there are some)
Call solc with the input standard json, with all the files and the configuration
An alternative would be to implement the same heuristics as the compilation platforms to recover the set of files and their associated compilation units. But this will require more efforts, to support all the different format (contracts, interfaces, dependencies in nodejs/python-based frameworks, ...)
We can probably rely on the compilation unit in the short term, and move toward the full heuristic in the long term
Additionally, this mode would allow to significantly reduce the compilation time in case of re-runs.
Bumping this. We need to make it a priority + add an easy way to configure the set of files & remapping
Nowadays codebase can take a lot of time to compile, so we need to allows the user to configure what files they want to compile without having to compile everything
We are having a lot of issues in Slither due to bugs in the underlying compilation platforms that lead to broken ASTs.
We could overcome these issues by running
solc
directly. The main pitfalls to usesolc
is to select what files are needed in the compilation units, and the configuration (solc version, optimization, etc). However, the underlying compilation platform might be able to give us the correct list of files, even if the ASTs are incorrect, or at least give us most of the files and the configuration.As a result, we could have an "auto recompile" mode that we could trigger automatically in case of failure that would do:
solc
with the input standard json, with all the files and the configurationAn alternative would be to implement the same heuristics as the compilation platforms to recover the set of files and their associated compilation units. But this will require more efforts, to support all the different format (
contracts
,interfaces
, dependencies in nodejs/python-based frameworks, ...)We can probably rely on the compilation unit in the short term, and move toward the full heuristic in the long term
Additionally, this mode would allow to significantly reduce the compilation time in case of re-runs.
(tagging @Xenomega for visibility)
The text was updated successfully, but these errors were encountered: