Repository navigation
Swap out copyleft pgregory.net/rapid@v1.3.0 dependency, replace with gopter - #771
Open
liamfallon wants to merge 2 commits into
Open
liamfallon wants to merge 2 commits into
liamfallon wants to merge 2 commits into
Conversation
liamfallon
requested review from
efiacor,
kispaljr and
mozesl-nokia
as code owners
October 14, 2026 16:10
…gopter Signed-off-by: liamfallon <liam.fallon@est.tech>
liamfallon
force-pushed
the
remove-rapid
branch
from
October 14, 2026 16:23
f75475e to
2383684
Compare
Signed-off-by: liamfallon <liam.fallon@est.tech>
efiacor
approved these changes
Oct 15, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace
pgregory.net/rapid(MPL-2.0) withgithub.com/leanovate/gopter(MIT)Why
pgregory.net/rapidis licensed under MPL-2.0 (weak copyleft). This PR removes it in favour ofgithub.com/leanovate/gopter(MIT), a permissively licensed property-based testing library, bringing the dependency set in line with the project's Apache-2.0 / BSD / MIT policy.rapid was a test-only dependency, so no shipped code is affected.
What changed
Rewrote all 7 property-based tests in the
go/fnmodule to use gopter. Assertions and coverage are unchanged — only the generator/runner API was swapped.go/fn/internal/docs/markers_test.gogo/fn/internal/docs/metadata_test.gogo/fn/internal/docs/render_test.gogo/fn/run_filemode_property_test.gogo/fn/internal/docs/proptest_helpers_test.goAPI mapping
rapid.Check(t, fn)gopter.NewProperties(nil)+prop.ForAll(...)+properties.TestingRun(t)rapid.StringMatching(re)gen.RegexMatch(re)rapid.Custom(... struct ...)gen.Struct(reflect.TypeOf(...), map[string]gopter.Gen{...})rapid.SliceOfN(gen, min, max)genBoundedSlicehelper overgen.IntRange(min,max).FlatMap(gen.SliceOfN)rapid.IntRangegen.IntRangerapid.Bool()gen.Bool()rapid.SampledFrom([]T{...})gen.OneConstOf(...)Dependency cleanup
go/fn/go.mod/go.sum:pgregory.net/rapidremoved,github.com/leanovate/gopter v0.2.11added.go/fn/internal/test/go.sum: rapid swapped for gopter (builds against localgo/fnviareplace).Known follow-up
go/get-startedandgo/fn/examplesstill listpgregory.net/rapidin theirgo.sum. Theirreplacedirectives are commented out, so they build against the publishedgo/fn v1.0.4(which still declares rapid). These are checksum records only — rapid is not pulled into any binary. They will clear once a new rapid-freego/fnis released and those modules bump to it.Verification
go vet ./...— all modulesgo fmt ./...— no changesgo test ./...— all modules pass-count=5runspgregory.net/rapidreferences remain ingo/fnsourceAI Declaration
This PR was produced with AI assistance (Kiro).
How AI was used
pgregory.net/rapidwas used across thego/fnmodule and confirmed it was a test-only dependency.github.com/leanovate/gopter(MIT).go mod tidyto update dependency files.Human oversight
Verification
go vet ./...,go fmt ./..., andgo test ./...pass across all modules.-count=5).pgregory.net/rapidreferences remain ingo/fnsource.golangci-lintwas not run successfully locally due to a Go toolchain/linter version mismatch; CI pins Go to match the linter.Accountability