nominated zig
Seems fairly common that projects follow the mach nominated zig versions, I wonder if it could be interesting to add both a stable and nominated versions which could translate to latest stable and nominated respectively.
Could zigup also provide a zls binary for both these versions? (Optionally via cli args)
Yeah I think having some sort of nominated zig version integration could be interesting. Not sure exactly what that looks like though?
Yeah I think having some sort of nominated zig version integration could be interesting. Not sure exactly what that looks like though?
Mach provides a modified index.json at https://machengine.org/zig/index.json that is a superset (though updated less often) of the Zig project's index.json, it is described here.
I think it will be relatively simple to support Mach's nominated versions by simply checking both the upstream and Mach index.json file when looking for a compiler version. The only small complication I foresee is if we want to deduplicate zig versions with the same name as the Mach index.json contains entries both named for the nominated version and the Mach version, with the latter being an alias for a nominated version, as well as a mach-latest which is an alias for the latest nominated version.
@marler8997 when you get a chance could you have a look at https://github.com/marler8997/zigup/pull/155? It makes very minimal changes to support other index urls. I think this could be a good escape hatch even if not the most user friendly but looking at 2 indices sort of makes the merging and download multiple a little more complicated so this is very much unopinionated and people can use whatever index they want.
Support for nominated zig is definitely a requirement for us. We want the ability to go back in time and build old versions of the game, so while I think zigup would be a step up from our current rather tedious setup, we can't switch over just yet. ( https://github.com/Srekel/tides-of-revival )
Another thing that we need for zigup to work well for us in this regard is to supply our own zig builds. It's a little bit unclear - maybe this already works by manually placing thebuilds inside the zig/<version>/files folder and to also copy over a keep file?
~~Unfortunately this didn't seem to work. I copied over 0.14.0-dev.1911+3bf89f55c into the same folder structure and tried to set it as a default but got an error:~~
Sorry, that was apparently due to code holding some lock over the zig process! It seems to work now. 🌞
PS C:\Projects\elvengroin-legacy\tools\binaries\zigup> zigup default 0.14.0-dev.1911+3bf89f55c
install directory 'C:\Projects\elvengroin-legacy\tools\binaries\zigup\zig'
mkdir "C:\Projects\elvengroin-legacy\tools\binaries\zigup\zig"
error: AccessDenied
PS C:\Projects\elvengroin-legacy\tools\binaries\zigup> zigup list
install directory 'C:\Projects\elvengroin-legacy\tools\binaries\zigup\zig'
0.14.0-dev.1911+3bf89f55c
0.14.0-dev.2577+271452d22
PS C:\Projects\elvengroin-legacy\tools\binaries\zigup>