charmbracelet / glow

Render markdown on the CLI, with pizzazz! 💅🏻
MIT License
16.38k stars 360 forks source link

v1.5.1 does not build cleanly with vendored depdencies #596

Closed st3iny closed 4 months ago

st3iny commented 8 months ago

Describe the bug Glow does not build after vendoring dependencies.

It could be fixed by updating the lang level in go.mod and updating the lock file.

Setup Please complete the following information along with version numbers, if applicable.

To Reproduce Steps to reproduce the behavior:

  1. Run go mod vendor
  2. Run go build
  3. Observe the error message.
$ go mod vendor
$ go build
# golang.org/x/sys/unix
vendor/golang.org/x/sys/unix/syscall.go:83:16: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)
vendor/golang.org/x/sys/unix/syscall_linux.go:1018:20: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)
vendor/golang.org/x/sys/unix/syscall_linux.go:2297:9: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)
vendor/golang.org/x/sys/unix/syscall_unix.go:118:7: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)
vendor/golang.org/x/sys/unix/sysvshm_unix.go:33:7: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)

Expected behavior The package should build just as it does without vendored dependencies.

st3iny commented 8 months ago

I just realized that this has been fixed on master in the meantime. I tried building the latest tag v1.5.1.

A new release would fix this issue.

EDIT: The related commit is https://github.com/charmbracelet/glow/commit/f0734709f0be19a34e648caaf63340938a50caa2.

caarlos0 commented 4 months ago

yep, this should be fixed on master.

thanks!