Skip to content

Move benchmark tests between ValidGen and GoValidator to another repository #44

Closed

Description

@alexgarzao

The motivation for moving to another repository is to clean up the mod file from GoValidator imports.

Activity

  1. leocavalcante commented on Sep 29, 2026

    @leocavalcante
    Member

    This issue asks to move the ValidGen vs GoValidator benchmark tests into another repository so go.mod can drop github.com/go-playground/validator/v10.

    The destination repository is not named. I am not creating a public repository or guessing a name. A directory or nested module in this repository would not meet the request, because the request is a different repository.

    The comparison code that imports the validator is:

    • tests/bench/validator_test.go
    • tests/cmpbenchtests/generated_cmp_perf_no_pointer_test.go
    • tests/cmpbenchtests/generated_cmp_perf_pointer_test.go
    • testgen/cmp_perf_no_pointer_tests.tpl
    • testgen/cmp_perf_pointer_tests.tpl

    Moving only those files would still leave an import in types/color_test.go (TestColorMatchesValidator). That test checks color compatibility and is not a benchmark comparison, so the root module would still require the validator.

    Needed decision: the destination repository URL or owner/name for these benchmark tests.

  2. leocavalcante commented on Sep 30, 2026

    @leocavalcante
    Member

    The destination is https://github.com/opencodeco/validgen-benchmarks.

    #118 moves the comparison benchmarks there. TestColorMatchesValidator moves with them, because that test was the other import of github.com/go-playground/validator/v10. After that pull request, the ValidGen module does not require that package.

    TestGen writes cmp/generated_cmp_perf_*.go when VALIDGEN_BENCHMARKS_DIR points at a checkout of the benchmarks repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions