forge-std icon indicating copy to clipboard operation
forge-std copied to clipboard

proposal: limit compatibility of `forge-std` to `^0.8.13`

Open zerosnacks opened this issue 3 months ago • 0 comments

Motivation:

  • Current codebase is already not 0.6.* compatible as noted in https://github.com/foundry-rs/forge-std/issues/754 as hasn't been for a long time (~2 years as part of Test.sol). This was not caught sufficiently in the CI compatibility suite.
  • A recent poll shows that many users would be OK limiting future compatibility to ^0.8.13: https://x.com/zerosnacks/status/1992946836194394375

Older versions of forge-std would of course remain available.

Would allow us:

  • Modernize the codebase by using latest language features resulting in more elegant interfaces and data structures & ways of interacting with them.
  • Fix compiler warning raised by 0.8.31:

The memory-safe-assembly special comment is deprecated and scheduled for removal. In new code targeting recent compilers, use the assembly block annotation.

Warning (2424): Natspec memory-safe-assembly special comment for inline assembly is deprecated and scheduled for removal. Use the memory-safe block annotation instead.
   --> lib/forge-std/src/StdCheats.sol:515:9:
    |
515 |         assembly {
    |         ^ (Relevant source part starts here and spans across multiple lines).

Note the replacing assembly("memory-safe") syntax is compatible ^0.8.13; not below; this effectively forces us into a compatibility window

zerosnacks avatar Dec 05 '25 12:12 zerosnacks