Skip to content

refactor: make compile/validate state explicit, off context#38

Merged
lestrrat merged 15 commits into
mainfrom
refactor-explicit-validation-state
May 28, 2026
Merged

refactor: make compile/validate state explicit, off context#38
lestrrat merged 15 commits into
mainfrom
refactor-explicit-validation-state

Conversation

@lestrrat

Copy link
Copy Markdown
Collaborator
  • Replace the context.Context value-bag with explicit compileState/evalState carriers and option/v3 options on Compile/Validate
  • schema.Resolver methods take explicit base scope; all public schema.With*/*FromContext helpers removed (breaking)
  • Compiled validators are now immutable config, safe to call concurrently (-race tested); ctx honored for cancellation in compile and validate
  • Builder API and generated meta/meta_gen.go unchanged; full 2020-12 suite, -race, and golangci-lint all green
  • ctx now carries only cancellation and the trace logger

@lestrrat lestrrat merged commit f976149 into main May 28, 2026
2 checks passed
@lestrrat lestrrat deleted the refactor-explicit-validation-state branch May 28, 2026 21:47
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.

1 participant