foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
8.13k stars 1.68k forks source link

Add more logs to keep track of progress when installing missing dependencies in `forge build` #4675

Open clearloop opened 1 year ago

clearloop commented 1 year ago

Component

Forge

Describe the feature you would like

It takes a while running forge build and somtimes it got broken by http requests on my machine, so better to add more logs to it that users can get known they're stucking in which step

btw it would be nice providing --verbose for this command as well

Additional context

No response

mds1 commented 1 year ago

somtimes it got broken by http requests on my machine

Can you expand on what you mean here?

Also if it helps, you can use something like RUST_LOG=ethers_solc forge build or RUST_LOG=ethers,ethers_solc,forge forge build to see more logs when building. Most likely it's just that sometimes solc can take a while to compile, I'm not sure how verbose solc is with logs as to why though, but maybe @mattsse will know

clearloop commented 1 year ago

Can you expand on what you mean here?

for example downloading solc(ref https://github.com/gakonst/ethers-rs/issues/2319) or this line

https://github.com/foundry-rs/foundry/blob/87bc53fc6c874bd4c92d97ed180b949e3a36d78c/cli/src/cmd/forge/build/mod.rs#L91

installing from the internet should always go with logs since it spends more time than compiling lots of time, I don't even know what's happenning when it gets stuck before walking through the source code xd

mattsse commented 1 year ago

installing from the internet should always go with logs since it spends more time than compiling lots of time

agree!

will add some