Skip to content

Commit

Permalink
Move the alias field of a rule to 2.0.0, fix the tests
Browse files Browse the repository at this point in the history
Signed-off-by: Arseniy Alekseyev <aalekseyev@janestreet.com>
  • Loading branch information
aalekseyev committed Oct 30, 2019
1 parent 0033f6a commit 84b7fde
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
7 changes: 2 additions & 5 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
2.1.0 (unreleased)
----------------
2.0.0 (unreleased)
------------------

- Introduce `alias` and `package` fields to the `rule` stanza. This is the
preferred way of attaching rules to aliases. (#2744, @rgrinberg)

2.0.0 (unreleased)
------------------

- Add field `(optional)` for executable stanzas (#2463, fixes #2433, @bobot)

- Infer targets for rule stanzas expressed in long form (#2494, fixes #2469,
Expand Down
4 changes: 2 additions & 2 deletions src/dune/dune_file.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1795,10 +1795,10 @@ module Rule = struct
and+ enabled_if = enabled_if ~since:(Some (1, 4))
and+ package =
field_o "package"
(Dune_lang.Syntax.since Stanza.syntax (2, 1) >>> Pkg.decode)
(Dune_lang.Syntax.since Stanza.syntax (2, 0) >>> Pkg.decode)
and+ alias =
field_o "alias"
(Dune_lang.Syntax.since Stanza.syntax (2, 1) >>> Alias.Name.decode)
(Dune_lang.Syntax.since Stanza.syntax (2, 0) >>> Alias.Name.decode)
in
{ targets; deps; action; mode; locks; loc; enabled_if; alias; package }

Expand Down
4 changes: 2 additions & 2 deletions test/blackbox-tests/test-cases/github2681/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ A rule may have an alias field. This denotes that the action of the rule is a
dependency of the alias.
$ mkdir simple && cd simple
$ cat > dune-project <<EOF
> (lang dune 2.1)
> (lang dune 2.0)
> EOF
$ cat > dune <<EOF
> (rule
Expand All @@ -17,7 +17,7 @@ dependency of the alias.
A rule may now have an empty set of targets if it has an alias field
$ mkdir no-targets && cd no-targets
$ cat > dune-project <<EOF
> (lang dune 2.1)
> (lang dune 2.0)
> EOF
$ cat > dune <<EOF
> (rule
Expand Down

0 comments on commit 84b7fde

Please sign in to comment.