Skip to content

Build.zig rename orgy. Renames FileSource to LazyPath and others - #16446

Merged
andrewrk merged 10 commits into
ziglang:masterfrom
ikskuh:buildsystem_rename_orgy
Jul 31, 2023
Merged

Build.zig rename orgy. Renames FileSource to LazyPath and others#16446
andrewrk merged 10 commits into
ziglang:masterfrom
ikskuh:buildsystem_rename_orgy

Conversation

@ikskuh

Copy link
Copy Markdown
Contributor

Tries to resolve#16353 and #16351

@andrewrk

Copy link
Copy Markdown
Member

I gave you a little example for how to do this with -femit-docs here: 6e4fff6 with a couple corrections in #16521.

@ikskuh
ikskuhforce-pushed the buildsystem_rename_orgy branch 7 times, most recently from a21f99d to 643ec8cCompareJuly 27, 2023 00:27
@ikskuh
ikskuh marked this pull request as ready for review July 27, 2023 16:42
@andrewrkandrewrk self-assigned this Jul 30, 2023
@andrewrk
andrewrkforce-pushed the buildsystem_rename_orgy branch from afea80d to 810f3f5CompareJuly 30, 2023 07:12
@andrewrk

Copy link
Copy Markdown
Member

I pushed a big-ass commit to this branch. This will be ready to merge after I do some more testing on some other projects that exercise the build system.

@andrewrkandrewrk added the breaking Implementing this issue could cause existing code to no longer compile or have different behavior. label Jul 30, 2023
Felix (xq) Queißnerand others added 7 commits July 30, 2023 11:18
…yPath and removes functions that take literal paths instead of LazyPath.
* introduce LazyPath.cwd_relative variant and use it for --zig-lib-dir. closesziglang#12685
* move overrideZigLibDir and setMainPkgPath to options fields set once
and then never mutated.
* avoid introducing Build/util.zig
* use doc comments for deprecation notices so that they show up in
generated documentation.
* introduce InstallArtifact.Options, accept it as a parameter to
addInstallArtifact, and move override_dest_dir into it. Instead of
configuring the installation via Compile step, configure the
installation via the InstallArtifact step. In retrospect this is
obvious.
* remove calls to pushInstalledFile in InstallArtifact. See ziglang#14943
* rewrite InstallArtifact to not incorrectly observe whether a Compile
step has any generated outputs. InstallArtifact is meant to trigger
output generation.
* fix child process evaluation code handling of `-fno-emit-bin`.
* don't store out_h_filename, out_ll_filename, etc., pointlessly. these
are all just simple extensions appended to the root name.
* make emit_directory optional. It's possible to have nothing outputted,
for example, if you're just type-checking.
* avoid passing -femit-foo/-fno-emit-foo when it is the default
* rename ConfigHeader.getTemplate to getOutput
* deprecate addOptionArtifact
* update the random number seed of Options step caching.
* avoid using `inline for` pointlessly
* avoid using `override_Dest_dir` pointlessly
* avoid emitting an executable pointlessly in test cases
Removes forceBuild and forceEmit. Let's consider these additions separately.
Nearly all of the usage sites were suspicious.
@andrewrk
andrewrkforce-pushed the buildsystem_rename_orgy branch from 810f3f5 to 6393928CompareJuly 30, 2023 18:19
This branch was not intended to introduce new test coverage on the
emit-h feature.
See ziglang#9698
The callsites of getPath rely on the result being absolute so that they
can pass the path to a child process with the cwd set to the build root.
@andrewrkandrewrk added the zig build system std.Build, the build runner, `zig build` subcommand, package management label Jul 31, 2023
@andrewrk
andrewrk enabled auto-merge July 31, 2023 03:32
@andrewrk
andrewrk merged commit 43b8304 into ziglang:masterJul 31, 2023
raysan5 pushed a commit to raysan5/raylib that referenced this pull request Aug 1, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breakingImplementing this issue could cause existing code to no longer compile or have different behavior.zig build systemstd.Build, the build runner, `zig build` subcommand, package management

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rename std.Build.FileSource to std.Build.LazyPath

2 participants

@ikskuh@andrewrk