Re:Show HN: I wrote a BitTorrent Client from scratch
by pidgeon_lover on Friday June 13, 2025 @08:55AM
(#44268079)
Windows 7 support is one reason to stick to older GoLang releases. A project in Go 1.21.4 or earlier will work on every Windows release and any computer made since 2009, whereas a version bump to v1.21.5 means it will only work on more recent computers and Win10 and 11 for no benefit.
Re:Show HN: I wrote a BitTorrent Client from scratch
by wongarsu on Friday June 13, 2025 @10:40AM
(#44268952)
I think this is a reasonable take. Yes, people shouldn't be running Windows 7 as their daily driver. But if you can support it at basically no effort and without sacrifices that is the right thing to do. Supporting more platforms is a good thing, even if that platform is an old Windows version instead of an Amiga
Re:Show HN: I wrote a BitTorrent Client from scratch
by CactusRocket on Saturday June 14, 2025 @04:05AM
(#44274960)
> and without sacrifices
There are always trade-offs/sacrifices.
The Go team isn't making new versions just for fun. Each version since 1.21 has had improvements. Especially the fix/change to for loop variables in 1.22 is very nice to have, and helps preventing to write bugs.
If there's a reasonable expectation that users will use outdated platforms, it makes sense to support them. If there is no such expectation at all, why would one forego the improvements to the language and tooling.
There's always a price to pay.
Re:Show HN: I wrote a BitTorrent Client from scratch
by dd_xplore on Saturday June 14, 2025 @04:10AM
(#44274980)
In this case the 'improvements' aren't required for this particular project.
Re:Show HN: I wrote a BitTorrent Client from scratch
by koito17 on Friday June 13, 2025 @10:15PM
(#44273760)
The README is likely AI-generated. The actual go.mod file lists 1.23.1 as the Go version[1], which implies a requirement of Go 1.23.1 or higher[2].
[1] https://github.com/piyushgupta53/go-torrent-client/blob/6130...
Re:Show HN: I wrote a BitTorrent Client from scratch
by dlock17 on Saturday June 14, 2025 @05:34PM
(#44278993)
Go 1.21 includes an internal auto-updater that can compile later Go versions by looking in the go mod file itself.
So the README is correct.
Re:Show HN: I wrote a BitTorrent Client from scratch
by koito17 on Saturday June 14, 2025 @07:14PM
(#44279463)
Automatic toolchain switching does not trigger compilation of later Go toolchains; it only attempts fetching a blob (if available) and using that to perform builds[1]. If a system supports Go 1.21 but not 1.23.1 (e.g. Windows 7, mentioned in a sibling comment), then this project will fail to build on said system. Likewise, if a user on Go 1.21 has disabled automatic toolchain switching, the Go CLI refuses to build the project at all.
Overall, I would say the minimum required Go version is indeed the Go version declared in the go.mod, since that is the declared minimum required toolchain.
EDIT: It seems like it was deprecated 10 months ago