You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,14 +7,7 @@
7
7
`bazel-diff` offers several key advantages over rolling your own target diffing solution
8
8
9
9
1.`bazel-diff` is designed for very large Bazel projects. We use Java Protobuf's `parseDelimitedFrom` method alongside Bazel Query's `streamed_proto` output option. These two together allow you to parse Gigabyte or larger protobuf messages. We have tested it with projects containing tens of thousands of targets.
10
-
2. We avoid usage of large command line query lists when interacting with Bazel, [issue here](https://github.com/bazelbuild/bazel/issues/8609). When you interact with Bazel with thousands of query parameters you can reach an upper maximum limit, seeing this error:
11
-
12
-
```terminal
13
-
bash: /usr/local/bin/bazel: Argument list too long
14
-
```
15
-
16
-
`bazel-diff` is smart enough to prevent these errors
17
-
10
+
2. We avoid usage of large command line query lists when interacting with Bazel, [issue here](https://github.com/bazelbuild/bazel/issues/8609). When you interact with Bazel with thousands of query parameters you can reach an upper maximum limit, seeing this error `bash: /usr/local/bin/bazel: Argument list too long`. `bazel-diff` is smart enough to avoid these errors.
18
11
3.`bazel-diff` has been tested with file renames, deletions, and modifications. Works on `bzl` files, `WORKSPACE` files, `BUILD` files and regular files
19
12
20
13
Track the feature request for target diffing in Bazel [here](https://github.com/bazelbuild/bazel/issues/7962)
@@ -71,6 +64,7 @@ Open `bazel-diff-example.sh` to see how this is implemented. This is purely an e
71
64
## CLI Interface
72
65
73
66
`bazel-diff` Command
67
+
74
68
```terminal
75
69
Usage: bazel-diff [-hvV] [COMMAND]
76
70
Writes to a file the impacted targets between two Bazel graph JSON files
@@ -104,7 +98,7 @@ workspace.
104
98
Path to content hash json file. It's a map which maps
105
99
relative file path from workspace path to its
106
100
content hash. Files in this map will skip content
107
-
hashing and use provided value
101
+
hashing and use provided value
108
102
-h, --help Show this help message and exit.
109
103
-k, --[no-]keep_going This flag controls if `bazel query` will be executed
110
104
with the `--keep_going` flag or not. Disabling this
@@ -124,6 +118,14 @@ workspace.
124
118
Path to Bazel workspace directory.
125
119
```
126
120
121
+
### What does the SHA256 value of `generate-hashes` represent?
122
+
123
+
`generate-hashes` is a canonical SHA256 value representing all attributes and inputs into a target. These inputs
124
+
are the summation of the of the rule implementation hash, the SHA256 value
125
+
for every attribute of the rule and then the summation of the SHA256 value for
126
+
all `rule_inputs` using the same exact algorithm. For source_file inputs the
127
+
content of the file are converted into a SHA256 value.
0 commit comments