Closed nektro closed 1 year ago
i think if anything, the default should be removed so users must specify a version
that would be a huge anti-pattern and not only go against the "just works" nature of the zig philosophy but also non-standard from many other tools people are familiar with. git defaults to master
, docker defaults to :latest
, etc
you usually don't use docker's latest
default in your CI, you use a version that matches what you use in production. removing the default is not a regression from the status quo, since 0.5.0 is already so old that most projects have to override it.
imo, having to do
- uses: goto-bus-stop/setup-zig@v2
with:
version: master
is no less "just works" than
- uses: goto-bus-stop/setup-zig@v1
and in the first section it's also explicit which version you are targeting.
the latter is much more just works because it picks a sensible default
i don't think an auto-updating reference that has frequent breaking changes is a sensible default for every project, that has to be quite intentional. it's good if projects rely on master
so future zig versions get testing, but you'd probably also want to test on whatever release versions you want to support, and most libraries should probably work on the latest public release at least?
like it "just works" now but it doesn't "just work" when you get back to a project in a year from now and don't remember what version was current at the time.
as mentioned in the original comment, latest release would be acceptable too, I would only personally prefer master. a hardcoded 0.5.0
default is what seemed odd
and yes, as the language changes people's CI should break so that they know they need to update their code. that's the point
0.5.0 is odd, yes ;p
upgrading the default to a newer release is a breaking change to the action. So users would have to update their CI code anyways to get the new default. that's why i think it's better to not have a default at all. then they can update the Zig version number themselves and don't have to wait for a new setup-zig release, or look at the release notes to see which setup-zig release uses which Zig version, etc.
you need to specify the version number explicitly anyway in the case where you want to test on a proper release AND on nightly.
defaulting to the latest release the the status quo for every other language action
whether that be the latest release or master