fatih / color

Color package for Go (golang)
https://pkg.go.dev/github.com/fatih/color
MIT License
7.26k stars 615 forks source link

Update vendor #83

Closed joconcepts closed 6 years ago

joconcepts commented 6 years ago

We are facing an issue while using this package while golang.org/x/sys/unix is pinned to a really old version.

# go build
# [hidden]/vendor/golang.org/x/crypto/ssh/terminal
vendor/golang.org/x/crypto/ssh/terminal/util.go:30: undefined: unix.IoctlGetTermios
vendor/golang.org/x/crypto/ssh/terminal/util.go:38: undefined: unix.IoctlGetTermios
vendor/golang.org/x/crypto/ssh/terminal/util.go:54: undefined: unix.IoctlSetTermios
vendor/golang.org/x/crypto/ssh/terminal/util.go:64: undefined: unix.IoctlGetTermios
vendor/golang.org/x/crypto/ssh/terminal/util.go:75: undefined: unix.IoctlSetTermios
vendor/golang.org/x/crypto/ssh/terminal/util.go:80: undefined: unix.IoctlGetWinsize
vendor/golang.org/x/crypto/ssh/terminal/util.go:98: undefined: unix.IoctlGetTermios
vendor/golang.org/x/crypto/ssh/terminal/util.go:107: undefined: unix.IoctlSetTermios
vendor/golang.org/x/crypto/ssh/terminal/util.go:112: undefined: unix.IoctlSetTermios

So we've pinned the package golang.org/x/sys/unix to latest version and our project builds. The reason for this issue is that your version to old to provide the needed methods and glide resolves the versions listed in the manifests of packages.

Maybe you need to check if it is possible to update your manifest to newer versions of your packages.

fatih commented 6 years ago

Hi @joconcepts

Thanks for the bug reports. Can you please tell me the latest revision of the unix package and the revision you guys need? I can sure update it, but that's a dependency of the two other dependencies I use in Color. So I need to be sure those also work in sync with the latest unix package.

joconcepts commented 6 years ago

We need at least this version: 4ed4d404df456f81e878683a0363ed3013a59003 But we used the latest master version and it went well.

fatih commented 6 years ago

Can you please try this PR/branch out: https://github.com/fatih/color/pull/86 ?

fatih commented 6 years ago

ping @joconcepts

vancexu commented 6 years ago

Hi @fatih , I had the same issue. When tried your #86 , build success. So I think you can merge it now.

If you like, maybe you could update to the latest sys? Current in #86 , go/sys is using 8b4580aae2a0dd0c231a45d3ccb8434ff533b840 which is Nov 30, 2017. The latest one is 37707fdb30a5b38865cfb95e5aab41707daec7fd which is Feb 2, 2018. (https://github.com/golang/sys/commit/37707fdb30a5b38865cfb95e5aab41707daec7fd)

Thanks

fatih commented 6 years ago

This is now merged to master. I've tagged a new release with v1.6.0: https://github.com/fatih/color/releases/tag/v1.6.0 or pull the latest master. Thanks again for the feedback.