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

zig default master #33

Closed
marler8997 opened this issue Nov 6, 2021 · 4 comments · Fixed by #34
Closed

zig default master #33

marler8997 opened this issue Nov 6, 2021 · 4 comments · Fixed by #34

Comments

@marler8997
Copy link
Owner

marler8997 commented Nov 6, 2021

The zig default command is meant to set the default compiler without fetching it. In contrast, when referencing the zig master version, the latest version is requested from the zig download site each time. This would mean that zigup default master would fail with "compiler not installed" if the website has published a new version since it was last fetched. That being said, the "spirit" of the default command is not to fetch anything, so in this case, I think it makes more sense to have zigup default master set the default compiler to the last master version that was fetched, rather than trying to get the latest version and fail most of the time.

@ghost
Copy link

ghost commented Nov 6, 2021

Kind of speaking out of line here since I have not used zigup in a bit. Having default also fetch would have it overlap with fetch, no? In other compiler toolchains you explicitly have to pass update to, well, update the compiler to latest.

Also, having default fetch would have it overlap with this as well, no?

# fetch a compiler and set it as the default
zigup <version>
zigup master
zigup 0.6.0

@marler8997
Copy link
Owner Author

Yeah if zig default VERSION also fetched, then it would be exactly the same as zig VERSION, not very helpful.

@ghost
Copy link

ghost commented Nov 9, 2021

I guess you can have zig default <VERSION> fetch only if that version is not installed yet. And of course set it as default then.

@iddev5
Copy link
Contributor

iddev5 commented Nov 13, 2021

@cmyka1b2c3d4 what you are asking for is already done by zigup <VERSION> command. The spirit of zigup default <VERSION> is to set the mentioned version as default and show an error if it is not installed, i,e it does not fetch anything in any case.

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

Successfully merging a pull request may close this issue.

2 participants