Skip to content

Conversation

DaniPopes
Copy link
Member

@DaniPopes DaniPopes commented Aug 29, 2025

The call to solc when compiling involves parsing and analysis, which is the minimum work the compiler will do if nothing is requested, but this is still slow on the order of 100s of ms to a few seconds. We want to avoid this as much as possible because it's completely unused, as we're requesting nothing and we just want to run the pipeline to get the in-memory solar compiler from the output.

Together with updating foundry-compilers for a cache bug fix (foundry-rs/compilers#312), this makes solar_project almost never call to solc.

Currently only used by forge eip712 (#11458), but will see more usage with #11456.

Copy link
Contributor

@0xrusowsky 0xrusowsky left a comment

Choose a reason for hiding this comment

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

makes sense!

@0xrusowsky
Copy link
Contributor

should also be useful for the formatter

@DaniPopes DaniPopes merged commit a02c14b into master Aug 29, 2025
23 checks passed
@DaniPopes DaniPopes deleted the dani/solar-project-cache branch August 29, 2025 17:16
@github-project-automation github-project-automation bot moved this to Done in Foundry Aug 29, 2025
MerkleBoy pushed a commit to MerkleBoy/foundry that referenced this pull request Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants