Open
Description
Component
Forge
Describe the feature you would like
UPDATE see #7212 (comment)
I would like the forge build command to expose this, so one can pass --stop-after parsing
solc and only get the AST without compiling to bytecode
As a potential optimization, foundry could look if the solidity files' content is unchanged and reuse the AST on disk for compilation by giving them to solc when forge build --stop-after parsing && forge build/test
is run.
Additional context
{
// If language is set to "SolidityAST", an AST needs to be supplied under the "ast" key
// and there can be only one source file present.
// The format is the same as used by the `ast` output.
// Note that importing ASTs is experimental and in particular that:
// - importing invalid ASTs can produce undefined results and
// - no proper error reporting is available on invalid ASTs.
// Furthermore, note that the AST import only consumes the fields of the AST as
// produced by the compiler in "stopAfter": "parsing" mode and then re-performs
// analysis, so any analysis-based annotations of the AST are ignored upon import.
"ast": { ... }
},
Metadata
Metadata
Assignees
Type
Projects
Status
Todo