Skip to content

Switch from gopkg.in/yaml.v3 to go.yaml.in/yaml/v3 #493

Closed

Description

@peppescg

Summary

toolhive-core still imports gopkg.in/yaml.v3 directly. The go-yaml project is archived, and its maintained continuation is go.yaml.in/yaml/v3, which keeps the same v3 API. The Stacklok repos that consume toolhive-core have been moving to go.yaml.in/yaml/v3, but they keep pulling gopkg.in/yaml.v3 as an indirect dependency through toolhive-core.

Example: stacklok-enterprise-platform's Workspace (Atrium) uses config.BaseConfig to load its AppConfig. Atrium imports no YAML package itself, yet its go.mod gains gopkg.in/yaml.v3 v3.0.1 // indirect only because config/config.go imports it. go.yaml.in/yaml/v3 is already in toolhive-core's module graph as an indirect dependency (v3.0.6).

Where (as of v0.0.59)

Non-test code:

  • config/config.go
  • oci/skills/packager.go
  • registry/types/registry_types.go

Tests:

  • container/verifier/verifier_test.go
  • registry/types/registry_types_test.go
  • registry/types/skills_types_test.go
  • registry/types/upstream_registry_test.go

Proposal

Replace the gopkg.in/yaml.v3 imports with go.yaml.in/yaml/v3, make it a direct requirement, and drop gopkg.in/yaml.v3 from go.mod once nothing else in the module graph needs it.

Acceptance criteria

  • No .go file in toolhive-core imports gopkg.in/yaml.v3.
  • go.yaml.in/yaml/v3 is a direct requirement in go.mod; gopkg.in/yaml.v3 is not required by toolhive-core's own packages.
  • Existing tests pass unchanged, in particular config's strict decoding (unknown fields rejected) and the registry types' YAML round-trips.

Activity

  1. added
    needs-triage
    on Nov 10, 2026
  2. self-assigned this
    on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

needs-triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions