Skip to content

add addCheckFile method to FileSource #14960

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

Open
Tracked by #14647
andrewrk opened this issue Mar 17, 2023 · 2 comments
Open
Tracked by #14647

add addCheckFile method to FileSource #14960

andrewrk opened this issue Mar 17, 2023 · 2 comments
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. zig build system std.Build, the build runner, `zig build` subcommand, package management
Milestone

Comments

@andrewrk
Copy link
Member

Extracted from #14647.

zig/lib/std/Build.zig

Lines 1532 to 1539 in b4d58e9

/// A file source is a reference to an existing or future file.
pub const FileSource = union(enum) {
/// A plain file path, relative to build root or absolute.
path: []const u8,
/// A file that is generated by an interface. Those files usually are
/// not available until built by a build step.
generated: *const GeneratedFile,

This new function should create a CheckFileStep.

Related: #14945

@andrewrk andrewrk added enhancement Solving this issue will likely involve adding new logic or components to the codebase. contributor friendly This issue is limited in scope and/or knowledge of Zig internals. zig build system std.Build, the build runner, `zig build` subcommand, package management labels Mar 17, 2023
@andrewrk andrewrk added this to the 0.12.0 milestone Mar 17, 2023
@bsubei
Copy link
Contributor

bsubei commented Jul 21, 2024

Just a note for future readers, FileSource was renamed to LazyPath (see #16353).

@cdeler
Copy link
Contributor

cdeler commented Jan 5, 2025

@andrewrk , I see you added

zig/lib/std/Build.zig

Lines 1859 to 1865 in 136c5a9

pub fn addCheckFile(
b: *Build,
file_source: LazyPath,
options: Step.CheckFile.Options,
) *Step.CheckFile {
return Step.CheckFile.create(b, file_source, options);
}
since the issue was created (and this function is actively used). So probably it's not required anymore?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. zig build system std.Build, the build runner, `zig build` subcommand, package management
Projects
None yet
Development

No branches or pull requests

3 participants