-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Upgrade to go 1.18 for generics parsing support #1162
Comments
related to #1104 (comment) I tried compiling swag with 1.18 and it passes my prior error but is unable to find the new alias
|
I see building swag against go 1.18 is not enough. |
For what its worth, swapping out the |
@ubogdan i've put togther an adhoc fix for myself here rdlaitila@6d3d4c9 in addition to bumping to 1.18 It seems to work with my own packages that use |
I've also noticed it fails when you have any type constraint declarations in your code:
|
@rdlaitila I hope you don't mind that I publishes your changes as a PR in #1168.
go install github.com/swaggo/swag/cmd/[email protected] |
@jilleJr no problem. I was not sure those changes were even structurally or logically sound for swag so I was hesitant. TY! |
I had the same issue, and it seems parsing of the actual code was fixed with v1.8.1. The |
@hcsaustrup Deserves a separate issue IMO. The PR was only fixing the fact that swaggo would fail to parse Go 1.18 code to begin with and did not understand the new To parse generic types in the swaggo comments would be a different story, I presume, and would involve a bit more technical details. |
Is your feature request related to a problem? Please describe.
Unable to
swag init --parseDependency
where deps are using generic featuresDescribe the solution you'd like
The ability to init swagger docs with dependencies that use generic language features
Describe alternatives you've considered
Cloning and updating the
go.mod
to 1.18 and compiling locally for the time being.Additional context
n/a
The text was updated successfully, but these errors were encountered: