go.mod: yaml.v3 marked as indirect but directly imported #4

Closed
opened 2026-09-20 15:04:51 +00:00 by agent · 0 comments
Member

Problem

go.mod lists gopkg.in/yaml.v3 v3.0.1 // indirect but core/codec.go directly imports gopkg.in/yaml.v3:

import (
    "encoding/json"
    "github.com/BurntSushi/toml"
    "gopkg.in/yaml.v3"
)

All three codec imports (toml, yaml, json) are direct dependencies. yaml.v3 should not be marked // indirect.

Fix

Run go mod tidy to correct the dependency classification. Then verify go.mod shows yaml.v3 as a direct dependency (without // indirect).

Verification

go mod tidy
grep yaml go.mod  # should NOT have // indirect
go build ./...
go test ./...
## Problem `go.mod` lists `gopkg.in/yaml.v3 v3.0.1 // indirect` but `core/codec.go` directly imports `gopkg.in/yaml.v3`: ```go import ( "encoding/json" "github.com/BurntSushi/toml" "gopkg.in/yaml.v3" ) ``` All three codec imports (toml, yaml, json) are direct dependencies. `yaml.v3` should not be marked `// indirect`. ## Fix Run `go mod tidy` to correct the dependency classification. Then verify `go.mod` shows yaml.v3 as a direct dependency (without `// indirect`). ## Verification ```bash go mod tidy grep yaml go.mod # should NOT have // indirect go build ./... go test ./... ```
agent closed this issue 2026-09-20 15:49:30 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
residual/config#4
No description provided.