Skip to content

Commit 44156d0

Browse files
authored
Update CHANGELOG and README for 0.4.0 release (#130)
Release toolexec mode for packages that import errtrace.
1 parent 35f7066 commit 44156d0

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## Unreleased
8+
## 0.4.0 - 2025-07-21
9+
10+
This release supports compile-time rewriting of source files via `toolexec`.
11+
Build your package or binary with `go build -toolexec errtrace` and all packages
12+
that import `errtrace` will be automatically instrumented with `errtrace`.
13+
914
### Added
15+
1016
- Add `UnwrapFrame` function to extract a single frame from an error.
1117
You can use this to implement your own trace formatting logic.
1218
- Support extracting trace frames from custom errors.

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ go install braces.dev/errtrace/cmd/errtrace@latest
259259
errtrace offers the following modes of usage:
260260

261261
* [Manual instrumentation](#manual-instrumentation)
262-
* [Automatic instrumentation](#automatic-instrumentation)
262+
* [Automatic instrumentation](#automatic-instrumentation) on [save](#automatic-instrumentation-on-save) or at [compile time](#automatic-compile-time-instrumentation).
263263

264264
### Manual instrumentation
265265

@@ -344,10 +344,20 @@ errtrace -w example.com/path/to/package
344344
errtrace -w ./...
345345
```
346346

347+
#### Automatic instrumentation on save
348+
347349
errtrace can be set be setup as a custom formatter in your editor,
348350
similar to gofmt or goimports.
349351

350-
#### Opting-out during automatic instrumentation
352+
#### Automatic compile-time instrumentation
353+
354+
![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)
355+
356+
errtrace can rewrite files as part of compilation by passing a `-toolexec` flag.
357+
Build your package or binary with `go build -toolexec=errtrace` and all packages
358+
that import `errtrace` will be automatically instrumented.
359+
360+
### Opting-out during automatic instrumentation
351361

352362
If you're relying on automatic instrumentation
353363
and want to ignore specific lines from being instrumented,

0 commit comments

Comments
 (0)