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.04k stars 1.64k forks source link

Add way to read path to `solc` binary used by `forge` #5429

Open llllvvuu opened 1 year ago

llllvvuu commented 1 year ago

Component

Forge

Describe the feature you would like

Could be useful for plugging into other tooling I think.

Like

SOLC = $(forge which_solc)
slither --solc $SOLC

maybe I'm overthinking this.

Additional context

No response

0xalpharush commented 1 year ago

@Evalir I asked about printing the version Forge decides is compatible when auto_detect_solc is enabled on TG. Perhaps we can print both the path and version

Evalir commented 1 year ago

yep agree! i think we could have both commands i think—should be relatively straightforward to implement

0xalpharush commented 10 months ago

Would you be able to point me how to approach this?

zerosnacks commented 1 month ago

Related: https://github.com/foundry-rs/foundry/issues/5715 + https://github.com/foundry-rs/foundry/issues/6099

zerosnacks commented 1 month ago

Could possibly be useful to include as part of work on compiler settings, especially now that we also support alternative compilers (cc @klkvr)

zerosnacks commented 3 weeks ago

Related PR: https://github.com/foundry-rs/foundry/pull/7909, effectively unlocked past that

Could possibly be incorporated as part of that PR or as a follow up