-
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
go 1.18 generics support issue #1170
Comments
My bad, the binary was built with go version go1.17.8 linux/amd64 which doesn't support generics. I won't do a release only for this , please use the following command to build It locally |
@ubogdan How do I use this feature? |
What feature? |
@ubogdan How do I generate the documentation with swag for this: you mentioned to install the version below, but how do I get the T parameter |
GoLang 1.18 comes with many changes, and swag is not ready yet, as you may see. If you need this feature, please feel free and contribute with a PR, and I will be more than happy to assist you with a CR. |
@ubogdan - do we have any specific issues created for generics support? I may be able to tackle some a smaller piece at a time if this were broken out... Or is this the only generics/1.18 issue at the moment? |
would be really nice to get support for 1.18! I have 1 function in my code. Our solution at the moment is to remove this generic function until this pkg is ready Output error:
Maybe we can add a temporary hack so that users could ignore certain file patterns ? Line 1393 in 32f02b9
|
There is no support for generics at all. If someone here intends to contribute, I will be more than happy to assist you with a CR. Please remember to open a feature request and document what exactly is going to be implemented, We need a way to track these changes. |
Unfortunately, this is the only option for now. |
Any updates on this one ? |
@eljoth Don't you think it would be more helpful to contribute instead of criticizing? |
@ubogdan I did not want to offend and sound that harsh. It just seemed for me that there is no prio to work in that. |
@ubogdan Is there a planned release for the features @FabianMartin added? I'll fork and do a release myself otherwise since it's much needed in my project at the moment 😅 |
We will release a new version in the next few days. |
Thank you for the response @ubogdan. I couldn't help myself and I forked to repo to be able to try it against our codebase. Seems like there still are some issues with nested generic fields, I've raised the following issue #1304 @FabianMartin was this use-case expected to be covered by your contributions? Or am I using it in an unsupported way? |
This should be possible to close when a new release is done, right? |
v1.8.6 has been released. |
Describe the bug
go 1.18 generics not supported
To Reproduce
type Result2 [T any] struct {
Data T
json:"data"
Meta string
json:"meta"
}
The T type could not be recognized
Expected behavior
The T type could be recognized
Screenshots
If applicable, add screenshots to help explain your problem.
Your swag version
1.8.1
Your go version
1.18
The text was updated successfully, but these errors were encountered: