From 19cecc6131b6a0362d0c1e8f5f45a5a00540eb54 Mon Sep 17 00:00:00 2001 From: Yoann Padioleau Date: Tue, 3 Dec 2024 08:44:55 +0100 Subject: [PATCH] Remove some useless deriving yojson (#319) - [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.17.0. See https://atd.readthedocs.io/en/latest/atdgen-tutorial.html#smooth-protocol-upgrades --- semgrep_output_v1.atd | 2 +- semgrep_output_v1_j.ml | 3 +-- semgrep_output_v1_j.mli | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/semgrep_output_v1.atd b/semgrep_output_v1.atd index 26365ab..308ec4c 100644 --- a/semgrep_output_v1.atd +++ b/semgrep_output_v1.atd @@ -1932,7 +1932,7 @@ type lockfile_kind ] type manifest_kind - + = [ | RequirementsIn (* A Pip Requirements.in in file, which follows the format of requirements.txt - https://pip.pypa.io/en/stable/reference/requirements-file-format/ *) diff --git a/semgrep_output_v1_j.ml b/semgrep_output_v1_j.ml index 149b8aa..b4f6ace 100644 --- a/semgrep_output_v1_j.ml +++ b/semgrep_output_v1_j.ml @@ -229,8 +229,7 @@ type tag = Semgrep_output_v1_t.tag type resolution_method = Semgrep_output_v1_t.resolution_method [@@deriving show] -type manifest_kind = Semgrep_output_v1_t.manifest_kind - [@@deriving show, eq, yojson] +type manifest_kind = Semgrep_output_v1_t.manifest_kind [@@deriving show, eq] type lockfile_kind = Semgrep_output_v1_t.lockfile_kind = PipRequirementsTxt | PoetryLock | PipfileLock | UvLock diff --git a/semgrep_output_v1_j.mli b/semgrep_output_v1_j.mli index 7effeeb..a3eea3c 100644 --- a/semgrep_output_v1_j.mli +++ b/semgrep_output_v1_j.mli @@ -229,8 +229,7 @@ type tag = Semgrep_output_v1_t.tag type resolution_method = Semgrep_output_v1_t.resolution_method [@@deriving show] -type manifest_kind = Semgrep_output_v1_t.manifest_kind - [@@deriving show, eq, yojson] +type manifest_kind = Semgrep_output_v1_t.manifest_kind [@@deriving show, eq] type lockfile_kind = Semgrep_output_v1_t.lockfile_kind = PipRequirementsTxt | PoetryLock | PipfileLock | UvLock