-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rename std.Build.FileSource
to std.Build.LazyPath
#16353
Comments
even if i dont really like If we perform this change, we maybe should remove the normal "path taking" functions, and also make include and lib dirs use lazypath, but we should add a convenience function for easy physical paths. Something like exe.addIncludePath(b.localPath("src/include"));
exe.addLibraryPath(Build.systemPath("/usr/include")); would be very good for documentation |
How about
Agreed! Although, it's a bit suspicious to hard code absolute paths to the system, isn't it? It seems to me the build script should merely ask for the system include directory, and then the build system should provide it via a combination of known system directories, and the I'm thinking more like this: Lines 1368 to 1412 in 89396ff
|
Yeah i think this is more fitting.
Yeah, but it's good for getting stuff up and running when dealing with several packages/tools that aren't on a remote yet and i don't copy-paste/link it into all my projects. Imho system-wide paths should be supported for a good local-development experience, but that's up to you. the search prefix thing looks good. |
|
trying to tackle that, going with |
* Allow calling it multiple times. * Rename it. Sorry, this is to coincide with #16353.
* Allow calling it multiple times. * Rename it. Sorry, this is to coincide with #16353.
…yPath and removes functions that take literal paths instead of LazyPath.
…yPath and removes functions that take literal paths instead of LazyPath.
…yPath and removes functions that take literal paths instead of LazyPath.
…yPath and removes functions that take literal paths instead of LazyPath.
…yPath and removes functions that take literal paths instead of LazyPath.
See corresponding ziglang change here: ziglang/zig#16353
See corresponding ziglang change here: ziglang/zig#16353
See corresponding ziglang change here: ziglang/zig#16353
zig/lib/std/Build.zig
Lines 1633 to 1634 in b9fc0d2
It's not really a "file", is it? It could be a directory:
zig/lib/std/Build/Step/WriteFile.zig
Lines 128 to 132 in b9fc0d2
"Source" is super confusing. Is it a source file? Not really, it could be an output artifact, or an input binary file.
The doc comment gives it away:
Therefore I propose:
As well as all functions such as
getOutputSource
togetOutput
. For that one in particular, let's make itgetEmittedBin
, corresponding to-femit-bin
(related: #16351). Here is a full list of suggested renames:cc @MasterQ32 who originally introduced this crucial abstraction to the build system.
The text was updated successfully, but these errors were encountered: