-
-
Notifications
You must be signed in to change notification settings - Fork 816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v1.13.0 introduces lots of transitive dependencies to client library #1142
Comments
Digging into this a bit, it appears this is due to this change #1021 |
Thanks for reporting - yeah that looks like it - I agree that we'd probably want to limit the scope of the imports, so we can reduce the tree of dependencies pulled - may be one for a next minor release, or a major release if we wanted to split them up into separate packages with their own I know at least in modern Go (I think since 1.17/1.18) Go will at least not vendor the dependencies it doesn't see in use, but it may still download them in non-vendoring mode 🤔 |
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. Before we can do this, we need to break some dependencies between packages that don't make sense.
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. Before we can do this, we need to break some dependencies between packages that don't make sense.
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. We can start with the `examples` project, which definitely shouldn't be pulled by consumers.
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. We can start with the `examples` project, which definitely shouldn't be pulled by consumers.
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. We can start with the `examples` project, which definitely shouldn't be pulled by consumers.
FYI @pgier I'm making progress on this in #1197, I can look at raising a (draft) PR to https://github.com/datastax/pulsar-admin-client-go to pin to the branch I'm working on and show:
Right now the Edit: before I can do that, can you please add a license to the project, as right now it's not Open Source (it defaults to All Rights Reserved without an explicit license) |
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. We can start with the `examples` project, which definitely shouldn't be pulled by consumers.
As part of changes towards solving #1142, we will be migrating to a multi-module Go project, which will not be easily supported by the GitHub Action for golangci-lint, therefore we can replace it with running it via `make`, with the right formatting outputs.
As part of changes towards solving #1142, we will be migrating to a multi-module Go project, which will not be easily supported by the GitHub Action for golangci-lint, therefore we can replace it with running it via `make`, with the right formatting outputs.
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. Before we can do this, we need to break some dependencies between packages that don't make sense.
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. Before we can do this, we need to break some dependencies between packages that don't make sense.
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. We can start with the `examples` project, which definitely shouldn't be pulled by consumers.
As part of changes towards solving #1142, we will be migrating to a multi-module Go project, which will not be easily supported by the GitHub Action for golangci-lint, therefore we can replace it with running it via `make`, with the right formatting outputs.
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. Before we can do this, we need to break some dependencies between packages that don't make sense.
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. Before we can do this, we need to break some dependencies between packages that don't make sense.
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. We can start with the `examples` project, which definitely shouldn't be pulled by consumers.
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which we can start with by removing unnecessary dependencies on `echo` from the `pkg/codegen` project.
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. Before we can do this, we can make sure that we have set up our Makefile and `tidy` workflow to be module-aware via steps in [0]. [0]: https://www.jvt.me/posts/2023/08/18/go-multi-module-execute/
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. We can start with the `examples` project, which definitely shouldn't be pulled by consumers. The fake module version updates across all files due to the way that multi-module Go projects work, but should be a one-time update.
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. We can split each of the middleware packages into their own modules, allowing consumers to pull only the dependences they need.
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. We can migrate `internal/test` to its own module, as it shouldn't be (nor could it be) pulled by consumers. The fake module version updates across all files due to the way that multi-module Go projects work, but should be a one-time update.
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. This migrates `pkg/runtime` which unfortunately is still a little heavyweight due to `pkg/runtime/strictmiddleware.go`.
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. We can move `pkg/testutil` to alleviate any other dependencies the root module has on web frameworks, and allow this to be used independently.
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. This migrates `pkg/runtime` which unfortunately is still a little heavyweight due to `pkg/runtime/strictmiddleware.go`.
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which we can start with by removing unnecessary dependencies on `echo` from the `pkg/codegen` project.
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. Before we can do this, we can make sure that we have set up our Makefile and `tidy` workflow to be module-aware via steps in [0]. [0]: https://www.jvt.me/posts/2023/08/18/go-multi-module-execute/
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. We can start with the `examples` project, which definitely shouldn't be pulled by consumers. The fake module version updates across all files due to the way that multi-module Go projects work, but should be a one-time update.
As part of #1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. We can migrate `internal/test` to its own module, as it shouldn't be (nor could it be) pulled by consumers. The fake module version updates across all files due to the way that multi-module Go projects work, but should be a one-time update.
As part of #1142 we can start to reduce our transitive dependencies by refactoring the `pkg/runtime` as it exists in deepmap/oapi-codegen. This allows us to introduce a breaking change (tweaking the structure of this package, including moving the `strictmiddleware` concepts) by creating a fresh package. This does require we tweak the way that our imports and generated code works. By moving `runtime` to a separate package, we can allow more frequent updates to the runtime-specific code, without tying it directly to the version of the code generator in use.
I try to remove dependency of Iris module in "github.com/deepmap/oapi-codegen" and "github.com/oapi-codegen/runtime".
Test codes are
But there are breaking changes in these fixes. |
Thanks @ShouheiNishi but we won't be merging those changes for now as the move to using the new oapi-codegen/runtime package should alleviate the issues. When we do remove the existing packages it'll be for a v2 release at which point we'll have quite a few things to try and clean up, but Marcin and I have been discussing it as a valid option, maybe by the end of the year. |
As part of changes towards solving oapi-codegen#1142, we will be migrating to a multi-module Go project, which will not be easily supported by the GitHub Action for golangci-lint, therefore we can replace it with running it via `make`, with the right formatting outputs.
As part of oapi-codegen#1142, we want to reduce the transitive dependencies of oapi-codegen. We can start by breaking some dependencies between packages that don't make sense.
As part of oapi-codegen#1142, we want to reduce the transitive dependencies of oapi-codegen. We can start by breaking some dependencies between packages that don't make sense.
As part of oapi-codegen#1142, we want to reduce the transitive dependencies of oapi-codegen, which we can start with by removing unnecessary dependencies on `echo` from the `pkg/codegen` project.
As part of oapi-codegen#1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. Before we can do this, we can make sure that we have set up our Makefile and `tidy` workflow to be module-aware via steps in [0]. [0]: https://www.jvt.me/posts/2023/08/18/go-multi-module-execute/
As part of oapi-codegen#1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. We can start with the `examples` project, which definitely shouldn't be pulled by consumers. The fake module version updates across all files due to the way that multi-module Go projects work, but should be a one-time update.
As part of oapi-codegen#1142, we want to reduce the transitive dependencies of oapi-codegen, which requires creating a multi-module Go project. We can migrate `internal/test` to its own module, as it shouldn't be (nor could it be) pulled by consumers. The fake module version updates across all files due to the way that multi-module Go projects work, but should be a one-time update.
As part of oapi-codegen#1142 we can start to reduce our transitive dependencies by refactoring the `pkg/runtime` as it exists in deepmap/oapi-codegen. This allows us to introduce a breaking change (tweaking the structure of this package, including moving the `strictmiddleware` concepts) by creating a fresh package. This does require we tweak the way that our imports and generated code works. By moving `runtime` to a separate package, we can allow more frequent updates to the runtime-specific code, without tying it directly to the version of the code generator in use.
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.It appears to be caused by the
runtime
package as shown bygo mod why
:I've attached a patch to show the diff of my
go.mod
andgo.sum
.codege_1.12_to_1.13.patch
The text was updated successfully, but these errors were encountered: