Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

feat(ethers-solc): add with_via_ir_minimum_optimization #2504

Merged

Conversation

spockP
Copy link
Contributor

@spockP spockP commented Jul 11, 2023

Motivation

related to foundry-rs/foundry#5349:

More and more people (including myself) are using the magical via-ir to solve the "stack too deep" issue. However, this would cause problems in test coverage as all the optimizations are disabled in test coverage.

The solidity team suggests working around this issue by enabling "via-ir" with a ethereum/solidity#12533 (comment)

And this workaround is also recommended in the FAQ of solcoverage.

In this pr, a new "--ir-minimum" option is added to the coverage subcommand, which enables "via-ir" with a minimum amount of optimization.

And @mattsse suggests adding a function to the Settings type in ethers-solc.

Solution

Add a function called with_via_ir_minimum_optimization for enabling viaIR with a minimum amount of optimization.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Copy link
Collaborator

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

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

Thanks!

@DaniPopes DaniPopes merged commit 12e708f into gakonst:master Jul 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants