Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add failing test + fix for enabled_if with <= operator #6928

Merged
merged 2 commits into from
Jan 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Unreleased
----------

- Fix parsing of the `<=` operator in *blang* expressions of `dune` files.
Previously, the operator would be interpreted as `,`. (#6928, @tatchi)

- Fix `--trace-file` output. Dune now emits a single *complete* event for every
executed process. Unterminated *async* events are no longer written. (#6892,
@rgrinberg)
Expand Down
2 changes: 1 addition & 1 deletion src/dune_rules/blang.ml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ let rec to_dyn =
[ Op.to_dyn o; String_with_vars.to_dyn s1; String_with_vars.to_dyn s2 ]

let ops =
[ ("=", Op.Eq); (">=", Gte); ("<=", Lt); (">", Gt); ("<", Lt); ("<>", Neq) ]
[ ("=", Op.Eq); (">=", Gte); ("<=", Lte); (">", Gt); ("<", Lt); ("<>", Neq) ]

let decode_gen decode_string =
let open Dune_lang.Decoder in
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
(library
(name lte414caml)
(modules lte414caml)
(enabled_if
(<= %{ocaml_version} %{ocaml_version})))

(rule
(with-stdout-to
lte414caml.ml
(echo "")))

(rule
(with-stdout-to
main.ml
(echo "")))

(executable
(name main)
(modules main)
(libraries lte414caml))
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(lang dune 3.0)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$ dune build