diff --git a/WORKSPACE b/WORKSPACE index 9580305a03..e0c3552cf0 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -288,10 +288,6 @@ nodejs_register_toolchains( node_version = DEFAULT_NODE_VERSION, ) -load("//rules_openapi:deps.bzl", "rules_openapi_dependencies") - -rules_openapi_dependencies() - load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock") npm_translate_lock( diff --git a/go.mod b/go.mod index 1a227a264c..77f168f212 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ require ( github.com/bazelbuild/rules_go v0.38.1 github.com/buildkite/go-buildkite/v2 v2.9.0 github.com/dchest/cmac v1.0.0 + github.com/deepmap/oapi-codegen/v2 v2.0.0 github.com/fatih/color v1.14.1 github.com/getkin/kin-openapi v0.118.0 github.com/go-chi/chi/v5 v5.0.8 @@ -46,7 +47,7 @@ require ( golang.org/x/crypto v0.12.0 golang.org/x/net v0.14.0 golang.org/x/sync v0.3.0 - golang.org/x/tools v0.9.1 + golang.org/x/tools v0.12.0 google.golang.org/grpc v1.57.2 google.golang.org/grpc/examples v0.0.0-20230222033013-5353eaa44095 google.golang.org/protobuf v1.31.0 @@ -112,9 +113,9 @@ require ( go.uber.org/mock v0.3.0 // indirect go.uber.org/multierr v1.8.0 // indirect golang.org/x/exp v0.0.0-20221205204356-47842c84f3db // indirect - golang.org/x/mod v0.11.0 // indirect + golang.org/x/mod v0.12.0 // indirect golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.12.0 // indirect + golang.org/x/text v0.13.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index c7ae43a3b2..c53bec95f1 100644 --- a/go.sum +++ b/go.sum @@ -89,6 +89,8 @@ github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0-20210816181553-5444fa50b93d/go.mod h1:tmAIfUFEirG/Y8jhZ9M+h36obRZAk/1fcSpXwAVlfqE= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= +github.com/deepmap/oapi-codegen/v2 v2.0.0 h1:3TS7w3r+XnjKFXcbFbc16pTWzfTy0OLPkCsutEHjWDA= +github.com/deepmap/oapi-codegen/v2 v2.0.0/go.mod h1:7zR+ZL3WzLeCkr2k8oWTxEa0v8y/F25ane0l6A5UjLA= github.com/docker/cli v20.10.20+incompatible h1:lWQbHSHUFs7KraSN2jOJK7zbMS2jNCHI4mt4xUFUVQ4= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/docker v20.10.20+incompatible h1:kH9tx6XO+359d+iAkumyKDc5Q1kOwPuAUaeri48nD6E= @@ -492,6 +494,7 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -503,8 +506,8 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= -golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -633,8 +636,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= -golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -689,8 +692,8 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= -golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= +golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/go_deps.bzl b/go_deps.bzl index 61d0f50dc1..20859e8d18 100644 --- a/go_deps.bzl +++ b/go_deps.bzl @@ -247,6 +247,12 @@ def go_deps(): sum = "h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc=", version = "v4.0.1", ) + go_repository( + name = "com_github_deepmap_oapi_codegen_v2", + importpath = "github.com/deepmap/oapi-codegen/v2", + sum = "h1:3TS7w3r+XnjKFXcbFbc16pTWzfTy0OLPkCsutEHjWDA=", + version = "v2.0.0", + ) go_repository( name = "com_github_docker_cli", importpath = "github.com/docker/cli", @@ -1626,8 +1632,8 @@ def go_deps(): go_repository( name = "org_golang_x_lint", importpath = "golang.org/x/lint", - sum = "h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI=", - version = "v0.0.0-20201208152925-83fdc39ff7b5", + sum = "h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug=", + version = "v0.0.0-20210508222113-6edffad5e616", ) go_repository( name = "org_golang_x_mobile", @@ -1638,8 +1644,8 @@ def go_deps(): go_repository( name = "org_golang_x_mod", importpath = "golang.org/x/mod", - sum = "h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU=", - version = "v0.11.0", + sum = "h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=", + version = "v0.12.0", ) go_repository( name = "org_golang_x_net", @@ -1674,8 +1680,8 @@ def go_deps(): go_repository( name = "org_golang_x_text", importpath = "golang.org/x/text", - sum = "h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc=", - version = "v0.12.0", + sum = "h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=", + version = "v0.13.0", ) go_repository( name = "org_golang_x_time", @@ -1686,8 +1692,8 @@ def go_deps(): go_repository( name = "org_golang_x_tools", importpath = "golang.org/x/tools", - sum = "h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo=", - version = "v0.9.1", + sum = "h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss=", + version = "v0.12.0", ) go_repository( name = "org_golang_x_xerrors", diff --git a/nogo.json b/nogo.json index 924de87ac9..d3ada15681 100644 --- a/nogo.json +++ b/nogo.json @@ -2,7 +2,6 @@ "assign": { "exclude_files": { "gazelle/walk/walk.go": "", - "com_github_deepmap_oapi_codegen/pkg/codegen/": "", "/org_modernc_sqlite": "" } }, @@ -149,7 +148,7 @@ }, "maincheck": { "exclude_files": { - "/com_github_deepmap_oapi_codegen/": "", + "/com_github_deepmap_oapi_codegen_v2/": "", "/com_github_golang_mock/mockgen": "", "/org_golang_x_tools": "", "gazelle/language/go/gen_std_package_list": "", @@ -184,7 +183,6 @@ "com_github_matttproud_golang_protobuf_extensions": "", "com_github_getkin_kin_openapi": "", "com_github_buildkite_go_buildkite_v2/buildkite": "", - "com_github_deepmap_oapi_codegen/pkg/runtime": "", "com_github_uber_jaeger_client_go/thrift": "", "com_github_hashicorp_hcl": "", "com_github_stretchr_testify/assert": "", @@ -199,7 +197,6 @@ "com_github_uber_jaeger_client_go": "", "com_github_spf13_viper": "", "com_github_labstack_echo_v4": "", - "com_github_deepmap_oapi_codegen": "", "pkg/private/serrors/errors.go": "err shadowed", "pkg/slayers/path/scion/raw.go": "err shadowed", "pkg/scrypto/cppki/trc.go": "err shadowed", @@ -212,7 +209,7 @@ "org_golang_x_mod": "", "org_golang_x_crypto/ed25519/internal/edwards25519": "", "com_github_vishvananda_netlink/nl": "", - "com_github_deepmap_oapi_codegen/pkg/codegen": "", + "com_github_deepmap_oapi_codegen_v2/pkg/codegen": "", "com_github_quic_go_quic_go": "", "com_github_bazelbuild_buildtools": "", "/bazel_gazelle/": "" diff --git a/rules_openapi/deps.bzl b/rules_openapi/deps.bzl deleted file mode 100644 index 7ddeca2f80..0000000000 --- a/rules_openapi/deps.bzl +++ /dev/null @@ -1,232 +0,0 @@ -load("@bazel_gazelle//:deps.bzl", "go_repository") - -def rules_openapi_dependencies(debug = False): - - # Skip specifying dependencies that were already defined, to avoid - # potentially interfering with the effective version of dependencies. - # For this rules_openapi_dependencies should be called after defining the - # "ordinary" go dependencies. - # If debug = True, check whether the dependency versions match those - # already defined. - def maybe_go_repository(name, **kwargs): - existing_rules = native.existing_rules() - if name not in existing_rules: - go_repository(name = name, **kwargs) - elif debug: - existing_rule = existing_rules.get(name) - for param, value in kwargs.items(): - existing_rule_value = existing_rule.get(param) - if existing_rule_value != value: - print("mismatching requirements for dependency %s, %s = %s != %s" % (name, param, value, existing_rule_value)) - - # Needed as build tool - maybe_go_repository( - name = "com_github_deepmap_oapi_codegen", - importpath = "github.com/deepmap/oapi-codegen/v2", - sum = "h1:3TS7w3r+XnjKFXcbFbc16pTWzfTy0OLPkCsutEHjWDA=", - version = "v2.0.0", - ) - - # Indirect dependencies, for oapi-codegen/cmd/oapi-codegen v2.0.0 - # Created semi-manually by - # - locating the github.com/deepmap/oapi-codegen go.mod file (in the bazel external cache) - # - gazelle update-repos -from_file=/go.mod -to_macro=rules_openapi/deps.bzl%oapi_codegen_dependencies - # - manually replacing go_repository to maybe_go_repository - maybe_go_repository( - name = "com_github_davecgh_go_spew", - importpath = "github.com/davecgh/go-spew", - sum = "h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=", - version = "v1.1.1", - ) - maybe_go_repository( - name = "com_github_getkin_kin_openapi", - importpath = "github.com/getkin/kin-openapi", - sum = "h1:z43njxPmJ7TaPpMSCQb7PN0dEYno4tyBPQcrFdHoLuM=", - version = "v0.118.0", - ) - maybe_go_repository( - name = "com_github_go_openapi_jsonpointer", - importpath = "github.com/go-openapi/jsonpointer", - sum = "h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=", - version = "v0.19.5", - ) - maybe_go_repository( - name = "com_github_go_openapi_swag", - importpath = "github.com/go-openapi/swag", - sum = "h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY=", - version = "v0.19.5", - ) - maybe_go_repository( - name = "com_github_go_test_deep", - importpath = "github.com/go-test/deep", - sum = "h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM=", - version = "v1.0.8", - ) - maybe_go_repository( - name = "com_github_gorilla_mux", - importpath = "github.com/gorilla/mux", - sum = "h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=", - version = "v1.8.0", - ) - maybe_go_repository( - name = "com_github_invopop_yaml", - importpath = "github.com/invopop/yaml", - sum = "h1:YW3WGUoJEXYfzWBjn00zIlrw7brGVD0fUKRYDPAPhrc=", - version = "v0.1.0", - ) - maybe_go_repository( - name = "com_github_josharian_intern", - importpath = "github.com/josharian/intern", - sum = "h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=", - version = "v1.0.0", - ) - maybe_go_repository( - name = "com_github_kr_pretty", - importpath = "github.com/kr/pretty", - sum = "h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=", - version = "v0.1.0", - ) - maybe_go_repository( - name = "com_github_kr_pty", - importpath = "github.com/kr/pty", - sum = "h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw=", - version = "v1.1.1", - ) - maybe_go_repository( - name = "com_github_kr_text", - importpath = "github.com/kr/text", - sum = "h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=", - version = "v0.1.0", - ) - maybe_go_repository( - name = "com_github_mailru_easyjson", - importpath = "github.com/mailru/easyjson", - sum = "h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=", - version = "v0.7.7", - ) - maybe_go_repository( - name = "com_github_mohae_deepcopy", - importpath = "github.com/mohae/deepcopy", - sum = "h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=", - version = "v0.0.0-20170929034955-c48cc78d4826", - ) - maybe_go_repository( - name = "com_github_niemeyer_pretty", - importpath = "github.com/niemeyer/pretty", - sum = "h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=", - version = "v0.0.0-20200227124842-a10e7caefd8e", - ) - maybe_go_repository( - name = "com_github_perimeterx_marshmallow", - importpath = "github.com/perimeterx/marshmallow", - sum = "h1:pZLDH9RjlLGGorbXhcaQLhfuV0pFMNfPO55FuFkxqLw=", - version = "v1.1.4", - ) - maybe_go_repository( - name = "com_github_pmezard_go_difflib", - importpath = "github.com/pmezard/go-difflib", - sum = "h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=", - version = "v1.0.0", - ) - maybe_go_repository( - name = "com_github_stretchr_objx", - importpath = "github.com/stretchr/objx", - sum = "h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=", - version = "v0.5.0", - ) - maybe_go_repository( - name = "com_github_stretchr_testify", - importpath = "github.com/stretchr/testify", - sum = "h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=", - version = "v1.8.4", - ) - maybe_go_repository( - name = "com_github_ugorji_go", - importpath = "github.com/ugorji/go", - sum = "h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo=", - version = "v1.2.7", - ) - maybe_go_repository( - name = "com_github_ugorji_go_codec", - importpath = "github.com/ugorji/go/codec", - sum = "h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=", - version = "v1.2.11", - ) - maybe_go_repository( - name = "com_github_yuin_goldmark", - importpath = "github.com/yuin/goldmark", - sum = "h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE=", - version = "v1.4.13", - ) - maybe_go_repository( - name = "in_gopkg_check_v1", - importpath = "gopkg.in/check.v1", - sum = "h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U=", - version = "v1.0.0-20200902074654-038fdea0a05b", - ) - maybe_go_repository( - name = "in_gopkg_yaml_v2", - importpath = "gopkg.in/yaml.v2", - sum = "h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=", - version = "v2.4.0", - ) - maybe_go_repository( - name = "in_gopkg_yaml_v3", - importpath = "gopkg.in/yaml.v3", - sum = "h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=", - version = "v3.0.1", - ) - maybe_go_repository( - name = "org_golang_x_crypto", - importpath = "golang.org/x/crypto", - sum = "h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8=", - version = "v0.0.0-20191011191535-87dc89f01550", - ) - maybe_go_repository( - name = "org_golang_x_lint", - importpath = "golang.org/x/lint", - sum = "h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug=", - version = "v0.0.0-20210508222113-6edffad5e616", - ) - maybe_go_repository( - name = "org_golang_x_mod", - importpath = "golang.org/x/mod", - sum = "h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=", - version = "v0.12.0", - ) - maybe_go_repository( - name = "org_golang_x_net", - importpath = "golang.org/x/net", - sum = "h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14=", - version = "v0.14.0", - ) - maybe_go_repository( - name = "org_golang_x_sync", - importpath = "golang.org/x/sync", - sum = "h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=", - version = "v0.3.0", - ) - maybe_go_repository( - name = "org_golang_x_sys", - importpath = "golang.org/x/sys", - sum = "h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=", - version = "v0.12.0", - ) - maybe_go_repository( - name = "org_golang_x_text", - importpath = "golang.org/x/text", - sum = "h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=", - version = "v0.13.0", - ) - maybe_go_repository( - name = "org_golang_x_tools", - importpath = "golang.org/x/tools", - sum = "h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss=", - version = "v0.12.0", - ) - maybe_go_repository( - name = "org_golang_x_xerrors", - importpath = "golang.org/x/xerrors", - sum = "h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA=", - version = "v0.0.0-20191011141410-1b5146add898", - ) diff --git a/rules_openapi/internal/generate.bzl b/rules_openapi/internal/generate.bzl index 0c642c5ca5..9a03533e6b 100644 --- a/rules_openapi/internal/generate.bzl +++ b/rules_openapi/internal/generate.bzl @@ -81,7 +81,7 @@ openapi_generate_go = rule( ), "_oapi_codegen": attr.label( doc = "The code generator binary.", - default = "@com_github_deepmap_oapi_codegen//cmd/oapi-codegen:oapi-codegen", + default = "@com_github_deepmap_oapi_codegen_v2//cmd/oapi-codegen:oapi-codegen", executable = True, cfg = "exec", ), diff --git a/rules_openapi/internal/tools.go b/rules_openapi/internal/tools.go new file mode 100644 index 0000000000..ceff602715 --- /dev/null +++ b/rules_openapi/internal/tools.go @@ -0,0 +1,24 @@ +// Copyright 2023 SCION Association +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:build tools + +package rules_openapi + +import ( + // The bazel rule openapi_generate_go uses oapi-codegen as a build tool. + // As an easy way to ensure that we have all the appropriate dependencies, + // import it here in this dummy go file. + _ "github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen" +)