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
We currently use bazel-diff to answer two questions: "for this commit compared to trunk, what bazel targets have changed?" and "for the commits in this branch compared to their merge base commit, what bazel targets have changed?"
Would this be possible with focus' build graph understanding? In both of the current use cases for bazel-diff, we could potentially get a speed improvment by instead thinking about combining the build graph changes per commit, so that would be another area of interest about merging/diff-ing graphs.
It should be possible for Focus to quickly provide an answer to the question of "which Bazel packages have changed" as a conservative overestimate via its textual hashing mechanism. Once you've reduced the universe of interest significantly, you could use a different system which understands Bazel targets at a finer-grained level to examine only the specific targets in those packages. Presumably bazel-diff can do that? Uber also mentioned that they have a system that calculates the hashes of inputs and outputs for rules for the same thing.
I tried implementing this for our codebase, but Focus doesn't actually support all of the targets in our repository, and you need to track the entire build graph with Focus, or you risk missing changed reverse dependencies. You could try running something like focus add bazel://... to see if your codebase's build graph can be represented entirely by focus. In our case, that fails due to the dependencies of some third-party packages.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
@maxious mentioned this:
It should be possible for Focus to quickly provide an answer to the question of "which Bazel packages have changed" as a conservative overestimate via its textual hashing mechanism. Once you've reduced the universe of interest significantly, you could use a different system which understands Bazel targets at a finer-grained level to examine only the specific targets in those packages. Presumably bazel-diff can do that? Uber also mentioned that they have a system that calculates the hashes of inputs and outputs for rules for the same thing.
I tried implementing this for our codebase, but Focus doesn't actually support all of the targets in our repository, and you need to track the entire build graph with Focus, or you risk missing changed reverse dependencies. You could try running something like
focus add bazel://...to see if your codebase's build graph can be represented entirely by focus. In our case, that fails due to the dependencies of some third-party packages.Beta Was this translation helpful? Give feedback.
All reactions