I am currently trying to use OhSnap, which depends on pretty, but I get a compilation error because zig 0.14 changed some internals, and pretty only fixed this in the main branch, not in the release OhSnap depends on. How can I override the version of pretty that OhSnap gets to use?
I’d fork OhSnap and make a change that updates the pretty
dependency and send a PR upstream. Meanwhile, you can point your own project to use your own fork OhSnap with
zig fetch --save git+https://github.com/<your fork url>#<your commit ID>
I’ve recently had to do this for a few deps and the fact that you can simply point to a GitHub URL in the build zon file is genius while still encouraging developers to send build fixes upstream.
Thank you for the answer! This is also what I’ve done in the meantime, although I would wish there was a way to override transitive dependencies without having to manually patch them.