diff --git a/CHANGES.md b/CHANGES.md index f0915461066..16c36c5bb00 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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, diff --git a/src/dune/dune_file.ml b/src/dune/dune_file.ml index 358cb7fd032..a4871773e09 100644 --- a/src/dune/dune_file.ml +++ b/src/dune/dune_file.ml @@ -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 } diff --git a/test/blackbox-tests/test-cases/github2681/run.t b/test/blackbox-tests/test-cases/github2681/run.t index d1f5e0885a6..931badc4ef8 100644 --- a/test/blackbox-tests/test-cases/github2681/run.t +++ b/test/blackbox-tests/test-cases/github2681/run.t @@ -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 < (lang dune 2.1) + > (lang dune 2.0) > EOF $ cat > dune < (rule @@ -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 < (lang dune 2.1) + > (lang dune 2.0) > EOF $ cat > dune < (rule