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 skip option is not respected and still compiles and generates build info for tests #4830

Closed
1 of 2 tasks
0xalpharush opened this issue Apr 26, 2023 · 3 comments
Closed
1 of 2 tasks
Labels
T-bug Type: bug

Comments

@0xalpharush
Copy link
Contributor

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 (dedc31e 2023-04-26T00:13:24.012522000Z)

What command(s) is the bug in?

forge build

Operating System

macOS (Apple Silicon)

Describe the bug

The skip flag does not seem to have an effect and build info is still created in the out directory for test contracts. I would expect only artifacts for Counter.sol to be generated

$ forge init
$ forge build --build-info --skip test
$ ls out/
Base.sol        Counter.sol     Script.sol      StdCheats.sol   StdMath.sol     StdUtils.sol    build-info      console2.sol
Counter.s.sol   IMulticall3.sol StdChains.sol   StdJson.sol     StdStorage.sol  Vm.sol          console.sol
@0xalpharush 0xalpharush added the T-bug Type: bug label Apr 26, 2023
@mds1
Copy link
Collaborator

mds1 commented Apr 26, 2023

You are also building the script folder as evidenced by the Counter.s.sol file. You can use forge build --build-info --skip test script to also skip the script folder

@0xalpharush
Copy link
Contributor Author

Ah, I didn't realize these were related to scripts. Thanks!

@mds1
Copy link
Collaborator

mds1 commented Apr 26, 2023

No problem! Just to clarify those files are related to both scripts and tests, i.e. the forge-std default Script and Test contracts that scripts/tests inherit from includes all of those contracts, but in this case they were present in out/ due to the script specifically

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

No branches or pull requests

2 participants