Skip to content

chore(compilers): remove Solc AST-based Flattener - #107

Open
jose-compu wants to merge 1 commit into
foundry-rs:mainfrom
jose-compu:chore/remove-solc-ast-flatten
Open

chore(compilers): remove Solc AST-based Flattener#107
jose-compu wants to merge 1 commit into
foundry-rs:mainfrom
jose-compu:chore/remove-solc-ast-flatten

Conversation

@jose-compu

Copy link
Copy Markdown

Drop the legacy Flattener that compiled via Solc solely to obtain ASTs. Flattening now relies exclusively on the Solar-based ProjectPathsConfig::flatten path.

Closes foundry-rs/foundry#10965

Details

  • Remove the Solc AST-based Flattener from foundry-compilers
  • Keep Solar-based ProjectPathsConfig::flatten as the sole flatten implementation
  • Update integration tests; remove tests for AST-only rename behavior

Closes foundry-rs/foundry#10965

Test plan

  • cargo test -p foundry-compilers --features="full project-util test-utils" --test project -- can_flatten
  • cargo test -p foundry-compilers --features="full project-util test-utils" --test project -- cannot_flatten

Drop the legacy Flattener that compiled via Solc solely to obtain ASTs.
Flattening now relies exclusively on the Solar-based
ProjectPathsConfig::flatten path.

Closes foundry-rs/foundry#10965

@mablr mablr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thank you! Please fix CI.

}

#[test]
fn can_flatten_with_duplicates() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should keep all the tests and convert them if necessary.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(foundry-compilers): remove Solc AST usage in forge flatten

3 participants