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

In versions greater than 1.8.4 --parseDependency crashes with indirect dependencies #1466

Closed
ldrazic opened this issue Feb 9, 2023 · 7 comments

Comments

@ldrazic
Copy link

ldrazic commented Feb 9, 2023

I have a gin api project in go, github.com/gin-gonic/gin uses the package github.com/pelletier/go-toml/v2 v2.0.6 that has:
const (
// The default lowest and highest continuation byte.
locb = 0b10000000
hicb = 0b10111111)

this const in the utf8.go file

If I run swag init --parseDependency=true -g docs/config_swagger.go using the swaggo/swag v1.8.10

I get the next error:

2023/02/09 16:59:51 warning: failed to evaluate const locb at /Users/leandrodrazic/go/pkg/mod/github.com/pelletier/go-toml/v2@v2.0.6/internal/characters/utf8.go:183:2, strconv.ParseUint: parsing "b10000000": invalid syntax
2023/02/09 16:59:51 warning: failed to evaluate const hicb at /Users/leandrodrazic/go/pkg/mod/github.com/pelletier/go-toml/v2@v2.0.6/internal/characters/utf8.go:184:2, strconv.ParseUint: parsing "b10111111": invalid syntax

But in version 1.8.4 this problem doesnt happen and the yaml is built without any error or warning

@leimeng-go
Copy link

I have the same question

@coolyrat
Copy link

I am currently using the -q to ignore the warning.

@gfppower
Copy link

I have the same question

@minQpple
Copy link

me too, I have to use v1.8.3

@ZackaryWelch
Copy link

Having a similar issue on 1.8.10 with octal constants in the form "0o755" or the like. Tries to parse them as uint and fails.

@minghsu0107
Copy link

Have the same issue too when using v1.8.10. Everything works fine after downgrading to v1.8.4.

@sdghchj
Copy link
Member

sdghchj commented Jul 18, 2023

The same issue as #1584, fixed by #1593

@sdghchj sdghchj closed this as completed Jul 18, 2023
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

No branches or pull requests

9 participants