Skip to content

Commit

Permalink
test: --ignore-promoted-rules and internal rules
Browse files Browse the repository at this point in the history
reproduce #8417

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>

<!-- ps-id: dc52a340-79a9-4d37-a486-0c0d168111d5 -->
  • Loading branch information
rgrinberg committed Aug 26, 2023
1 parent 863cc0c commit a54b386
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
This test demonstrates the interaction between --ignore-promoted-rules and
internal promote rules (like generating opam files)

Reported in #8417

$ cat >dune-project <<EOF
> (lang 3.10)
> (generate_opam_files true)
> (package
> (name foo))
> EOF

$ dune build foo.opam
File "dune-project", line 1, characters 0-11:
1 | (lang 3.10)
^^^^^^^^^^^
Error: Invalid first line, expected: (lang <lang> <version>)
[1]
$ echo "extra" >> foo.opam
$ cat foo.opam
extra

This should not modify the file now

$ dune build --ignore-promoted-rules foo.opam
File "dune-project", line 1, characters 0-11:
1 | (lang 3.10)
^^^^^^^^^^^
Error: Invalid first line, expected: (lang <lang> <version>)
[1]
$ cat foo.opam
extra

0 comments on commit a54b386

Please sign in to comment.