Skip to content

Commit 00eec91

Browse files
authored
chore(lockfileless): Made manifest kind hashable (#303)
Manifest kind needs to be hashable to be used in a `set()`. This PR adds the `@dataclass(frozen=true)` decorator to it. - [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
1 parent 7b034f6 commit 00eec91

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

semgrep_output_v1.atd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1817,7 +1817,7 @@ type output_format = [
18171817
]
18181818

18191819
(* TODO: merge with Manifest_kind.ml *)
1820-
type manifest_kind = [
1820+
type manifest_kind <python decorator="dataclass(frozen=True)"> = [
18211821
| RequirementsIn (* Manifest file for pip *)
18221822
| PackageJson
18231823
| Gemfile

semgrep_output_v1.py

+15-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)