Skip to content

v1.13.0 introduces lots of transitive dependencies to client library #1142

@pgier

Description

@pgier

I'm only using oapi-codegen to generate a client library against an openapi spec file. I noticed that when I changed my go.mod to use v1.13.0 instead of v1.12.4, there are lots of transitive dependencies added. There seems to be a lot of stuff added that relate to server code and maybe should not be necessary for a client library.

 go 1.20

-require github.com/deepmap/oapi-codegen v1.12.4
+require github.com/deepmap/oapi-codegen v1.13.0

 require (
        github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
+       github.com/bytedance/sonic v1.9.1 // indirect
+       github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
+       github.com/gabriel-vasile/mimetype v1.4.2 // indirect
+       github.com/gin-contrib/sse v0.1.0 // indirect
+       github.com/gin-gonic/gin v1.9.1 // indirect
+       github.com/go-playground/locales v0.14.1 // indirect
+       github.com/go-playground/universal-translator v0.18.1 // indirect
+       github.com/go-playground/validator/v10 v10.14.0 // indirect
+       github.com/goccy/go-json v0.10.2 // indirect
        github.com/google/uuid v1.3.0 // indirect
-       github.com/stretchr/testify v1.8.3 // indirect
+       github.com/json-iterator/go v1.1.12 // indirect
+       github.com/klauspost/cpuid/v2 v2.2.4 // indirect
+       github.com/labstack/echo/v4 v4.10.2 // indirect
+       github.com/labstack/gommon v0.4.0 // indirect
+       github.com/leodido/go-urn v1.2.4 // indirect
+       github.com/mattn/go-colorable v0.1.13 // indirect
+       github.com/mattn/go-isatty v0.0.19 // indirect
+       github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+       github.com/modern-go/reflect2 v1.0.2 // indirect
+       github.com/pelletier/go-toml/v2 v2.0.8 // indirect
+       github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
+       github.com/ugorji/go/codec v1.2.11 // indirect
+       github.com/valyala/bytebufferpool v1.0.0 // indirect
+       github.com/valyala/fasttemplate v1.2.2 // indirect
+       golang.org/x/arch v0.3.0 // indirect
+       golang.org/x/crypto v0.9.0 // indirect
+       golang.org/x/net v0.10.0 // indirect
+       golang.org/x/sys v0.8.0 // indirect
+       golang.org/x/text v0.9.0 // indirect
+       google.golang.org/protobuf v1.30.0 // indirect
+       gopkg.in/yaml.v3 v3.0.1 // indirect
 )

It appears to be caused by the runtime package as shown by go mod why:

> go mod why github.com/valyala/fasttemplate
# github.com/valyala/fasttemplate
github.com/datastax/pulsar-admin-client-go/src/pulsaradmin
github.com/deepmap/oapi-codegen/pkg/runtime
github.com/labstack/echo/v4
github.com/labstack/gommon/log
github.com/valyala/fasttemplate

I've attached a patch to show the diff of my go.mod and go.sum.
codege_1.12_to_1.13.patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions