Conversation
When `doc-comments-val` was added, the scope of `doc-comments` was reduced and didn't overlap with the new option. This is confusing because the name of the option suggest that `doc-comments-val` overlap with `doc-comments` but not by default. This also added unecessary maintainance to users of `doc-comments`, they had to understand and add a new option to their config. This new value is set by default. This may impact users who kept 0.14.0 defaults when upgrading to 0.14.1 (eg. setting `doc-comments=before` and not setting `doc-comments-val`).
| ; disambiguate_non_breaking_match= false | ||
| ; doc_comments= `Before | ||
| ; doc_comments_val= `Before | ||
| ; doc_comments_val= `Unset |
There was a problem hiding this comment.
This is the janestreet profile, I don't expect this to cause regressions.
There was a problem hiding this comment.
I didn't see regressions with the doc-comments on core_kernel, so it looks safe to me
|
It looks good to me (didn't made any tests yet, we need to check the diff compared to what we had on 0.13.0 this time).
|
|
I think it is already good enough. Options that overlap that way are intuitive and the name "unset" shows it clearly. A more complicated name would get in the way I think. |
|
No diff on irmin. diff --git a/src/dune/colors.ml b/src/dune/.formatted/colors.ml
index 061f54d2..59714de3 100644
--- a/src/dune/colors.ml
+++ b/src/dune/.formatted/colors.ml
@@ -47,8 +47,8 @@ let setup_err_formatter_colors () =
List.iter [ err_formatter; Dune_util.Report_error.ppf ] ~f:(fun ppf ->
let funcs = (pp_get_formatter_tag_functions ppf () [@warning "-3"]) in
pp_set_mark_tags ppf true;
- (pp_set_formatter_tag_functions ppf
- { funcs with
- mark_close_tag = (fun _ -> Ansi_color.Style.escape_sequence [])
- ; mark_open_tag
- } [@warning "-3"]))
+ pp_set_formatter_tag_functions ppf
+ { funcs with
+ mark_close_tag = (fun _ -> Ansi_color.Style.escape_sequence [])
+ ; mark_open_tag
+ } [@warning "-3"])
Done: 4312/4779 (jobs: 4)File "src/dune_lang/t.ml", line 1, characters 0-0:
git (internal) (exit 1)
(cd _build/default && /usr/bin/git diff --no-index --color=always -u src/dune_lang/t.ml src/dune_lang/.formatted/t.ml)
diff --git a/src/dune_lang/t.ml b/src/dune_lang/.formatted/t.ml
index b5abde53..f19cdcd4 100644
--- a/src/dune_lang/t.ml
+++ b/src/dune_lang/.formatted/t.ml
@@ -80,29 +80,29 @@ module Deprecated = struct
let tfuncs =
(Format.pp_get_formatter_tag_functions ppf () [@warning "-3"])
in
- (Format.pp_set_formatter_tag_functions ppf
- { tfuncs with
- mark_open_tag =
- (function
- | "atom" ->
- state := In_atom :: !state;
- ""
- | "makefile-action" ->
- state := In_makefile_action :: !state;
- ""
- | "makefile-stuff" ->
- state := In_makefile_stuff :: !state;
- ""
- | s -> tfuncs.mark_open_tag s)
- ; mark_close_tag =
- (function
- | "atom"
- | "makefile-action"
- | "makefile-stuff" ->
- state := List.tl !state;
- ""
- | s -> tfuncs.mark_close_tag s)
- } [@warning "-3"]);
+ Format.pp_set_formatter_tag_functions ppf
+ { tfuncs with
+ mark_open_tag =
+ (function
+ | "atom" ->
+ state := In_atom :: !state;
+ ""
+ | "makefile-action" ->
+ state := In_makefile_action :: !state;
+ ""
+ | "makefile-stuff" ->
+ state := In_makefile_stuff :: !state;
+ ""
+ | s -> tfuncs.mark_open_tag s)
+ ; mark_close_tag =
+ (function
+ | "atom"
+ | "makefile-action"
+ | "makefile-stuff" ->
+ state := List.tl !state;
+ ""
+ | s -> tfuncs.mark_close_tag s)
+ } [@warning "-3"]; |
gpetiot
left a comment
There was a problem hiding this comment.
I tested irmin, dune and core_kernel. No issues on the doc-comments.
When
doc-comments-valwas added, the scope ofdoc-commentswas reduced anddidn't overlap with the new option.
This is confusing because the name of the option suggest that
doc-comments-valoverlap with
doc-commentsbut not by default.This also added unecessary maintainance to users of
doc-comments, they had tounderstand and add a new option to their config.
This new value is set by default. This may impact users who kept 0.14.0
defaults when upgrading to 0.14.1 (eg. setting
doc-comments=beforeandnot setting
doc-comments-val).Closes #1338