You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -135,6 +135,17 @@ If you would like to test the binaries built from your change, see [foundryup](h
135
135
136
136
If you would like to use a debugger with breakpoints to debug a patch you might be working on, keep in mind we currently strip debug info for faster builds, which is _not_ the default. Therefore, to use a debugger, you need to enable it on the workspace [`Cargo.toml`'s `dev` profile](https://github.com/foundry-rs/foundry/tree/HEAD/Cargo.toml#L15-L18).
137
137
138
+
#### Output channels (stdout vs. stderr)
139
+
140
+
Foundry CLIs follow a strict output-channel contract: **stdout is the command's
141
+
machine-readable result; stderr is everything else** (warnings, errors,
142
+
progress, status prose, prompts). When adding or modifying user-facing output,
143
+
read [`docs/dev/output-channels.md`](docs/dev/output-channels.md) and use the
144
+
`sh_*` macros from `foundry_common::io` (`sh_println!`, `sh_status!`,
145
+
`sh_progress!`, `sh_warn!`, `sh_err!`). A workspace-wide clippy
146
+
`disallowed-macros` lint (see [`clippy.toml`](clippy.toml)) forbids
147
+
`std::print*` and `std::eprint*`; use the `sh_*` macros instead.
148
+
138
149
#### Adding tests
139
150
140
151
If the change being proposed alters code, it is either adding new functionality to Foundry, or fixing existing, broken functionality.
0 commit comments