profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/gpetiot/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Guillaume Petiot gpetiot @tarides http://gpetiot.github.io/ @ocaml enthusiast

gpetiot/Frama-C-Mutation 18

Generation of mutant programs

gpetiot/mirage-shell 7

Basic shell built on top of Mirage (experimental! do not use!)

gpetiot/Frama-C-StaDy 5

Static & Dynamic Verification of C programs

gpetiot/Frama-C-Inline 3

Inlining of ACSL predicates and logic functions

gpetiot/alcotest 0

A lightweight and colourful test framework

gpetiot/citty 0

CI in tty

gpetiot/coq 0

Coq is a formal proof management system. It provides a formal language to write mathematical definitions, executable algorithms and theorems together with an environment for semi-interactive development of machine-checked proofs.

gpetiot/curly 0

Command line curl wrapper for OCaml

gpetiot/decompress 0

Pure OCaml implementation of Zlib.

gpetiot/digestif 0

Simple hash algorithms in OCaml

delete branch gpetiot/mirage

delete branch : preview-ocamlformat.0.16.0

delete time in 3 hours

PR closed mirage/mirage

Preview: upgrade to ocamlformat.0.17.0

edit: This is a preview of the not-yet-released ocamlformat.0.17.0, please wait until the package is published in opam to merge this PR.

Hi, this pull-request is a preview of the soon to be released ocamlformat.0.16.0. The main change in the diff is that indicate-multiline-delimiters option has now be switched to no on the conventional profile to improve consistency and minimize the diffs in the future. Let me now if you notice any regressions.

+51 -54

1 comment

17 changed files

gpetiot

pr closed time in 3 hours

PR opened ocaml-ppx/ocamlformat

Reviewers
Fix documentation of option 'use-file', it should not be deprecated no-changelog-needed

--use-file and --impl are not treated the same, contrary to what the documentation says, calling different functions from Parse, and also different formatting functions. Maybe it was the case before we had rewritten the code to use fragment types, but not anymore.

+2 -2

0 comment

2 changed files

pr created time in 5 hours

create barnchgpetiot/ocamlformat

branch : fix-use-file-option

created branch time in 5 hours

push eventgpetiot/ocamlformat

Guillaume Petiot

commit sha bb58cfdcb8c2ca59223bc087b70817bff290b251

changelog

view details

push time in 6 hours

PR opened ocaml-ppx/ocamlformat

Reviewers
Only sugarize RHS of sequences

Fix #1787, no diff with test_branch.sh

To not break the AST we should only sugarize the RHS of sequences, LHS should be parenthesized if it's also a sequence.

+22 -29

0 comment

5 changed files

pr created time in 6 hours

create barnchgpetiot/ocamlformat

branch : only-normalize-sequence-rhs

created branch time in 6 hours

PR opened ocaml-ppx/ocamlformat

Reviewers
Only hook ocamlformat mode on tuareg/caml modes when ocamlformat is not disabled

Trying to fix #1792, this should be improved to also take into account the value of --root. For now it just looks up the .ocamlformat file in the current directory, but it allows some basic testing to at least confirm if this is going in the right direction. (This will be so much better once all this plumbing will be taken care of by dune)

cc @bobot let us know if it improves the situation

+17 -4

0 comment

1 changed file

pr created time in 8 hours

create barnchgpetiot/ocamlformat

branch : fix-emacs-hooks

created branch time in 8 hours

issue commentocaml-ppx/ocamlformat

Bug: In emacs, indentation in project where ocamlformat is not activated

From what I understand I think it's due to https://github.com/ocaml-ppx/ocamlformat/blob/main/emacs/ocamlformat.el#L414-L417 we should check for the presence of an .ocamlformat file when --enable-outside-detected-project is not set. This way the tuareg-mode would not even launch ocamlformat but just ocp-indent.

bobot

comment created time in 9 hours

push eventgpetiot/ocamlformat

Guillaume Petiot

commit sha b7fd427ae95b43b72091a0a81d4cfb1eecd0925b

Update documentation of deprecated option 'disable-outside-detected-project' (#1813)

view details

push time in 9 hours

delete branch gpetiot/ocamlformat

delete branch : update-doc-disable-outside-detected-project

delete time in 9 hours

push eventocaml-ppx/ocamlformat

Guillaume Petiot

commit sha b7fd427ae95b43b72091a0a81d4cfb1eecd0925b

Update documentation of deprecated option 'disable-outside-detected-project' (#1813)

view details

push time in 9 hours

PR merged ocaml-ppx/ocamlformat

Update documentation of deprecated option 'disable-outside-detected-project' CLA Signed no-changelog-needed

This option has been deprecated since 0.10.0, moving it with the other deprecated options.

+7 -5

0 comment

2 changed files

gpetiot

pr closed time in 9 hours

PR opened ocaml-ppx/ocamlformat

Update documentation of deprecated option 'disable-outside-detected-project' no-changelog-needed

This option has been deprecated since 0.10.0, moving it with the other deprecated options.

+7 -5

0 comment

2 changed files

pr created time in 9 hours

push eventgpetiot/ocamlformat

Guillaume Petiot

commit sha 373fef36ef681af4bdbe74b40fd8f7175668570a

Deprecate 'compact' and 'sparse' profiles (#1803)

view details

push time in 10 hours

delete branch gpetiot/ocamlformat

delete branch : deprecate-compact-and-sparse-profiles

delete time in 10 hours

push eventocaml-ppx/ocamlformat

Guillaume Petiot

commit sha 373fef36ef681af4bdbe74b40fd8f7175668570a

Deprecate 'compact' and 'sparse' profiles (#1803)

view details

push time in 10 hours

push eventgpetiot/ocamlformat

Guillaume Petiot

commit sha 45863a389d90a031e16ba62eccf810ecb5a1ebc9

Expose more Pprintast functions (ocaml#10618) (#1806)

view details

Guillaume Petiot

commit sha 7e6aac8fec8c0b8006501b9a4a559e96ca5af6bb

Add parentheses around type alias used as type constraint (#1801)

view details

Guillaume Petiot

commit sha 22a3707da387f9ab82b42a87c358133b829f2222

Deprecate option 'disambiguate-non-breaking-match' (#1805)

view details

Guillaume Petiot

commit sha 8885959b9a4f30674a5b7bc05ef34bb3d9891633

Fix alignment of comments inside a tuple pattern and remove incorrect linebreak, and fix formatting of labelled arguments containing comments (#1797)

view details

Guillaume Petiot

commit sha b1aafa82af997417eed989d4fdb09b615ee0c5fe

Remove unused function 'Source.has_cmt_same_line_after' (#1809)

view details

Guillaume Petiot

commit sha 653c388eb6eae2d6174a01146d7cf17dfc551186

Improve documentation of deprecated options and removed options (#1807)

view details

Guillaume Petiot

commit sha 0d5d2b910354e1932092af3e3a741887e8524a71

Allow configuration options to have deprecated values (#1812)

view details

Guillaume Petiot

commit sha 67747c4bb995b9014caf79e67a269cbfe3cbcd9b

Deprecate 'compact' and 'sparse' profiles

view details

Guillaume Petiot

commit sha cb62ef605c912d9c24a0d51eee89aaeec4983c99

changelog

view details

push time in 12 hours

push eventgpetiot/ocamlformat

Guillaume Petiot

commit sha 0d5d2b910354e1932092af3e3a741887e8524a71

Allow configuration options to have deprecated values (#1812)

view details

push time in 13 hours

delete branch gpetiot/ocamlformat

delete branch : improve-config-option-values

delete time in 13 hours

push eventocaml-ppx/ocamlformat

Guillaume Petiot

commit sha 0d5d2b910354e1932092af3e3a741887e8524a71

Allow configuration options to have deprecated values (#1812)

view details

push time in 13 hours

PR merged ocaml-ppx/ocamlformat

Reviewers
Allow configuration options to have deprecated values CLA Signed no-changelog-needed

Here is what is produced when deprecating the value of some option:

diff --git a/ocamlformat-help.txt b/ocamlformat-help.actual
index 29694e95..abcc9a03 100644
--- a/ocamlformat-help.txt
+++ b/ocamlformat-help.actual
@@ -105,8 +105,9 @@ OPTIONS (CODE FORMATTING STYLE)
        --break-separators={after|before}
            Break before or after separators such as `;` in list or record
            expressions. after breaks the expressions after the separator.
-           before breaks the expressions before the separator. The default
-           value is after.
+           before breaks the expressions before the separator. Warning: Value
+           `before` is deprecated since version 0.20.0. Deprecation message.
+           The default value is after.

diff --git a/test/passing/tests/break_separators-before_docked_wrap.ml.err b/test/passing/break_separators-before_docked_wrap.ml.stderr
index 8cec0959..f2a39eff 100644
--- a/test/passing/tests/break_separators-before_docked_wrap.ml.err
+++ b/test/passing/break_separators-before_docked_wrap.ml.stderr
@@ -1 +1,2 @@
+Warning: Value `before` of option `after` is deprecated since version 0.20.0. Deprecation message.
 Warning: tests/break_separators.ml:212 exceeds the margin

A warning is printed in the ocamlformat documentation, and when using a deprecated value explicitly.

+315 -336

0 comment

3 changed files

gpetiot

pr closed time in 13 hours

Pull request review commentocaml-ppx/ocamlformat

Allow configuration options to have deprecated values

 module Make (C : CONFIG) = struct     store := Pack opt :: !store ;     opt -  type removed_value = {name: string; version: string; msg: string}--  let removed_value ~name ~version ~msg = {name; version; msg}--  let removed_values ~names ~version ~msg =-    List.map names ~f:(fun name -> removed_value ~name ~version ~msg)--  let add_removed_values values conv =-    let parse s =-      match List.find values ~f:(fun {name; _} -> String.equal name s) with-      | Some {name; version; msg} ->-          Format.kasprintf-            (fun s -> Error (`Msg s))-            "value `%s` has been removed in version %s. %s" name version msg-      | None -> Arg.conv_parser conv s-    in-    Arg.conv (parse, Arg.conv_printer conv)+  module Value = struct+    module Ok = struct+      type 'a t = string * 'a * string * [`Valid | `Deprecated of deprecated]++      let valid ~name ~doc value = (name, value, doc, `Valid)++      let deprecated ~name ~doc ~deprecated value =+        (name, value, doc, `Deprecated deprecated)++      let pp_deprecated s ppf {dmsg= msg; dversion= v} =+        Format.fprintf ppf "Value `%s` is deprecated since version %s. %s" s+          v msg++      let pp_deprecated_with_name ~opt ~val_ ppf {dmsg= msg; dversion= v} =+        Format.fprintf ppf+          "Value `%s` of option `%s` is deprecated since version %s. %s" val_+          opt v msg++      let status_doc s ppf = function+        | `Valid -> ()+        | `Deprecated x ->+            Format.fprintf ppf " Warning: %a" (pp_deprecated s) x++      let warn_if_deprecated conf opt (s, _, _, status) =+        match status with+        | `Valid -> ()+        | `Deprecated d ->+            C.warn conf "%a" (pp_deprecated_with_name ~opt ~val_:s) d+    end++    module Removed = struct+      type t = {name: string; version: string; msg: string}++      let mk ~name ~version ~msg = {name; version; msg}++      let mk_list ~names ~version ~msg =+        List.map names ~f:(fun name -> mk ~name ~version ~msg)++      let add_parse_errors values conv =+        let parse s =+          match+            List.find values ~f:(fun {name; _} -> String.equal name s)+          with+          | Some {name; version; msg} ->+              Format.kasprintf+                (fun s -> Error (`Msg s))+                "value `%s` has been removed in version %s. %s" name version

done:

Warning: option `break-string-literals`: value `never` is deprecated since version V. Deprecation message.
gpetiot

comment created time in 13 hours

PullRequestReviewEvent

push eventgpetiot/ocamlformat

Guillaume Petiot

commit sha 9169357621ca7e3f1a0ffbba63ad7570a0d88b74

improve warning message

view details

push time in 13 hours

Pull request review commentocaml-ppx/ocamlformat

Allow configuration options to have deprecated values

 module Make (C : CONFIG) = struct     store := Pack opt :: !store ;     opt -  type removed_value = {name: string; version: string; msg: string}--  let removed_value ~name ~version ~msg = {name; version; msg}--  let removed_values ~names ~version ~msg =-    List.map names ~f:(fun name -> removed_value ~name ~version ~msg)--  let add_removed_values values conv =-    let parse s =-      match List.find values ~f:(fun {name; _} -> String.equal name s) with-      | Some {name; version; msg} ->-          Format.kasprintf-            (fun s -> Error (`Msg s))-            "value `%s` has been removed in version %s. %s" name version msg-      | None -> Arg.conv_parser conv s-    in-    Arg.conv (parse, Arg.conv_printer conv)+  module Value = struct+    module Ok = struct

done

gpetiot

comment created time in 3 days

PullRequestReviewEvent