Skip to content

Commit 48eb841

Browse files
authored
Rename type xlang -> analyzer (#331)
This is part of renaming the OCaml module `Xlang` to `Analyzer`. This type name change doesn't change the data format because type names don't occur in JSON data. - [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!
1 parent 632b1de commit 48eb841

7 files changed

+96
-95
lines changed

semgrep_output_v1.atd

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1867,7 +1867,8 @@ type core_error <python decorator="dataclass(frozen=True)"> = {
18671867
those different files (because ATD does not have a proper module system yet).
18681868
*)
18691869

1870-
type xlang <ocaml attr="deriving show"> = string wrap <ocaml module="Xlang">
1870+
type analyzer <ocaml attr="deriving show"> =
1871+
string wrap <ocaml module="Analyzer">
18711872

18721873
(* A target can either be a traditional code target (now with optional
18731874
associated lockfile) or it can be a lockfile target, which will be used to
@@ -1889,10 +1890,10 @@ type target <ocaml attr="deriving show"> = [
18891890
*)
18901891
type code_target <ocaml attr="deriving show"> = {
18911892
path: fpath (* source file *);
1892-
(* Must be a valid target analyzer as defined in Xlang.mli.
1893+
(* Must be a valid target analyzer as defined in Analyzer.mli.
18931894
examples: "ocaml", "python", but also "spacegrep" or "regexp".
18941895
*)
1895-
analyzer: xlang;
1896+
analyzer: analyzer;
18961897
products: product list;
18971898
?lockfile_target: lockfile option;
18981899
}

semgrep_output_v1.jsonschema

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

semgrep_output_v1.proto

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

semgrep_output_v1.py

Lines changed: 23 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

semgrep_output_v1.ts

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

semgrep_output_v1_j.ml

Lines changed: 37 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

semgrep_output_v1_j.mli

Lines changed: 23 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)