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

script contract does not get compiled while under scripts #1895

Closed
2 tasks done
Perelyn-sama opened this issue Jun 9, 2022 · 5 comments
Closed
2 tasks done

script contract does not get compiled while under scripts #1895

Perelyn-sama opened this issue Jun 9, 2022 · 5 comments
Labels
T-bug Type: bug

Comments

@Perelyn-sama
Copy link
Contributor

Perelyn-sama commented Jun 9, 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 (3fc1491 2022-06-06T00:12:33.657656525Z)

What command(s) is the bug in?

forge build

Operating System

Linux

Describe the bug

After I create a foundry project by running forge init <project_name>, I create a folder in it called scripts and add a script contract to it.

Then when I run forge build every contract in the project except the one in the scripts folder compiles. For some reason forge build ignores the script contract when it's in the scripts folder but when I move it to the src folder or the test folder, it gets compiled.

I also get this issue when I try to run forge script but I'm guessing forge build is the source of the bug.

btw, I'm on windows but I'm running WSL. There was no option for it so I just choose Linux.

@Perelyn-sama Perelyn-sama added the T-bug Type: bug label Jun 9, 2022
@mattsse
Copy link
Member

mattsse commented Jun 9, 2022

with fixed script folder detection here #1877 not sure if this is in today's nightly

also I believe the default location is script, you can check with forge config

@Perelyn-sama
Copy link
Contributor Author

Thanks for the reply. I'll try naming it script.

@Perelyn-sama
Copy link
Contributor Author

It still does not compile it.

image

@mattsse
Copy link
Member

mattsse commented Jun 9, 2022

forge 0.2.0 (3fc1491 2022-06-06T00:12:33.657656525Z)

can you foundryup and try again?

@Perelyn-sama
Copy link
Contributor Author

Works perfectly. Thanks, man.

I ran foundryup so much previously to fix this that I forgot about 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
No open projects
Archived in project
Development

No branches or pull requests

2 participants