opam icon indicating copy to clipboard operation
opam copied to clipboard

write_with_preserved_format doesn't preserve the order of filters

Open kit-ty-kate opened this issue 5 months ago • 0 comments

Using opam admin add-constraint on an opam file containing the following:

depends: [
  ("ocaml" {< "4.04.1" & with-test} | "sexplib0" {with-test})
]

the resulting diff will show a unique difference (nothing else was changed):

-  ("ocaml" {< "4.04.1" & with-test} | "sexplib0" {with-test})
+  ("ocaml" {with-test & < "4.04.1"} | "sexplib0" {with-test})

This shouldn't happen and the command should preserve the order of the filters.

kit-ty-kate avatar Sep 11 '24 14:09 kit-ty-kate