scaffold-eth / scaffold-eth-2

Open source forkable Ethereum dev stack
https://scaffoldeth.io
MIT License
1.41k stars 887 forks source link

Forge flags not being passed on latest foundry branch #948

Closed escottalexander closed 1 month ago

escottalexander commented 2 months ago

@technophile-04 On the latest foundry branch this new issue exists due to the use of Make. Prior to the introduction of the Makefile you could run

yarn foundry:test -vvvv

or --match-test, etc. and get trace logs on the tests.

Now the extra flags are processed by Make and so you get this output:

[elliott@fedora token-voting]$ yarn foundry:test -vvv
GNU Make 4.4.1
Built for x86_64-redhat-linux-gnu
Copyright (C) 1988-2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
[elliott@fedora token-voting]$ 
technophile-04 commented 2 months ago

Ohhh you are right! we need to find a way to make sure that flags passed through or another solution might be just have -vvvv by default? Will try to tinker on this Thanks @escottalexander !

escottalexander commented 2 months ago

While you are considering this it would also be pretty crucial IMO to have the --match-test "TEST_NAME" flag as well. If you have several failing tests and are using the -vvvv flag then the output is overwhelming. Always helps to narrow it down to a single test.

technophile-04 commented 1 month ago

Hey @escottalexander created #950, I think other than test it not much needed to pass in flags? If there are some edge cases people can always cd packages/foundry and run commands for their choices?

escottalexander commented 1 month ago

@technophile-04 Yes! This seems to be a good way around the problem. I agree that there aren't any other commands that require passing flags that I use commonly. Tested your solution and it works well for me.

technophile-04 commented 1 month ago

Tysm @escottalexander for testing and raising issue!!