various version manager improvements #389
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR applies three changes to the version manager. The changes correspond the first three commits.
offer to update workspace config files when selecting Zig version
fixes #247
Using the "Select and Install" popup to switch to a different Zig version will no longer be saved permanently. It will revert to the previous version after restarting VS Code. To make the change permanent, the version should be saved in a
.zigversion
,build.zig.zon
orsettings.json
file. The extension will automatically suggest this change with a message. If not workspace config has been found, a.zigversion
file will be created.I am open to any better wording suggestions for the message. This is what I went for:
lookup Zig in the $PATH if no workspace version has been specified.
If the workspace specified no Zig version, the extension would automatically install the latest tagged release. This commit will try to lookup Zig in the $PATH before falling back to the latest tagged release. This is meant to avoid confusing users why their already installed Zig version is not being used.
override the $PATH in the integrated terminal
Previously, if the $PATH has a zig version, the integrated terminal would prefer it over the version that is used by the version manager. Thanks to the previous commit, it now makes more sense to override the $PATH. This means that the integrated terminal will use the Zig version requested by the workspace even if the user added Zig to the $PATH.