ocaml / opam

opam is a source-based package manager. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.
https://opam.ocaml.org
Other
1.24k stars 353 forks source link

Lint check for the presence of "<const string> = <const string>" in filters #5948

Open kit-ty-kate opened 4 months ago

kit-ty-kate commented 4 months ago

Someone over on Discord got their opam file generated by dune with a wrong syntax:

depends: [
  "torch" {":" = "0.16.0"}
]

this is a perfectly valid filter syntax but it will never be true and thus always skipped silently (expected).

Maybe it would be worth checking this pattern and issuing a warning when it is encountered.