Skip to content

Commit af1c1d5

Browse files
committed
feat!: add Makefile rule for formatting
1 parent ff9f091 commit af1c1d5

File tree

120 files changed

+14478
-13235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+14478
-13235
lines changed

.ocamlformat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
profile = default
2+
sequence-style = terminator
3+
field-space = loose

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,19 @@ all: static build
33
DUNE = dune
44
DUNE_ARGS = --profile=release
55

6+
FORMATER = ocamlformat
7+
SRC = src/**/*.ml
8+
69
build-deps:
710
opam install . --deps-only --locked
811

9-
.PHONY: build
10-
build:
12+
.PHONY: build format
13+
build: format
1114
@${DUNE} build ${DUNE_ARGS}
1215

16+
format:
17+
@${FORMATER} -i $(SRC) $(SRC:.ml=.mli)
18+
1319
.PHONY: static
1420
static:
1521
@${MAKE} -C static

learn-ocaml-client.opam

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,17 @@ depends: [
3030
"lwt" {>= "4.0.0"}
3131
"lwt_ssl"
3232
"ocaml" {= "4.05.0"}
33+
"ocamlformat" {= "0.8"}
3334
"ocamlfind" {build}
35+
"ocamlformat" {= "0.8"}
3436
"ocp-indent-nlfork"
3537
"ocp-ocamlres" {>= "0.4"}
3638
"ocplib-json-typed" {= "0.6"}
3739
"ipaddr" {= "2.8.0" }
3840
"cstruct" {>= "3.3.0"}
3941
"ppx_tools"
40-
"ppx_sexp_conv" {= "v0.9.0"}
41-
"ppx_fields_conv" {= "v0.9.0"}
42+
"ppx_sexp_conv" {= "v0.11.1"}
43+
"ppx_fields_conv" {= "v0.11.0"}
4244
]
4345
build: [
4446
["dune" "build" "@install" "-p" name "-j" jobs]

learn-ocaml.opam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ depends: [
4242
"markup-lwt"
4343
"ocaml" {= "4.05.0"}
4444
"ocamlfind" {build}
45+
"ocamlformat" {= "0.8"}
4546
"ocp-indent-nlfork"
4647
"ocp-ocamlres" {>= "0.4"}
4748
"ocplib-json-typed" {= "0.6"}

learn-ocaml.opam.locked

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ homepage: "https://github.com/ocaml-sf/learn-ocaml"
1414
bug-reports: "https://github.com/ocaml-sf/learn-ocaml/issues"
1515
dev-repo: "git+https://github.com/ocaml-sf/learn-ocaml"
1616
depends: [
17-
"asak" {= "0.2"}
18-
"astring" {= "0.8.4"}
19-
"base" {= "v0.9.4"}
17+
"asak" {= "0.3"}
18+
"astring" {= "0.8.5"}
19+
"base" {= "v0.11.1"}
2020
"base-bigarray" {= "base"}
2121
"base-bytes" {= "base"}
2222
"base-num" {= "base"}
@@ -27,92 +27,91 @@ depends: [
2727
"biniou" {= "1.2.1"}
2828
"checkseum" {= "0.1.0"}
2929
"cmdliner" {= "1.0.4"}
30-
"cohttp" {= "1.1.1"}
31-
"cohttp-lwt" {= "1.1.1"}
32-
"cohttp-lwt-unix" {= "1.1.1"}
30+
"cohttp" {= "1.2.0"}
31+
"cohttp-lwt" {= "1.2.0"}
32+
"cohttp-lwt-unix" {= "1.2.0"}
3333
"conduit" {= "1.3.0"}
3434
"conduit-lwt" {= "1.3.0"}
3535
"conduit-lwt-unix" {= "1.3.0"}
36-
"conf-git" {= "1.0"}
37-
"conf-libssl" {= "1"}
36+
"conf-git" {= "1.1"}
37+
"conf-libssl" {= "3"}
3838
"conf-m4" {= "1"}
39-
"conf-pkg-config" {= "1.2"}
39+
"conf-pkg-config" {= "2"}
4040
"conf-which" {= "1"}
41-
"cppo" {= "1.6.6"}
41+
"cppo" {= "1.6.7"}
4242
"cstruct" {= "5.0.0"}
4343
"decompress" {= "0.8.1"}
4444
"digestif" {= "0.8.0-1"}
4545
"dune" {= "2.0.1"}
4646
"easy-format" {= "1.3.2"}
4747
"eqaf" {= "0.7"}
48-
"ezjsonm" {= "1.1.0"}
49-
"fieldslib" {= "v0.9.0"}
50-
"fmt" {= "0.8.8"}
51-
"fpath" {= "0.7.2"}
48+
"ezjsonm" {= "1.2.0"}
49+
"fieldslib" {= "v0.11.0"}
50+
"fmt" {= "0.8.9"}
51+
"fpath" {= "0.7.3"}
52+
"gg" {= "0.9.3"}
5253
"hex" {= "1.4.0"}
5354
"ipaddr" {= "2.8.0"}
5455
"jbuilder" {= "1.0+beta20.2"}
5556
"js_of_ocaml" {= "3.3.0"}
5657
"js_of_ocaml-compiler" {= "3.3.0"}
5758
"js_of_ocaml-lwt" {= "3.3.0"}
59+
"js_of_ocaml-ocamlbuild" {= "3.5.2"}
5860
"js_of_ocaml-ppx" {= "3.3.0"}
5961
"js_of_ocaml-toplevel" {= "3.3.0"}
6062
"js_of_ocaml-tyxml" {= "3.3.0"}
6163
"jsonm" {= "1.0.1"}
62-
"markup-lwt" {= "0.5.0"}
6364
"logs" {= "0.7.0"}
64-
"lwt" {= "4.2.1"}
65-
"lwt_react" {= "1.1.3"}
65+
"lwt" {= "4.2.1-1"}
66+
"lwt_react" {= "1.1.4"}
6667
"lwt_ssl" {= "1.1.3"}
67-
"magic-mime" {= "1.1.2"}
68+
"magic-mime" {= "1.2.0"}
6869
"markup" {= "0.8.2"}
70+
"markup-lwt" {= "0.5.0"}
6971
"mmap" {= "1.1.0"}
7072
"num" {= "0"}
7173
"ocaml" {= "4.05.0"}
72-
"ocaml-compiler-libs" {= "v0.9.0"}
73-
"ocaml-migrate-parsetree" {= "1.7.3"}
74+
"ocaml-compiler-libs" {= "v0.12.3"}
75+
"ocaml-migrate-parsetree" {= "1.8.0"}
7476
"ocaml-secondary-compiler" {= "4.08.1-1"}
7577
"ocamlbuild" {= "0.14.0"}
7678
"ocamlfind" {= "1.8.1"}
7779
"ocamlfind-secondary" {= "1.8.1"}
80+
"ocamlformat" {= "0.8"}
7881
"ocp-indent-nlfork" {= "1.5.4"}
7982
"ocp-ocamlres" {= "0.4"}
8083
"ocplib-json-typed" {= "0.6"}
81-
"odoc" {= "1.5.1"}
84+
"odoc" {= "1.5.3"}
8285
"omd" {= "1.3.1"}
8386
"optint" {= "0.0.2"}
87+
"parsexp" {= "v0.11.0"}
8488
"pprint" {= "20200410"}
85-
"ppx_ast" {= "v0.9.1"}
86-
"ppx_core" {= "v0.9.3"}
8789
"ppx_cstruct" {= "5.0.0"}
8890
"ppx_derivers" {= "1.2.1"}
89-
"ppx_driver" {= "v0.9.2"}
90-
"ppx_fields_conv" {= "v0.9.0"}
91-
"ppx_metaquot" {= "v0.9.0"}
92-
"ppx_optcomp" {= "v0.9.0"}
93-
"ppx_sexp_conv" {= "v0.9.0"}
91+
"ppx_fields_conv" {= "v0.11.0"}
92+
"ppx_sexp_conv" {= "v0.11.1"}
9493
"ppx_tools" {= "5.0+4.05.0"}
9594
"ppx_tools_versioned" {= "5.4.0"}
96-
"ppx_traverse_builtins" {= "v0.9.0"}
97-
"ppx_type_conv" {= "v0.9.1"}
95+
"ppxlib" {= "0.2.2"}
9896
"re" {= "1.9.0"}
9997
"react" {= "1.2.1"}
10098
"reactiveData" {= "0.2.1"}
10199
"result" {= "1.5"}
102100
"rresult" {= "0.6.0"}
103101
"seq" {= "0.2.2"}
104-
"sexplib" {= "v0.9.3"}
102+
"sexplib" {= "v0.11.0"}
103+
"sexplib0" {= "v0.11.0"}
105104
"ssl" {= "0.5.5"}
106-
"stdio" {= "v0.9.1"}
107-
"stdlib-shims" {= "0.1.0"}
105+
"stdio" {= "v0.11.0"}
106+
"stdlib-shims" {= "0.3.0"}
108107
"stringext" {= "1.6.0"}
109-
"topkg" {= "1.0.1"}
110-
"tyxml" {= "4.4.0"}
108+
"topkg" {= "1.0.3"}
109+
"tyxml" {= "4.5.0"}
111110
"uchar" {= "0.0.2"}
112-
"uri" {= "1.9.7"}
111+
"uri" {= "2.2.1"}
113112
"uutf" {= "1.0.2"}
114-
"yojson" {= "1.7.0"}
115113
"vg" {= "0.9.3"}
114+
"yojson" {= "1.7.0"}
116115
]
117116
build: [
118117
[make "static"]

0 commit comments

Comments
 (0)