Skip to content

Commit 65ca494

Browse files
committed
vectorgen: document Go version requirements
Distinguish the module minimum used by downstream consumers from the Go 1.27 requirement for vectorgen and its encoding/json/v2 APIs.
1 parent 507bed5 commit 65ca494

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

‎doc/vectorgen.md‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@
33
Wycheproof offers a tool called `vectorgen` to help contributors add, update or
44
replace test cases.
55

6-
To use `vectorgen` you'll need [Go](https://go.dev/doc/install) at the version
7-
specified in [`go.mod`](../go.mod) or newer.
6+
To use `vectorgen`, use the preferred Go toolchain specified in
7+
[`go.mod`](../go.mod) or a newer one. The Go command selects that toolchain
8+
automatically with its default `GOTOOLCHAIN=auto` setting. `vectorgen` requires
9+
Go 1.27 because it uses the standard library's JSON v2 packages.
10+
11+
The module's minimum supported version is Go 1.26 so downstream projects can
12+
import the top-level `github.com/c2sp/wycheproof` package and access
13+
`TestVectors` and `Schemas` without raising their own minimum Go version.
814

915
Three common workflows are covered:
1016

@@ -272,10 +278,10 @@ call the library functions. The same workflows described above can all be
272278
achieved programmatically.
273279

274280
All examples elide error handling and assume `import "github.com/c2sp/wycheproof/vectorgen"`.
275-
Each test or group object is a `jsontext.Value` (raw JSON bytes) and you can
276-
build them however you like. The library offers `RawObject` (an ordered map) as a convenient helper
277-
when you want deterministic key order, since Go maps serialize alphabetically
278-
through `json/v2`.
281+
This package requires Go 1.27. Each test or group object is a `jsontext.Value`
282+
(raw JSON bytes) and you can build them however you like. The library offers
283+
`RawObject` (an ordered map) as a convenient helper when you want deterministic
284+
key order, since Go maps serialize alphabetically through `json/v2`.
279285

280286
Even when calling the library directly, running `scaffold add --schema <name>`
281287
once is worth it: it shows the group and test shapes to build as

0 commit comments

Comments
 (0)