Skip to content
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

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

Merged
merged 10 commits into from
Jul 31, 2023

Conversation

ikskuh
Copy link
Contributor

@ikskuh ikskuh commented Jul 19, 2023

Tries to resolve #16353 and #16351

@andrewrk
Copy link
Member

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

@ikskuh ikskuh force-pushed the buildsystem_rename_orgy branch 7 times, most recently from a21f99d to 643ec8c Compare July 27, 2023 00:27
@ikskuh ikskuh marked this pull request as ready for review July 27, 2023 16:42
@andrewrk andrewrk self-assigned this Jul 30, 2023
@andrewrk
Copy link
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.

@andrewrk andrewrk 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ßner and 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. closes ziglang#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.
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.
@andrewrk andrewrk 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:master Jul 31, 2023
raysan5 pushed a commit to raysan5/raylib that referenced this pull request Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Implementing this issue could cause existing code to no longer compile or have different behavior. zig build system std.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