-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace lockfile with dependency source in targets #362
Conversation
I'm confused by the proto conflict, not sure what's causing that |
just pull back the latest main, rebase, and rerun make to regenerate everything |
@@ -2023,7 +2023,7 @@ type analyzer <ocaml attr="deriving show"> = string wrap <ocaml module="Analyzer | |||
*) | |||
type target <ocaml attr="deriving show"> = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also change the targets type and have there a list of code_target and a list of dependency_source.
But let's go with this approach.
Note that @mjambon added also a new Scanning_roots cases in the targets type where pysemgrep relies on
osemgrep file targeting to compute the targets, but I think we're fine with your change; just in the futur for those
cases where pass the Scanning_roots, it will also be the job of the OCaml code to compute the dependency_source (using @bkettle subproject matcher probably).
In semgrep/semgrep-proprietary#2872, we updated the SCA subproject logic to scan only changed subprojects in diff scans. Subprojects that remained unchanged were intentionally left unresolved with the reason UnresolvedSkipped. Previously, we didn't include this information in our subproject stats, leaving us without visibility into why a subproject was unresolved. This PR introduces two optional fields, unresolved_reason and errors, allowing us to capture more granular stats and better understand subproject resolution failures. - [x] I ran `make setup && make` to update the generated code after editing a `.atd` file (TODO: have a CI check) - [x] I made sure we're still backward compatible with old versions of the CLI. 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!
To make things more concrete about the interface we want with the backend. test plan: make - [x] I ran `make setup && make` to update the generated code after editing a `.atd` file (TODO: have a CI check) - [x] I made sure we're still backward compatible with old versions of the CLI. 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!
Backwards compatibility summary:
|
993f80d
to
6e9ad16
Compare
make setup && make
to update the generated code after editing a.atd
file (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!