Skip to content

zig build: replace src_path with LazyPath for install functions#18709

Closed
natecraddock wants to merge 1 commit intoziglang:masterfrom
natecraddock:install-functions
Closed

zig build: replace src_path with LazyPath for install functions#18709
natecraddock wants to merge 1 commit intoziglang:masterfrom
natecraddock:install-functions

Conversation

@natecraddock
Copy link

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 current installHeader() function only accepts a string path, so I wrote my own installHeader() using b.addInstallFileWithDir so 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.

Most install related functions in the build system use LazyPaths. This
replaces the few remaining src_path uses with LazyPath for consistency.
@andrewrk
Copy link
Member

andrewrk commented May 9, 2024

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.

@andrewrk andrewrk closed this May 9, 2024
@natecraddock natecraddock deleted the install-functions branch May 27, 2024 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants