vburenin / ifacemaker

Generate interfaces from structure methods.
Apache License 2.0
322 stars 43 forks source link

go1.11 compat broken #53

Open markus-wa opened 2 years ago

markus-wa commented 2 years ago

hi

this is just to inform that master now broke go1.11 compat. not sure if this is just a documentation issue, but v1.1.0 was working fine.

I noticed this via my CI pipeline breaking: https://github.com/markus-wa/demoinfocs-golang/runs/6155103076?check_suite_focus=true

to repro, use docker run -it golang:1.11

$ go get github.com/vburenin/ifacemaker
# golang.org/x/mod/module
src/golang.org/x/mod/module/module.go:147:5: undefined: errors.As

unfortunately go1.11 doesn't allow for specifying a specific version in GOPATH mode, so GO111MODULE=off go get github.com/vburenin/ifacemaker@v1.1.0 doesn't fix the issue

$ go install github.com/vburenin/ifacemaker@v1.1.0
can't load package: package github.com/vburenin/ifacemaker@v1.1.0: cannot use path@version syntax in GOPATH mode

some options to fix:

Probably not worth doing option B as Go 1.11 is very old, so I'd go with option A or C.

markus-wa commented 2 years ago

actually this is a bit of a bigger issue than I thought

option B doesn't seem to work option A means to use the package with old versions the user has to manually git clone the repo, check out a good version and go install

markus-wa commented 2 years ago

further, v1.1.0 is a bit outdated. a new tag of the latest version with go1.11 compat (e.g. from maybe 2020 or early 2022?) would be very useful.

and PS: thanks a lot for maintaining the project :heart: