Skip to content

Commit

Permalink
bugfix: Allow package in any location in rule
Browse files Browse the repository at this point in the history
Signed-off-by: Marek Kubica <marek@tarides.com>
  • Loading branch information
Leonidas-from-XIV committed Mar 29, 2023
1 parent 3930ad5 commit 028f47f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ Unreleased
- Support `(link_flags ...)` in `(cinaps ...)` stanza. (#7423, fixes #7416,
@nojb)

- Allow `(package ...)` in any position within `(rule ...)` stanza (#7445,
@Leonidas-from-XIV)

3.7.0 (2023-02-17)
------------------

Expand Down
1 change: 1 addition & 0 deletions src/dune_rules/dune_file.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1728,6 +1728,7 @@ module Rule = struct
; ("aliases", Field)
; ("alias", Field)
; ("enabled_if", Field)
; ("package", Field)
]

let short_form =
Expand Down
7 changes: 2 additions & 5 deletions test/blackbox-tests/test-cases/package-rule.t/run.t
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
When --only-packages is passed, it runs

$ dune build --only-packages a @runtest
File "dune", line 12, characters 3-10:
12 | (package a)
^^^^^^^
Error: Unknown action or rule field.
[1]
A
A

0 comments on commit 028f47f

Please sign in to comment.