Skip to content

Commit

Permalink
feat: V1 (#5223)
Browse files Browse the repository at this point in the history
* feat(`cheatcodes`): `1.0` cheatcode changes (#5045)

* feat(`cheatcodes`): Make expectCall only work for the next call's subcalls (#5032)

* chore: make expect call only work for the next call

* chore: make expectCall actually check only the next call's subcalls

* chore: fmt

* chore: introduce checks at the main call level, not at the subcall level

* chore: handle dangling expected calls gracefully

* chore: fix tests

* chore: fmt

* chore: forge fmt

* chore: actually exclude depth the cheatcode was called from

* chore: tests

* chore: better docs

* chore: comment out impossible to check condition on expectCall

* chore: remove unused check

* fix(cheatcodes): Correct `expectRevert` behavior (#4945)

* chore: add repro test to pass

* chore: strictly check for the depth expectRevert was called in, instead of being able to peek at function end

* chore: tests

* chore: add more repro tests

* chore: fmt

* chore: clippy

* chore: fixup problematic tests, mark them as not working properly

* chore: forge fmt

* chore: forge fmt

* Update evm/src/executor/inspector/cheatcodes/mod.rs

* chore: add more info to changelog

* chore: fmt

* chore(tests): add more cases for `expectEmit` (#5076)

* chore(tests): add more extreme cases for expectEmit

* chore(tests): add next call fail case for expectEmit

* chore(`cheatcodes`): add more edge case tests on `expect*` cheatcodes (#5135)

* chore: add edge-cases

* chore: add edge case covering #4920 (comment)

* feat(`cheatcodes`): disallow usage of `expectRevert` with `expectCall` and `expectEmit`  (#5144)

* feat(cheatcodes): disallow usage of expectCall/Emit with expectRevert

* chore: add tests

* chore: fmt

* chore: fmt

* `foundryup`: v1 changes (#5158)

* feat(foundryup): look for v1 tag instead of nightly for normal foundryup

* feat(foundryup): add ability to download legacy nightly binary with -L flag

* feat: use latest release for figuring out the tag name

* chore(foundryup): slightly improve stable release detection

* chore: use proper repo

* make fns async

* chore: remove prb math from integration tests

* chore: forge fmt

* chore: fix some merge leftovers

* chore: last test fixes

* chore: forge fmt

* chore: uncomment etch test

* feat(docs): add `RELEASE_PROCESS.md` (#5269)

* feat(docs): add RELEASE_PROCESS.md

* chore: not include changelog changes in step

* chore: bump crates to 1.0.0 (#5346)
  • Loading branch information
Evalir committed Jul 10, 2023
1 parent d19cd43 commit afdbbc0
Show file tree
Hide file tree
Showing 40 changed files with 928 additions and 207 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
PLATFORM_NAME: ${{ matrix.job.platform }}
TARGET: ${{ matrix.job.target }}
ARCH: ${{ matrix.job.arch }}
VERSION_NAME: ${{ (env.IS_NIGHTLY && 'nightly') || needs.prepare.outputs.tag_name }}
VERSION_NAME: ${{ (env.IS_NIGHTLY == true && 'nightly') || needs.prepare.outputs.tag_name }}
run: |
if [ "$PLATFORM_NAME" == "linux" ]; then
tar -czvf "foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" -C ./target/${TARGET}/release forge cast anvil chisel
Expand All @@ -164,7 +164,7 @@ jobs:
env:
PLATFORM_NAME: ${{ matrix.job.platform }}
TARGET: ${{ matrix.job.target }}
VERSION_NAME: ${{ (env.IS_NIGHTLY && 'nightly') || needs.prepare.outputs.tag_name }}
VERSION_NAME: ${{ (env.IS_NIGHTLY == true && 'nightly') || needs.prepare.outputs.tag_name }}
run: |
sudo apt-get -y install help2man
help2man -N ./target/${TARGET}/release/forge > forge.1
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ To use the latest pinned nightly on your CI, modify your Foundry installation st

- [expectEmit](https://github.com/foundry-rs/foundry/pull/4920) will now only work for the next call.
- expectCall will now only work if the call(s) are made exactly after the cheatcode is invoked.
- [expectRevert will now work if the next call does revert](https://github.com/foundry-rs/foundry/pull/4945), instead of expecting a revert during the whole test.
- This will very likely break your tests. Please make sure that all the calls you expect to revert are external, and if not, abstract them into a separate contract so that they can be called externally and the cheatcode can be used.
- `-m`, the deprecated alias for `--mt` or `--match-test`, has now been removed.
- expectRevert will now work if the next call does revert, instead of expecting a revert during the whole test.
- [startPrank will now override the existing prank instead of erroring](https://github.com/foundry-rs/foundry/pull/4826).
- [precompiles will not be compatible with all cheatcodes](https://github.com/foundry-rs/foundry/pull/4905).
- The difficulty and prevrandao cheatcodes now [fail if not used with the correct EVM version](https://github.com/foundry-rs/foundry/pull/4904).
Expand Down
42 changes: 21 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions RELEASE_PROCESS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## Foundry Release Process

## Introduction

From 1.0 onwards, Foundry has a stable release process that is followed for each new version. This document serves as a guide and explanation for the process.

## Step 1 - Testing and benchmarking

Prior to creating a release commit and tagging it for release, we carefully test and benchmark the chosen commit. This is made to ensure that regressions are not made, and measure performance differences across versions.

## Step 2 - Create release commit

Creating a release commit involves the following steps:
- Crates are version-bumped accordingly.
- This crate bump gets committed along with the new corresponding tag, e.g `v1.0.0` or `v1.1.3`.

## Step 3 - Create tag and dispatch release workflow

- A tag is created for the new release commit.
- The tag is then pushed, and the release workflow will be automatically dispatched. The result of the workflow will be a new release with all the relevant files (binary, man pages and changelog).

## Step 4 - Release sanity test

- Once released, the new release is tested to ensure distribution channels (`foundryup`) can download and install the release.

## Miscellaneous

- The working branch is `master`. We do not follow a complicated `staging`/`master` separation, but rather choose to create tags at specific points on the branch history.
- The release channels are currently simple, and still based on `foundryup`. Different distribution channels might be considered down the line.
2 changes: 1 addition & 1 deletion abi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "foundry-abi"
version = "0.1.0"
version = "1.0.0"
edition = "2021"
license = "MIT OR Apache-2.0"
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion anvil/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "anvil"
version = "0.1.0"
version = "1.0.0"
edition = "2021"
license = "MIT OR Apache-2.0"
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion binder/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "foundry-binder"
version = "0.1.0"
version = "1.0.0"
edition = "2021"
license = "MIT OR Apache-2.0"
readme = "./README.md"
Expand Down
2 changes: 1 addition & 1 deletion cast/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cast"
version = "0.2.0"
version = "1.0.0"
edition = "2021"
license = "MIT OR Apache-2.0"
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion chisel/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "chisel"
version = "0.1.1"
version = "1.0.0"
edition = "2021"
authors = [
"clabby <https://github.com/clabby>",
Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "foundry-cli"
version = "0.2.0"
version = "1.0.0"
edition = "2021"
license = "MIT OR Apache-2.0"
readme = "README.md"
Expand Down
6 changes: 4 additions & 2 deletions cli/tests/it/integration.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
use foundry_cli_test_utils::{forgetest_external, util::setup_forge_remote};

forgetest_external!(solmate, "transmissions11/solmate");
forgetest_external!(prb_math, "PaulRBerg/prb-math");
// Commenting until PRB migration.
// forgetest_external!(prb_math, "PaulRBerg/prb-math");
forgetest_external!(prb_proxy, "PaulRBerg/prb-proxy");
forgetest_external!(solady, "Vectorized/solady");
// Commenting until solady PR merged
// forgetest_external!(solady, "Vectorized/solady");
forgetest_external!(
geb,
"reflexer-labs/geb",
Expand Down
2 changes: 1 addition & 1 deletion common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "foundry-common"
version = "0.1.0"
version = "1.0.0"
edition = "2021"
license = "MIT OR Apache-2.0"
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion config/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "foundry-config"
version = "0.2.0"
version = "1.0.0"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Foundry configuration"
Expand Down
2 changes: 1 addition & 1 deletion evm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "foundry-evm"
version = "0.2.0"
version = "1.0.0"
edition = "2021"
license = "MIT OR Apache-2.0"
readme = "../README.md"
Expand Down
Loading

0 comments on commit afdbbc0

Please sign in to comment.