Skip to content

Documentation does not say what generated hashes actually represent #166

@keithl-stripe

Description

@keithl-stripe

The bazel-diff generate-hashes -h output mentions that it produces one hash per Bazel target:

Usage: bazel-diff generate-hashes [-hkvV] -b=<bazelPath>
                                  [--contentHashPath=<contentHashPath>]
                                  [-s=<seedFilepaths>] -w=<workspacePath>
                                  [-co=<bazelCommandOptions>]...
                                  [-so=<bazelStartupOptions>]... <outputPath>
Writes to a file the SHA256 hashes for each Bazel Target in the provided
workspace.

However it does not say what these hashes represent. I get the impression they are supposed to be analogous to Bazel's action cache key, but more conservative. It was especially unclear to me whether these hashes include information about transitive dependencies. My experimentation suggests that they do; that if any transitive dep of a target changes, its hash will change.

Regardless of whether my interpretation above is correct, a sentence or two in the help (and in the README) would go a long way to communicating what these hashes can be used for. Basically it should answer "What changes will result in a different hash?"

  • Target's input file is modified?
  • Target's deps (and/or other attributes) are changed?
  • Target's transitive deps have input file modified?
  • Bazel upgrade?
  • Rule implementation change?

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