Skip to content
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

Support for go 1.23 #1875

Closed
arielsrv opened this issue Aug 21, 2024 · 5 comments
Closed

Support for go 1.23 #1875

arielsrv opened this issue Aug 21, 2024 · 5 comments

Comments

@arielsrv
Copy link

Unfortunately I can't build my app using golang 1.23 runtime, I would like that swag can support it. There are many issues with new iter feature.

@sdghchj
Copy link
Member

sdghchj commented Aug 23, 2024

More detail needed.

@arielsrv
Copy link
Author

2024/08/23 09:23:47 Generate swagger docs....
2024/08/23 09:23:47 Generate general API Info, search dir:src
/Users/arielsrv/go/go1.23.0/src/runtime/time.go:174:17: cannot range over 3 (untyped int constant)
/Users/arielsrv/go/go1.23.0/src/runtime/time.go:174:17: cannot range over 3 (untyped int constant)
/Users/arielsrv/go/go1.23.0/src/runtime/time.go:174:17: cannot range over 3 (untyped int constant)
/Users/arielsrv/go/go1.23.0/src/slices/iter.go:50:17: cannot range over seq (variable of type iter.Seq[E])
/Users/arielsrv/go/go1.23.0/src/runtime/time.go:174:17: cannot range over 3 (untyped int constant)
/Users/arielsrv/go/go1.23.0/src/slices/iter.go:50:17: cannot range over seq (variable of type iter.Seq[E])
/Users/arielsrv/go/go1.23.0/src/runtime/time.go:174:17: cannot range over 3 (untyped int constant)
/Users/arielsrv/go/go1.23.0/src/slices/iter.go:50:17: cannot range over seq (variable of type iter.Seq[E])
/Users/arielsrv/go/go1.23.0/src/runtime/time.go:174:17: cannot range over 3 (untyped int constant)
/Users/arielsrv/go/go1.23.0/src/slices/iter.go:50:17: cannot range over seq (variable of type iter.Seq[E])
/Users/arielsrv/go/go1.23.0/src/runtime/time.go:174:17: cannot range over 3 (untyped int constant)
/Users/arielsrv/go/go1.23.0/src/runtime/time.go:174:17: cannot range over 3 (untyped int constant)
/Users/arielsrv/go/go1.23.0/src/slices/iter.go:50:17: cannot range over seq (variable of type iter.Seq[E])

Works fines with 1.22

Maybe it could work if exlucde internal go folders

@arielsrv
Copy link
Author

arielsrv commented Aug 23, 2024

However also If I try it with parseInteral throw this ....

task: [swagger] swag init -d src -g main.go -o src/resources/docs --parseGoList --parseDependency --parseInternal
2024/08/23 09:33:29 Generate swagger docs....
2024/08/23 09:33:29 Generate general API Info, search dir:src
2024/08/23 09:33:30 warning: failed to evaluate const mProfCycleWrap at /Users/arielsrv/go/go1.23.0/src/runtime/mprof.go:179:7, reflect: call of reflect.Value.Len on zero Value
2024/08/23 09:33:30 Generating model.MessageDTO
2024/08/23 09:33:30 Generating errorx.Error
2024/08/23 09:33:30 Generating model.CreateMessageDTO
2024/08/23 09:33:30 create docs.go at src/resources/docs/docs.go
2024/08/23 09:33:30 create swagger.json at src/resources/docs/swagger.json
2024/08/23 09:33:30 create swagger.yaml at src/resources/docs/swagger.yaml

@sdghchj
Copy link
Member

sdghchj commented Aug 23, 2024

Just use golang v1.23 to rebuild your swag with source code

@1saifj
Copy link

1saifj commented Aug 27, 2024

/usr/local/go/src/slices/iter.go:50:17: cannot range over seq (variable of type iter.Seq[E])
/usr/local/go/src/maps/iter.go:51:20: cannot range over seq (variable of type iter.Seq2[K, V])
/usr/local/go/src/slices/iter.go:50:17: cannot range over seq (variable of type iter.Seq[E])
/usr/local/go/src/maps/iter.go:51:20: cannot range over seq (variable of type iter.Seq2[K, V])
/usr/local/go/src/slices/iter.go:50:17: cannot range over seq (variable of type iter.Seq[E])
/usr/local/go/src/maps/iter.go:51:20: cannot range over seq (variable of type iter.Seq2[K, V])
/usr/local/go/src/slices/iter.go:50:17: cannot range over seq (variable of type iter.Seq[E])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants