Skip to content

feat: allow single file remappings #6706

@arthurneuron

Description

@arthurneuron

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 (9e3ab9b 2024-01-04T00:18:01.892563000Z)

What command(s) is the bug in?

forge test

Operating System

macOS (Apple Silicon)

Describe the bug

  • Correct path: lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol
  • Required Import: @openzeppelin/contracts/token/ERC721/IERC721Metadata.sol
  • This is not possible, since this exception is only for one file: @openzeppelin/contracts/token/ERC721/=lib/openzeppelin-contracts/contracts/token/ERC721/extensions/

remappings.txt

  • @openzeppelin/contracts/token/ERC721/IERC721Metadata.sol=lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol

Error:

  • failed to resolve file: "/Users/foundry/Developer/foundry/packages/contracts/lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol/": Not a directory (os error 20); check configured remappings.

remappings.txt

  • @openzeppelin/contracts/token/ERC721/=lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol

Error:

  • failed to resolve file: "/Users/foundry/Developer/foundry/packages/contracts/lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol/IERC721Metadata.sol": Not a directory (os error 20); check configured remappings.

remappings.txt

  • @openzeppelin/contracts/token/ERC721/IERC721Metadata.sol=lib/openzeppelin-contracts/contracts/token/ERC721/extensions/

Error:

  • failed to resolve file: "/Users/foundry/Developer/foundry/packages/contracts/lib/openzeppelin-contracts/contracts/token/ERC721/extensions/": Is a directory (os error 21); check configured remappings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Next Up

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions