[build] Zig master branch compatibility for build.zig. #5520
Conversation
…v.1593+c13857e50. still backwards compatible with 0.15.1
merge with upstream again
…tible with zig 0.15
build.zig. build.zig.
|
@Not-Nik Please, could you review this PR before merging? |
Adapt to Zig 0.16 breaking API changes: - std.fs.cwd() replaced with std.Io.Dir.cwd() with explicit io param - std.process.getEnvVarOwned() replaced with b.graph.environ_map.get() - Bump minimum version to 0.16.0-dev Ref: raysan5#5487, raysan5#5520 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
I'm not up to date on all the changes in Zig's master, so I can't give a full review, but This looks to be a bit sketchy with checking the compiler version in the build script. Maybe @HaxSam has more insights. |
|
I'm going to look into it. we kinda had this discussion already: #4620 |
|
since 0.16 isn't actually out yet and it's the master branch i thought it'd be a good idea to maintain compatibilty with stable for now. if y'all wanna break it i could remove the backwards compatibility code simplifying it for 0.16 and breaking compatibility. |
|
I think breaking compatibility isnt that bad because if you wanna use raylib with 0.15.2 you could use a older commit of the master. |
|
Can give a complete review in like ~8h |
|
Hi there, is it really needed to make it compatible with Master? how long this compatibility will survive? |
|
About compatibility, as per my understanding most Zig users should be using latest master, considering it is a project in development and introducing breaking changes along it. Personally I prefer to minimize code paths if not strictly necesary. |
|
Looks good |
|
@HaxSam thanks for the further review! merging! |
|
yeah, if you read the thread you'll find raysan decided to break compatibility. you'll have to keep the commit before the update |
You can fork the raylib and add the build file on .gitignore and keep the remain of the project updated. (I will do it) |
Added compatibility for zig-master 0.16.0-dev.2349+204fa8959, while still maintaining 0.15 backwards compatibility. Doing so results in a bit more code.