Skip to content

chore: Move to maintained YAML module and tighten go.mod floor - #1407

Merged
noahbjohnson merged 2 commits into
mainfrom
chore/go-mod-hygiene
Oct 18, 2026
Merged

noahbjohnson merged 2 commits into
mainfrom
chore/go-mod-hygiene

Conversation

@isaacschepp

Copy link
Copy Markdown
Collaborator

What and why

Dependency hygiene from a review of go.mod:

  • Maintained YAML module. All 33 imports of the archived gopkg.in/yaml.v3 now use go.yaml.in/yaml/v3, its maintained drop-in successor (same API, maintained by the YAML organisation). It was already in the module graph through cobra, so the project now links one YAML parser instead of two. NOTICE is updated to match. gopkg.in/yaml.v3 is no longer linked into any package built from this module (go list -deps ./...).
  • Hard minimum for the patched standard library. go 1.27.0 + toolchain go1.27.2 becomes go 1.27.2. The toolchain line is only a hint: a build with GOTOOLCHAIN=local on Go 1.27.0/1.27.1 (for example, a distro packager) ignored it and shipped the standard-library vulnerabilities fix: Bump Go toolchain to 1.27.2 for standard library vulnerabilities #1381 meant to exclude. The toolchain line is now redundant and dropped. CI reads go-version-file: go.mod, so it is unaffected.
  • Stale indirect dependencies. Dependabot does not bump indirect requirements, so every tagged indirect requirement is bumped to its latest release. Highlights: ProtonMail/go-crypto 1.1.6 → 1.5.2, circl 1.6.3 → 1.6.5, x/crypto 0.58.0, x/net 0.61.0, x/sys 0.49.0, mergo 1.0.2, ssh_config 1.6.0. sergi/go-diff moves from a 2023 pseudo-version to tagged v1.4.0. x/text (direct) goes to 0.43.0, pulled in by x/net.

Related issues

None. Follow-up from a go.mod review.

Review focus

The YAML swap. go.yaml.in/yaml/v3 v3.0.5 is a later release of the same codebase than gopkg.in/yaml.v3 v3.0.1. The full test suite, including the example-archive round-trip and serializer tests, passes unchanged.

Testing

  • go test -timeout 10m ./...: all pass
  • go mod tidy -diff clean, go mod verify: all modules verified
  • golangci-lint run --new-from-rev=origin/main ./...: 0 issues. The full-run count is no higher than on main, so the go bump surfaces no new findings.

Breaking changes

Downstream modules importing github.com/genealogix/glx/go-glx now need go >= 1.27.2 (previously 1.27.0).

- Import go.yaml.in/yaml/v3 instead of the archived gopkg.in/yaml.v3.
  It is the same API, maintained by the YAML organisation, and was
  already in the module graph through cobra. gopkg.in/yaml.v3 is no
  longer linked into any package built from this module.
- Raise the go directive to 1.27.2 so the patched standard library is a
  hard minimum rather than a toolchain hint that GOTOOLCHAIN=local
  ignores. The separate toolchain line is now redundant and dropped.
- Bump every tagged indirect requirement to its latest release
  (ProtonMail/go-crypto 1.5.2, circl 1.6.5, x/crypto 0.58.0, x/net
  0.61.0, x/sys 0.49.0, mergo 1.0.2, ...) and replace the go-diff
  pseudo-version with tagged v1.4.0.

Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: Isaac Schepp <isaac.schepp@gmail.com>
Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: Isaac Schepp <isaac.schepp@gmail.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Deploying genealogix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 462a931
Status: ✅  Deploy successful!
Preview URL: https://9f556417.genealogix.pages.dev
Branch Preview URL: https://chore-go-mod-hygiene.genealogix.pages.dev

View logs

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgolang/​golang.org/​x/​text@​v0.42.0 ⏵ v0.43.077 +1100100100100

View full report

@codecov

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@noahbjohnson
noahbjohnson merged commit 8d269a3 into main Oct 18, 2026
42 checks passed
@noahbjohnson
noahbjohnson deleted the chore/go-mod-hygiene branch October 18, 2026 22:58
isaacschepp added a commit that referenced this pull request Oct 27, 2026
Address the three regressions from review of #1397:

- Refuse a planned write whose parent resolves under a dot-prefixed
  directory (e.g. persons -> .drafts/persons). The loader skips those, so
  merge and migrate reported entities that the next load could not see.
  The check lives in parentStaysInside, so rename's preflight gets it too.
- Write out a standard vocabulary the result references when no archive
  file defines it. The validating load checks references before it fills
  the standard vocabularies, so merging a birth/subject event into an
  archive with no vocabulary files produced an archive glx validate
  rejected. The writer now runs that same validating load over the
  post-write file set and materializes only the vocabularies it names.
- Pick the metadata owner the way GLXFile.Merge does: the first block
  with content. An earlier `metadata: {}` no longer receives the block,
  which left two populated metadata blocks and a validation conflict.

Also switch archive_inplace.go to go.yaml.in/yaml/v3. The merge of main
(#1407) left it importing gopkg.in/yaml.v3, which the module no longer
requires, so the head did not build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
isaacschepp added a commit that referenced this pull request Oct 27, 2026
Resolve the CHANGELOG.md and Makefile conflicts:

- CHANGELOG.md: keep the changie-rendered file. The 12 [Unreleased]
  entries main gained since the last merge (#1382, #1384, #1386, #1393,
  #1395, #1396, #1407, #1413) become fragments Added-main-56 ..
  Fixed-main-67, with trailing/inline refs moved into custom.Issue as in
  the existing migrated fragments. Main's released sections were
  unchanged since the merge base.
- Makefile: .PHONY carries both main's lint-workflows and this branch's
  changelog/changelog-check targets.
- tools/fragmentcheck: import go.yaml.in/yaml/v3. #1407 dropped
  gopkg.in/yaml.v3 from go.mod, so the checker no longer built and
  `make changelog-check` failed with "go mod tidy needed".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants