Skip to content

String parameter macro artifacts are not materialized when cached or built remotely #1166

@cbarrete

Description

@cbarrete

Consider the following:

genrule(
    name = "gen",
    out = "out.txt",
    cmd = "echo $(location :bin) > $OUT",
)

cxx_binary(
    name = "bin",
    srcs = ["main.cpp"],
)

Where the contents of main.cpp are irrelevant.

If RBE is enabled and :bin is built remotely or cached, it will not be materialized locally, so out.txt will point to a file that does not exist.

This can be simply reproduced by building :gen remotely, and it can be proved that this is an RBE-related materialization issue because buck2 build --local-only --no-remote-cache :gen has the expected behavior: bin is materialized locally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions