Work to reduce transitive dependencies#1206
Merged
jamietanna merged 10 commits intomasterfrom Aug 28, 2023
Merged
Conversation
jamietanna
commented
Aug 28, 2023
jamietanna
commented
Aug 28, 2023
aed5f98 to
e835cdf
Compare
As part of #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 #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.
c89e459 to
f7982cf
Compare
These appear to be existing issues with the code, but are only flagged up once we migrate `examples` to its own Go module, so we can preemptively fix them before hand.
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.
As we're now using the oapi-codegen/runtime package for this, we should mark the existing functionality as deprecated. This also ignores any internally flagged deprecation warnings, as we know we're calling deprecated functions from within our own (deprecated) packages.
f7982cf to
0e9076a
Compare
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As a step towards #1142.