Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement auto compile #210

Open
Tracked by #220
montyly opened this issue Aug 12, 2021 · 1 comment
Open
Tracked by #220

Implement auto compile #210

montyly opened this issue Aug 12, 2021 · 1 comment
Labels
enhancement New feature or request high-priority

Comments

@montyly
Copy link
Member

montyly commented Aug 12, 2021

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.

(tagging @Xenomega for visibility)

@montyly montyly added enhancement New feature or request high-priority labels Aug 12, 2021
@montyly montyly mentioned this issue Nov 29, 2021
7 tasks
montyly added a commit that referenced this issue Jul 18, 2022
@montyly
Copy link
Member Author

montyly commented Jul 19, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high-priority
Projects
None yet
Development

No branches or pull requests

1 participant