Skip to content

Document git workspace SHA1 inclusion in C++ builds #2893

@htuch

Description

@htuch

Today, the best reference I can find for this is https://groups.google.com/forum/m/#!topic/bazel-discuss/9kqLmOq_m_U. The public docs (e.g. Build Encyclopedia) don't mention many of the details. For example linkstamp for cc_library is not documented, nor is --workspace_status_command or the reference workspace status command tools/buildstamp/get_workspace_status (which is not the default).

We spent quite some time in the Envoy project during our Bazel conversion on getting a live git SHA1 since we were unaware of these mechanisms, mucking around with genrule and repository_rule. I think it would be beneficial to document this clearly, as this is a very core thing a build system needs to be able to do for any non-trivial project that does production releases.

@mattklein123

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3We're not considering working on this, but happy to review a PR. (No assignee)staleIssues or PRs that are stale (no activity for 30 days)team-DocumentationDocumentation improvements that cannot be directly linked to other team labelsteam-Rules-CPPIssues for C++ rulestype: documentation (cleanup)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions