-
Notifications
You must be signed in to change notification settings - Fork 53
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
Break cyclic dependencies by moving runtime.File #143
Comments
kzys
added a commit
to kzys/swag
that referenced
this issue
Jan 28, 2022
The File type is defined in go-openapi/runtime and used from go-openapi/validate. However the runtime package uses the validate package which makes a circular dependency between them. go-openapi/validate#143 Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
kzys
added a commit
to kzys/swag
that referenced
this issue
Jan 29, 2022
The File type is defined in go-openapi/runtime and used from go-openapi/validate. However the runtime package uses the validate package which makes a circular dependency between them. go-openapi/validate#143 Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
kzys
added a commit
to kzys/validate
that referenced
this issue
Feb 1, 2022
While runtime.File will be defined as an alias, that won't be seen in the run-time, so reflection need to use swag.File instead. go-openapi#143 Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
kzys
added a commit
to kzys/runtime
that referenced
this issue
Feb 3, 2022
Fixes go-openapi/validate#143. Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
kzys
added a commit
to kzys/runtime
that referenced
this issue
Feb 3, 2022
This change breaks dependency cycles by - Updating go-openapi/* packages to remove go-openapi/runtime from them. Previously some of them were consuming runtime while runtime uses them. - Use swag.File as runtime.File to make the type compatible with go-openapi/validate that now uses swag.File. This fixes go-openapi/validate#143. Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently
validate
dependsruntime
butruntime
dependsvalidate
. Luckilyvalidate
only usesruntime.File
.So, how about moving
runtime.File
tovalidate
,swag
or somewhere else? We could keepruntime.File
as an alias.The text was updated successfully, but these errors were encountered: