Skip to content

Correct unusable TagGetter diagnostic - #521

Merged
linkdata merged 1 commit into
mainfrom
fix/issue-496-taggetter-hint
Oct 2, 2026
Merged

linkdata merged 1 commit into
mainfrom
fix/issue-496-taggetter-hint

Conversation

@linkdata

@linkdata linkdata commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Give unusable values that already implement TagGetter a relevant key/cycle hint instead of calling them nested getters.
  • Reserve the nested-getter hint for getters found inside another value.
  • Cover both TagExpand and NewErrNotUsableAsTag, including direct and pointer roots, while preserving errors.Is identities.

Closes #496.

Verification

  • go test -race ./lib/tag -count=1
  • go test ./lib/tag -count=1
  • go test -race ./...
  • go vet ./...
  • go build ./...
  • staticcheck ./...
  • golangci-lint run
  • gosec -quiet ./...
  • gofumpt -l . and gofmt -l .

@linkdata
linkdata merged commit dd60c71 into main Oct 2, 2026
7 checks passed
@linkdata
linkdata deleted the fix/issue-496-taggetter-hint branch October 2, 2026 12:14
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.

tag: unusable TagGetter error advises implementing JawsGetTag on a type that already implements it

1 participant