Skip to content

Internal libraries in contracts does not internal into code if viaIR-mode is enabled and solidity-coverage is running #14055

Closed as not planned
@SevenSwen

Description

@SevenSwen

Solidity-coverage has broken inliner optimization.
When I run coverage with optimizerSteps:

"dhfoDgvlfnTUtnIf" +
"[" +
    "xa[r]EscLM" +
    "cCTUtTOntnfDIl" +
    "Lcl" +
    "Vcl [j]" +
    "Tpel" +
    "xa[rl]" +
    "xa[r]cL" +
    "gvif" +
    "CTUca[r]LSsTFOtfDnca[r]Ilc"
"]" +
  "jml[jl] VcTOcl jml",

(default settings without u instrumentation in all steps) than all tests will be finished success. But If I remove "gvif" step then I will have error:
NomicLabsHardhatPluginError: The contract <contract_name> is missing links for the following libraries: @openzeppelin/contracts/utils/math/Math.sol:Math
Repo/branch:
https://github.com/1inch/farming/tree/feature/enable_viaIR

Maybe problem into solidity-coverage code, but probably they do not make any injections into the optimization steps, and any of their actions should not affect the success of the code compilation.

I also added a comment to the solidity-coverage repo issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed due inactivityThe issue/PR was automatically closed due to inactivity.staleThe issue/PR was marked as stale because it has been open for too long.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions