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.31k stars 1.76k forks source link

feat(config): add `version` field to foundry.toml ("`engines`" equivalent) #5133

Open roninjin10 opened 1 year ago

roninjin10 commented 1 year ago

Component

Forge

Describe the feature you would like

npm has an engines field that allows you to specify a specific engine such as pnpm, node > 18 ect.

Similarly it would be nice if in a foundry.toml we could specify that foundry has to be pinned to a specific version or higher than a specific version.

Additional context

We are hacking this in optimism repo

mds1 commented 1 year ago

@Evalir this seems like something that would be good to support once we have v1 and semver

sambacha commented 3 days ago

the problem with this is that foundry does not retain/persist historical builds of foundry.

for reference, Optimism uses a version specifier like this: https://github.com/ethereum-optimism/optimism/blob/fa9ffcff224d0d75f595e6db087e0f8277ca9905/versions.json#L4

see https://github.com/foundry-rs/foundry/issues/6732#issuecomment-1889536123 and https://github.com/foundry-rs/foundry/issues/3895

im sure @tynes and @shazow have thoughts on this too