Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forge clone compiling issues (src mapping seems to break imports) #7736

Closed
2 tasks done
wighawag opened this issue Apr 20, 2024 · 3 comments · Fixed by #7747
Closed
2 tasks done

forge clone compiling issues (src mapping seems to break imports) #7736

wighawag opened this issue Apr 20, 2024 · 3 comments · Fixed by #7747
Assignees
Labels
T-bug Type: bug

Comments

@wighawag
Copy link

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 (844caa8 2024-04-20T00:17:56.919599675Z)

What command(s) is the bug in?

forge clone

Operating System

Linux

Describe the bug

I execute:

forge clone  0x9d27527Ada2CF29fBDAB2973cfa243845a08Bd3F

I get

Compiler run failed:
Error (6275): Source "src/src/@openzeppelin/contracts/utils/introspection/IERC165.sol" not found: File not found.
 --> src/@openzeppelin/contracts/interfaces/IERC165.sol:5:1:
  |
5 | import "../utils/introspection/IERC165.sol";
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Error (6275): Source "src/src/@openzeppelin/contracts/utils/introspection/IERC165.sol" not found: File not found.
 --> src/@openzeppelin/contracts/token/ERC721/IERC721.sol:5:1:
  |
5 | import "../../utils/introspection/IERC165.sol";
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
...

even though the import path is fine

@wighawag wighawag added the T-bug Type: bug label Apr 20, 2024
@mattsse
Copy link
Member

mattsse commented Apr 20, 2024

@Troublor
@ZhangZhuoSJTU

there's an issue with nested src folders I believe

@openzeppelin/=src/@openzeppelin/
src/=src/src/

not sure how the etherscan metadata looks for this contract https://etherscan.io/address/0x9d27527Ada2CF29fBDAB2973cfa243845a08Bd3F#code

but it looks like we could write the files into the root folder and not into src to avoid the nested src, or simply strip the src

@ZhangZhuoSJTU
Copy link
Contributor

Sure, we will take a look!

Thanks for reporting! 🫡🫡🫡

@ZhangZhuoSJTU
Copy link
Contributor

@mattsse could you please assign this issue to either me or @Troublor? It would help us keep better track of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants