Skip to content

Impacted targets always emptyΒ #42

@BalestraPatrick

Description

@BalestraPatrick

Hello!

I'm trying out the example script (using the latest version with the fix released in https://github.com/Tinder/bazel-diff/releases/tag/2.1.1), but the /tmp/impacted_targets.txt` file is always empty in my case. My test case contains only two commits. So commit A has some changes and commit B has some other changes in another package.

I then run ./bazel-diff-example.sh ~/src/myrepo bazelisk A-SHA B-SHA .

Here's the result:

  • /tmp/modified_filepaths.txt correctly contains the paths of the files changed in commit B (8 files were modified in my example).
  • /tmp/starting_hashes.json correctly contains some hashes.
  • /tmp/final_hashes.json contains exactly the same hashes as the starting json, this seems wrong to me.
  • /tmp/impacted_targets.txt is empty.

I'm not really sure what could be the problem. I tried to run bazel-diff from source and adding some log statements and I see that the impacted targets array is empty, so something must be wrong in the diffing or computation of the hashes. Did you ever see something like this? When I run bazelisk query '//external:all-targets' + '//...:all-targets', I can see the target that I would expected to be run with the changes in commit B.

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