diff --git a/CHANGES.md b/CHANGES.md index c95714227c5..ff99254d6ad 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -20,7 +20,7 @@ - Enable `(explicit_js_mode)` by default. (#1941, @nojb) -- Add an option to clear the console in-between builds with +- Add an option to clear the console in-between builds with `--terminal-persistence=clear-on-rebuild` - Stop symlinking object files to main directory for stanzas defined `jbuild` @@ -46,6 +46,10 @@ - Define (paths ...) fields in (context ...) definitions in order to set or extend any PATH-like variable in the context environment. (#2426, @nojb) +- The `diff` action will always normalize newlines before diffing. Perviousy, it + would not do this normalization for rules defined in jbuild files. (#2457, + @rgrinberg) + 1.11.0 (23/07/2019) ------------------- diff --git a/src/diff.ml b/src/diff.ml index a929ad12e5b..098205d1ad6 100644 --- a/src/diff.ml +++ b/src/diff.ml @@ -4,15 +4,9 @@ module Mode = struct type t = | Binary | Text - | Text_jbuild - - let of_kind : Dune_lang.File_syntax.t -> t = - function - | Jbuild -> Text_jbuild - | Dune -> Text let compare_files = function - | Text_jbuild | Binary -> Io.compare_files + | Binary -> Io.compare_files | Text -> Io.compare_text_files end @@ -27,10 +21,8 @@ let decode path ~optional = let open Dune_lang.Decoder in let+ file1 = path and+ file2 = path - and+ kind = Stanza.file_kind () in - let mode = Mode.of_kind kind in - { optional ; file1; file2; mode } + { optional ; file1; file2; mode = Text } let decode_binary path = let open Dune_lang.Decoder in diff --git a/src/diff.mli b/src/diff.mli index 57ba4bce523..6d0e4d9ba20 100644 --- a/src/diff.mli +++ b/src/diff.mli @@ -6,7 +6,6 @@ module Mode : sig type t = | Binary (** no diffing, just raw comparison *) | Text (** diffing after newline normalization *) - | Text_jbuild (** diffing but no newline normalization *) end type 'path t =