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 build compile the YUL file with the error "Field "settings.remappings" cannot be used for Yul." #3173

Closed
1 of 2 tasks
bixia opened this issue Sep 11, 2022 · 3 comments
Closed
1 of 2 tasks
Assignees
Labels
C-forge Command: forge Cmd-forge-build Command: forge build T-bug Type: bug

Comments

@bixia
Copy link
Contributor

bixia commented Sep 11, 2022

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 (1d1e182 2022-09-11T00:04:31.351526Z)

What command(s) is the bug in?

forge b

Operating System

macOS (Apple Silicon)

Describe the bug

i write an YUL file, and i hope the forge can compile it for me. but it fails with the corresponding error:

(base)   temp git:(master)  forge b  
[] Compiling...
[] Compiling 10 files with 0.8.16
[] Solc 0.8.16 finished in 1.99s
[] Compiling 1 files with 0.8.16
[] Solc 0.8.16 finished in 6.38ms
Error: 
Compiler run failed
Field "settings.remappings" cannot be used for Yul.

and also, i create an repo to replicate this error, please check:
https://github.com/bixia/temp/tree/master/src

@bixia bixia added the T-bug Type: bug label Sep 11, 2022
@gakonst gakonst added this to Foundry Sep 11, 2022
@gakonst gakonst moved this to Todo in Foundry Sep 11, 2022
@rkrasiuk rkrasiuk added C-forge Command: forge Cmd-forge-build Command: forge build labels Sep 11, 2022
@rkrasiuk
Copy link
Collaborator

@bixia this error comes straight from the compiler since the remappings to forge-std & ds-test are added by default.
https://github.com/ethereum/solidity/blob/f808855329c8c704f0fb5d7d0738a439a5d2bfaf/libsolidity/interface/StandardCompiler.cpp#L1389-L1398

@mattsse @gakonst wdyt about doing a separate compiler run for .yul files if there are any detected?

@mattsse
Copy link
Member

mattsse commented Sep 11, 2022

that makes sense and another sanitize call on the CompilerInput to make it work with yul

@rkrasiuk rkrasiuk self-assigned this Sep 11, 2022
@rkrasiuk
Copy link
Collaborator

@mattsse sry for no update, i actually found the PR with support for yul in ethers that did that. i'll put out the PR shortly which omits remappings and revertStrings for yul

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-forge Command: forge Cmd-forge-build Command: forge build T-bug Type: bug
Projects
Archived in project
Development

No branches or pull requests

4 participants