Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change with.version default to latest #24

Closed
nektro opened this issue Aug 20, 2021 · 9 comments
Closed

change with.version default to latest #24

nektro opened this issue Aug 20, 2021 · 9 comments

Comments

@nektro
Copy link

nektro commented Aug 20, 2021

whether that be the latest release or master

@goto-bus-stop
Copy link
Owner

i think if anything, the default should be removed so users must specify a version

@nektro
Copy link
Author

nektro commented Aug 20, 2021

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

@goto-bus-stop
Copy link
Owner

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.

@nektro
Copy link
Author

nektro commented Aug 20, 2021

the latter is much more just works because it picks a sensible default

@goto-bus-stop
Copy link
Owner

goto-bus-stop commented Aug 20, 2021

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.

@nektro
Copy link
Author

nektro commented Aug 20, 2021

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

@nektro
Copy link
Author

nektro commented Aug 20, 2021

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

@goto-bus-stop
Copy link
Owner

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.

@nektro
Copy link
Author

nektro commented Dec 13, 2021

defaulting to the latest release the the status quo for every other language action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants