Skip to content

forge flatten duplication of interfaces/contract names #262 #4034

@gbalabasquer

Description

@gbalabasquer

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 (a44159a 2023-01-02T00:04:45.597843Z)

What command(s) is the bug in?

forge flatten

Operating System

macOS (Apple Silicon)

Describe the bug

When running forge flatten <file> in a project that the path of files includes multiple interfaces/contracts with the same name, the command can't solve the duplication and just generate the output with the same name repeated.
For example if running forge flatten command in this file: https://github.com/makerdao/spells-goerli/blob/solc-0.8/src/DssSpell.sol will generate the result with two OracleLike interfaces. Hevm would have produced OracleLike_1 and OracleLike_2 instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions