Open dweiller opened 4 months ago
I'm not sure exactly how to get into this state that's newly being handled here but it seems like a reasonable feature, would you mind adding a test for this in test.zig
?
P.S. This might be helpful and/or a way to implement https://github.com/marler8997/zigup/issues/135 ?
To help with an implementation of #135, the logic would want to be a bit different than what is currently implemented. At the moment I have (conservatively) chosen to not list links that resolve to paths outside the installation directory. For #135 (and maybe in general) we would want to list any symlink to a directory. This is simpler to do than the current implementation and allows for more use cases like #135 or linking to a local build of zig.
would you mind adding a test for this in
test.zig
?
Will do.
I've simplified the logic as mentioned above. It looks like windows is handling the symlinks in an odd way (or at least unexpected to me) that will need some investigation.
Looks like windows is failing, I think there's a way to test if symlinks are supported you could use to disable the test in that case?
This PR makes
zigup list
include symlinks to compilers in the install directory display in the list of installed compilers. This is useful as it is possible to use these symlinks as theCOMPILER_NAME
inzigup default COMPILER_NAME
. Currently the only symlink created by zigup is one formaster
, but this PR would also support a user who wants to make custom symlinks to name particular compilers.This feature will be particularly helpful if/when mach nominated versions are supported (see #145), as all of the nominated versions should be referenced via a link.