Build: make docs and coverage respect the build system more - #185
Merged
Merged
Conversation
The install_prefix field of std.Build has been removed in Zig 0.17.0. Additionally, it sits outside of the build dependency chain, which has always made it a bit of a no-no to use, even if it was a convenient way to get the zig-out directory for a project. This migrates all documentation steps and the coverage step to forms that are more respectful of how the build system is supposed to work. Namely, we now lean on a lot more cache-friendly processes through functions like addWriteFiles, addOutputFileArg, addOutputDirectoryArg, addCopyFile, captureStdOut, etc. Care has been taken to ensure that repeated runs of commands do not break artifacts like generated documentation; now running a command over and over will won't create additional cache entries, and it will not break what's already there - the sed commands won't create nonsense, for example. Additionally, we've removed the "docs" step as it's not longer necessary - the only thing that generates an artifact in zig-out now is "docs-bundle". This should help with the bulk of the migration of the build.zig file to Zig 0.17.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The
install_prefixfield ofstd.Buildhas been removed in Zig 0.17.0. Additionally, it sits outside of the build dependency chain, which has always made it a bit of a no-no to use, even if it was a convenient way to get thezig-outdirectory for a project.This migrates all documentation steps and the coverage step to forms that are more respectful of how the build system is supposed to work. Namely, we now lean on a lot more cache-friendly processes through functions like
addWriteFiles,addOutputFileArg,addOutputDirectoryArg,addCopyFile,captureStdOut, etc.Care has been taken to ensure that repeated runs of commands do not break artifacts like generated documentation; now running a command over and over will won't create additional cache entries, and it will not break what's already there - the
sedcommands won't create nonsense, for example.Additionally, we've removed the
docsstep as it's not longer necessary - the only thing that generates an artifact inzig-outnow isdocs-bundle.This should help with the bulk of the migration of the
build.zigfile to Zig 0.17.0.