zig build: replace src_path with LazyPath for install functions#18709
Closed
natecraddock wants to merge 1 commit intoziglang:masterfrom
Closed
zig build: replace src_path with LazyPath for install functions#18709natecraddock wants to merge 1 commit intoziglang:masterfrom
natecraddock wants to merge 1 commit intoziglang:masterfrom
Conversation
Most install related functions in the build system use LazyPaths. This replaces the few remaining src_path uses with LazyPath for consistency.
nektro
approved these changes
Jan 27, 2024
Member
|
I'm sorry, I didn't review this in time, and now it has bitrotted. Furthermore, so many pull requests have stacked up that I can't keep up and I am therefore declaring Pull Request Bankruptcy and closing old PRs that now have conflicts with master branch. If you want to reroll, you are by all means welcome to revisit this changeset with respect to the current state of master branch, and there's a decent chance your patch will be reviewed the second time around. Either way, I'm closing this now, otherwise the PR queue will continue to grow indefinitely. |
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.
Most install related functions in the build system use LazyPaths. This replaces the few remaining src_path uses with LazyPath for consistency.
This is motivated by a workaround I used in Ziglua: https://github.com/natecraddock/ziglua/blob/db29119d23f1c540fe2b9656001eb53f522ccd0b/build.zig#L199-L214
I use the package manager for the Lua source code rather than vendoring it, so I need to use a
dependency.path()to access the header files. The currentinstallHeader()function only accepts a string path, so I wrote my owninstallHeader()usingb.addInstallFileWithDirso I could use the LazyPath from the dependency.I also changed the other install related functions because most of the existing Build.zig install functions already use a LazyPath for the source. I think this is a reasonable change to include.