chore(tr): add dependency graph to TR rpc interface#348
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Backwards compatibility summary: |
semgrep_output_v1.atd
Outdated
| | CallTransitiveReachabilityFilter of transitive_finding list | ||
| (* for now, the transitive reachability filter takes only a single dependency graph as input. | ||
| * it is up to the caller to call it several times, one for each subproject *) | ||
| | CallTransitiveReachabilityFilter of ((found_dependency * downloaded_dependency list) * transitive_finding list) |
There was a problem hiding this comment.
I think you want (found _dependency * downloaded_dependency) list no ?
Also why you talk about graph in the comment?
There was a problem hiding this comment.
correct, fixed.
The (found _dependency * downloaded_dependency) list encodes the dependency graph, so the comment is referring to that
| *) | ||
| } | ||
|
|
||
| type transitive_reachability_filter_params = { |
b8aaedd to
c70701f
Compare
2c662e2 to
2fabafb
Compare
c70701f to
9056434
Compare
2fabafb to
031c5a8
Compare
| * (similar to (LockfileOnlyMatch Transitive)) | ||
| *) | ||
| | TransitiveUndetermined | ||
| | TransitiveUndetermined of transitive_undetermined |
There was a problem hiding this comment.
@aryx I think we will need to override the backwards compatibility check for this, does that seem reasonable? Should be okay since these types aren't consumed anywhere, right?
There was a problem hiding this comment.
can you override and merge? I don't think I have permission
9056434 to
7efe189
Compare
031c5a8 to
2d8231e
Compare
2d8231e to
8289a19
Compare

TR will require sending the dependency graph in addition to the transitive findings in order to do the filtering step. This adds a single dependency graph to the RPC interface.
make setup && maketo update the generated code after editing a.atdfile (TODO: have a CI check)For example, the Semgrep backend need to still be able to consume data
generated by Semgrep 1.50.0.
See https://atd.readthedocs.io/en/latest/atdgen-tutorial.html#smooth-protocol-upgrades
Note that the types related to the semgrep-core JSON output or the
semgrep-core RPC do not need to be backward compatible!