fix: fold pkg/config into the root module for reproducible releases#9
Merged
Conversation
pkg/config was a separate module (own go.mod) imported by 10 files in the root module, but was neither required in root go.mod nor tagged. Local dev and CI worked only because go.work stitched it in; the workspace is ignored by 'go install' from the proxy, so consumers resolved pkg/config to a floating pseudo-version of the latest main commit rather than the release tree — releases were not reproducible. Delete pkg/config/go.mod and drop it from go.work so pkg/config is an ordinary package within github.com/directedbits/recur, versioned by the root's own tags. pkg/config is stdlib-only, so no deps move into root; the x/sys and go-keyring indirect->direct corrections are pre-existing drift surfaced by tidying without the workspace. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Binary Size Report
|
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.
Summary
Follow-up to #8.
pkg/configwas a separate Go module (its owngo.mod) imported by 10 files across the root module, but it was neitherrequired in the rootgo.modnor tagged. Local dev and CI passed only becausego.workstitched it into the workspace. The workspace is ignored when a consumer runsgo install github.com/directedbits/recur/...@vX.Y.Zfrom the proxy, sopkg/configresolved to a floating pseudo-version of the latestmaincommit instead of the release tree — releases were not reproducible, and a future commit topkg/configcould retroactively change what an old tag installs.Fix: fold
pkg/configinto the root module so it's versioned by the root's own tags.Changes
pkg/config/go.mod—pkg/configbecomes an ordinary package insidegithub.com/directedbits/recur../pkg/configfromgo.work'suselist.go mod tidy(root only) folds the package in and removes the floatingpkg/configpseudo-version fromgo.mod/go.sum.pkg/configis stdlib-only, so no new dependencies enter the root module. Thex/sysandgo-keyringindirect→direct corrections are pre-existing drift that surfaces once the module is tidied without the workspace (both are genuine direct imports:src/infra/os/process/signal_windows.goandsrc/infra/secret/keyring/keyring.go).Test plan
GOWORK=off go build ./src/...succeeds (consumer simulation — previously pulled an unpinned pseudo-version)GOWORK=off go vet ./src/... ./pkg/config/...cleango build ./...(incl. plugins) succeedsgo test ./pkg/config/... ./src/domain/config/... ./src/infra/yaml/config/...passChecklist
Breaking changes
None for consumers of the
recur/recurdbinaries. Note: any external project importinggithub.com/directedbits/recur/pkg/configas a standalone module would now pull the wholerecurmodule instead — there are no known external consumers.