Skip to content

forge build --sizes does not display contract if using external library #3375

Closed
@grandizzy

Description

@grandizzy

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (226affb 2022-09-27T00:10:46.164877008Z)

What command(s) is the bug in?

forge build --sizes

Operating System

Linux

Describe the bug

repo to replicate issue https://github.com/grandizzy/forge-sizes-bug
when contract does not use an external (ExternalMaths) library, its size is properly shown

│ Contract      ┆ Size (kB) ┆ Margin (kB) │
│ Counter       ┆ 0.247     ┆ 24.329      │
│ ExternalMaths ┆ 0.226     ┆ 24.35       │
│ Maths         ┆ 0.226     ┆ 24.35       │

when importing and using it, contract is removed from forge build --sizes report

│ Contract      ┆ Size (kB) ┆ Margin (kB) │
│ ExternalMaths ┆ 0.226     ┆ 24.35       │
│ Maths         ┆ 0.226     ┆ 24.35       │

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions