Skip to content

docs: clarify console.sol vs deprecated console2 alias - #943

Open
imitater-dou wants to merge 1 commit into
foundry-rs:masterfrom
imitater-dou:docs/fix-drift-foundry-rs-forge-std
Open

imitater-dou wants to merge 1 commit into
foundry-rs:masterfrom
imitater-dou:docs/fix-drift-foundry-rs-forge-std

Conversation

@imitater-dou

Copy link
Copy Markdown

Tip

  • Repo: foundry-rs/forge-std
  • Tip SHA: dc647cc030d9d65910d8f1172a0cde48d7106e32 (master)
  • Cap: 1/3 (slots remaining: 2)

Repro

  1. Open tip README.md § console.log — claims console2.sol is recommended so Forge can decode traces, and that console.sol has a uint256/int256 bug.
  2. Open tip src/console2.sol — file is only import {console as console2} from "./console.sol";.
  3. Tip history: forge-std feat: deprecate console2 #573 (feat: deprecate console2, merged 2024-06-29) made console the canonical implementation; Foundry treats both the same in traces/logs.
  4. No open PR covers this README section.

Fix

Update README to recommend console.sol and note that console2.sol is a compatibility alias (see patch).

Patch

patches/foundry-rs_forge-std.diff

Docs-only: verified against tip dc647cc.

Signed-off-by: ADou <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant