charmbracelet/bubbletea

go version in go.mod is outdated

jmonroynieto opened this issue · 2 comments

The library's go.mod describes Go version v1.18, which was released in 2022 and stopped being supported in 2023. Additionally, some of the code in the examples have in-house max() and min() functions, which have been replaced with generic language built-ins since Go 1.21.

I don't think that there are any complications with moving the version forward:

  1. All tests in the library pass.
  2. gum, glow, and glyphs all build and function as expected. (tested with replace directive)
  3. I found an error when building gembro. Segmentation fault using a function inside screen.go. This program is distributed using Bubbletea v 0.19, and projects like this won't be affected until they decide to upgrade the dependency.

So generally we try and keep the Go version on the lower end to maximize compatibility as certain distros ship with older version of Go. As I understand things, Go 1.21 will build older Go just fine and in general any Go written against 1.x will compile with future 1.x versions.

Other than using niceties like using min and max as builtins, is there any particular reason to bump the version in go.mod?

Hey, again. I'm going to close this one, however if you feel strongly about it please let us know and we can re-open accordingly. Thanks!