Skip to content

std.Build.Cache.addDepFile fails if the dep file contains directories #23055

@akarpovskii

Description

@akarpovskii

Zig Version

0.14.0-dev.3445+6c3cbb0c8

Steps to Reproduce and Observed Behavior

  1. zig init an empty project
  2. Create a "./depinfo.d" file with the following content:
    a: src
  3. Add the following to the build.zig:
    const cmd = b.addSystemCommand(&.{ "cp", "depinfo.d" });
    _ = cmd.addDepFileOutputArg("depinfo.d");
    run_cmd.step.dependOn(&cmd.step);
  4. ------> zig build run fails with error: IsDir

Expected Behavior

zig build run finishes successfully or reports a clear error

This is somewhat related to #20099 and #21912

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions