Skip to content

Commit 0f78c34

Browse files
matzfjuagargi
authored andcommitted
deps: update oapi-codegen to v2 (scionproto#4432)
The oapi-codegen libraries went through a reorganization; the repositories for the oapi-codegen build tool was separated from the runtime libraries. In our normal code dependencies, the oapi-codegen build tool no longer shows up. Import it in a dummy .go file as an easy way to ensure that we have all the appropriate dependencies (via the `go.mod`/`go_deps.bzl`) . This leaves some clutter in the `go.mod` file which is not aesthetically pleasing, but is not a real issue due to dependency graph pruning. The alternative solution would have been to manage the dependencies of the `rules_openapi` bazel rules explicitly in a `rules_openapi_dependencies` macro. This turns out to be rather cumbersome, and can lead to unexpected or even invalid dependency version combinations, because `rules_go` does not have a way to separate the dependencies of the build tools from the dependencies of the code. Aside; fix `cfg = "exec"` for the oapi-codegen buildtool so that this tool is built for the environment of the builder, not the target platform.
1 parent d711165 commit 0f78c34

File tree

42 files changed

+1741
-1008
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1741
-1008
lines changed

control/mgmtapi/BUILD.bazel

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,9 @@ go_library(
4242
"//private/mgmtapi/segments/api:go_default_library",
4343
"//private/storage:go_default_library",
4444
"//private/storage/beacon:go_default_library",
45-
"@com_github_deepmap_oapi_codegen//pkg/runtime:go_default_library", # keep
4645
"@com_github_getkin_kin_openapi//openapi3:go_default_library", # keep
4746
"@com_github_go_chi_chi_v5//:go_default_library", # keep
48-
"@com_github_pkg_errors//:go_default_library", # keep
47+
"@com_github_oapi_codegen_runtime//:go_default_library", # keep
4948
"@org_golang_google_protobuf//proto:go_default_library",
5049
],
5150
)

0 commit comments

Comments
 (0)