Skip to content

Commit 61aee33

Browse files
authored
Merge pull request #220 from lefessan/z-2023-09-29-remove-ez-config
Remove dependency towards unused ez_config
2 parents 87f34da + 3f610d9 commit 61aee33

File tree

16 files changed

+62
-52
lines changed

16 files changed

+62
-52
lines changed

.drom

+12-12
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ version:0.9.0
55

66
# hash of toml configuration files
77
# used for generation of all files
8-
27968ad2d0e5e4bf2de6882737668c66:.
8+
cfa41e62814087cf2f340eab496a6542:.
99
# end context for .
1010

1111
# begin context for .github/workflows/workflow.yml
1212
# file .github/workflows/workflow.yml
13-
17379dd384713dc356e0f1f47b7de18b:.github/workflows/workflow.yml
13+
533318fb1c01b0861406a644a7d9f39c:.github/workflows/workflow.yml
1414
# end context for .github/workflows/workflow.yml
1515

1616
# begin context for .gitignore
@@ -40,12 +40,12 @@ version:0.9.0
4040

4141
# begin context for LICENSE.md
4242
# file LICENSE.md
43-
e31b19b601ab25353ef16d67127735f1:LICENSE.md
43+
8fc45323c2500fb66e52deb392dda4f2:LICENSE.md
4444
# end context for LICENSE.md
4545

4646
# begin context for Makefile
4747
# file Makefile
48-
20473ad87e42d8860a8bdd33a79842ad:Makefile
48+
9018881cf0682f4f7f262417b0d4f9ff:Makefile
4949
# end context for Makefile
5050

5151
# begin context for README.md
@@ -100,22 +100,22 @@ e850a13c004f963e9f5a568eac93c217:dune
100100

101101
# begin context for dune-project
102102
# file dune-project
103-
f8f5311a3752d34fcd492d98660840ad:dune-project
103+
47416b4e7b7e7febc8da32932cae0d54:dune-project
104104
# end context for dune-project
105105

106106
# begin context for opam/drom.opam
107107
# file opam/drom.opam
108-
2de609a6a5c806247b3bdd82f913a109:opam/drom.opam
108+
d3c8882f1742f865c2987dea6c7c83e2:opam/drom.opam
109109
# end context for opam/drom.opam
110110

111111
# begin context for opam/drom_lib.opam
112112
# file opam/drom_lib.opam
113-
38acddee945b9967310158787939ea09:opam/drom_lib.opam
113+
8b323689fcc28f9783fa85ca4a4fac55:opam/drom_lib.opam
114114
# end context for opam/drom_lib.opam
115115

116116
# begin context for opam/drom_toml.opam
117117
# file opam/drom_toml.opam
118-
0414e4eed49fb8e24683f51dfd27d7d3:opam/drom_toml.opam
118+
81116a1889e6414dee5c2e921961aa77:opam/drom_toml.opam
119119
# end context for opam/drom_toml.opam
120120

121121
# begin context for scripts/after.sh
@@ -165,7 +165,7 @@ a44c87f3a364dd95f55427fe40b2c5d1:sphinx/about.rst
165165

166166
# begin context for sphinx/license.rst
167167
# file sphinx/license.rst
168-
7f09d28eb87ab9f2650899f85835e74a:sphinx/license.rst
168+
8f504f01aea592543c0a662b81169d91:sphinx/license.rst
169169
# end context for sphinx/license.rst
170170

171171
# begin context for src/drom/dune
@@ -195,7 +195,7 @@ efad88968955023a354f16469eb1ae15:src/drom/dune
195195

196196
# begin context for src/drom_lib/dune
197197
# file src/drom_lib/dune
198-
e7ddb8c3da7d7b47c8100964303ba50a:src/drom_lib/dune
198+
a97be0d7328e7c15eb149c454844646a:src/drom_lib/dune
199199
# end context for src/drom_lib/dune
200200

201201
# begin context for src/drom_lib/index.mld
@@ -210,7 +210,7 @@ e7ddb8c3da7d7b47c8100964303ba50a:src/drom_lib/dune
210210

211211
# begin context for src/drom_lib/version.mlt
212212
# file src/drom_lib/version.mlt
213-
9749ccfb897b43e7f10913c8ee636af5:src/drom_lib/version.mlt
213+
fc09abbaf032f775d148928fa1398cf9:src/drom_lib/version.mlt
214214
# end context for src/drom_lib/version.mlt
215215

216216
# begin context for src/toml.7.1.0/dune
@@ -235,7 +235,7 @@ d1b05207fce876a1b44a8b268bcaf226:src/toml.7.1.0/index.mld
235235

236236
# begin context for src/toml.7.1.0/version.mlt
237237
# file src/toml.7.1.0/version.mlt
238-
9749ccfb897b43e7f10913c8ee636af5:src/toml.7.1.0/version.mlt
238+
fc09abbaf032f775d148928fa1398cf9:src/toml.7.1.0/version.mlt
239239
# end context for src/toml.7.1.0/version.mlt
240240

241241
# begin context for test/expect-tests/dune

.github/workflows/workflow.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- macos-latest
2020
- windows-latest
2121
ocaml-compiler:
22-
- 4.10.0
22+
- 4.14.1
2323
skip_test:
2424
- false
2525

@@ -93,10 +93,10 @@ jobs:
9393
- name: test source is well formatted
9494
run: make fmt
9595
continue-on-error: true
96-
if: matrix.ocaml-compiler == '4.10.0' && matrix.os == 'ubuntu-latest'
96+
if: matrix.ocaml-compiler == '4.14.1' && matrix.os == 'ubuntu-latest'
9797

9898
- name: build-doc
99-
if: github.ref == 'refs/heads/master' && matrix.ocaml-compiler == '4.10.0' && matrix.os == 'ubuntu-latest'
99+
if: github.ref == 'refs/heads/master' && matrix.ocaml-compiler == '4.14.1' && matrix.os == 'ubuntu-latest'
100100
run: |
101101
sudo apt install -yqq python3-sphinx python3-sphinx-rtd-theme
102102
opam install -y dune odoc
@@ -107,7 +107,7 @@ jobs:
107107
108108
- name: deploy-doc
109109
uses: JamesIves/[email protected]
110-
if: github.ref == 'refs/heads/master' && matrix.ocaml-compiler == '4.10.0' && matrix.os == 'ubuntu-latest'
110+
if: github.ref == 'refs/heads/master' && matrix.ocaml-compiler == '4.14.1' && matrix.os == 'ubuntu-latest'
111111
with:
112112
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
113113
BRANCH: gh-pages

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2023 OCamlPro SAS
1+
Copyright (c) 2024 OCamlPro SAS
22

33
This software is distributed under the terms of the
44
GNU Lesser General Public License (LGPL) version 2.1 (included below).

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ build:
2525

2626
build-deps:
2727
if ! [ -e _opam ]; then \
28-
opam switch create . 4.10.0 ; \
28+
opam switch create . 4.14.1 ; \
2929
fi
3030
opam install ./*.opam --deps-only
3131

drom.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ share-version = "0.9.0"
88
authors = ["Fabrice Le Fessant <[email protected]>", "Léo Andrès <[email protected]>"]
99
ci-systems = ["ubuntu-latest", "macos-latest", "windows-latest"]
1010
copyright = "OCamlPro SAS"
11-
edition = "4.10.0"
11+
edition = "4.14.1"
1212
github-organization = "ocamlpro"
1313
license = "LGPL2"
1414
min-edition = "4.07.0"
1515
name = "drom"
1616
skeleton = "program"
1717
synopsis = "The drom tool is a wrapper over opam/dune in an attempt to provide a cargo-like user experience"
18-
version = "0.9.2~dev4"
18+
version = "0.9.2"
1919

2020
# keys that you could also define:
2121
# odoc-target = "...odoc-target..."

dune-project

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
(name drom)
66
(allow_approximate_merlin)
77
(generate_opam_files false)
8-
(version 0.9.2~dev3)
8+
(version 0.9.2)
99
(formatting (enabled_for ocaml reason))
1010
(using menhir 2.0)
1111

@@ -33,7 +33,6 @@
3333
(ez_subst ( >= 0.1 ))
3434
(ez_opam_file (and (>= 0.1.0) (< 1.0.0)))
3535
(ez_file (and (>= 0.3.0) (< 1.0.0)))
36-
(ez_config (and (>= 0.1.0) (< 1.0.0)))
3736
(ez_cmdliner (and (>= 0.2.0) (< 1.0.0)))
3837
(drom_toml (= version))
3938
(directories ( >= 0.2 ))

opam/drom.opam

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Do not modify, or add to the `skip` field of `drom.toml`.
33
opam-version: "2.0"
44
name: "drom"
5-
version: "0.9.2~dev3"
5+
version: "0.9.2"
66
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
77
synopsis:
88
"The drom tool is a wrapper over opam/dune in an attempt to provide a cargo-like user experience"

opam/drom_lib.opam

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Do not modify, or add to the `skip` field of `drom.toml`.
33
opam-version: "2.0"
44
name: "drom_lib"
5-
version: "0.9.2~dev3"
5+
version: "0.9.2"
66
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
77
synopsis:
88
"The drom tool is a wrapper over opam/dune in an attempt to provide a cargo-like user experience"
@@ -51,7 +51,6 @@ depends: [
5151
"ez_subst" {>= "0.1"}
5252
"ez_opam_file" {>= "0.1.0" & < "1.0.0"}
5353
"ez_file" {>= "0.3.0" & < "1.0.0"}
54-
"ez_config" {>= "0.1.0" & < "1.0.0"}
5554
"ez_cmdliner" {>= "0.2.0" & < "1.0.0"}
5655
"drom_toml" {= version}
5756
"directories" {>= "0.2"}

opam/drom_toml.opam

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Do not modify, or add to the `skip` field of `drom.toml`.
33
opam-version: "2.0"
44
name: "drom_toml"
5-
version: "0.9.2~dev3"
5+
version: "0.9.2"
66
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
77
synopsis:
88
"The drom tool is a wrapper over opam/dune in an attempt to provide a cargo-like user experience"

sphinx/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,4 +220,4 @@
220220

221221
# entry point for setup
222222
def setup(app):
223-
app.add_css_file('css/fixes.css')
223+
app.add_stylesheet('css/fixes.css')

sphinx/license.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Copyright and License
22
=====================
33

4-
Copyright (c) 2023 OCamlPro SAS
4+
Copyright (c) 2024 OCamlPro SAS
55

66
This software is distributed under the terms of the
77
GNU Lesser General Public License (LGPL) version 2.1 (included below).

src/drom_lib/dune

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
(name drom_lib)
55
(public_name drom_lib)
66
(wrapped true)
7-
(libraries omd ez_subst ez_opam_file ez_file ez_config ez_cmdliner drom_toml directories bigarray)
7+
(libraries omd ez_subst ez_opam_file ez_file ez_cmdliner drom_toml directories bigarray)
88

99

1010
)

src/drom_lib/hashes.ml

+32-20
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ type t =
6767
let load () =
6868
let version = ref None in
6969
let hashes =
70-
if Sys.file_exists ".drom" then (
70+
if Sys.file_exists ".drom" then
7171
let map = ref StringMap.empty in
7272
(* Printf.eprintf "Loading .drom\n%!"; *)
7373
Array.iteri
@@ -104,7 +104,7 @@ let load () =
104104
exit 2 )
105105
(EzFile.read_lines ".drom");
106106
!map
107-
) else
107+
else
108108
StringMap.empty
109109
in
110110
{ hashes;
@@ -150,11 +150,11 @@ let save ?(git = true) t =
150150
if t.modified then begin
151151
StringMap.iter
152152
(fun file (record, content, perm) ->
153-
let dirname = Filename.dirname file in
154-
if not (Sys.file_exists dirname) then EzFile.make_dir ~p:true dirname;
155-
EzFile.write_file file content;
156-
Unix.chmod file perm;
157-
if record then update t file [digest_content ~file ~perm ~content ()] )
153+
let dirname = Filename.dirname file in
154+
if not (Sys.file_exists dirname) then EzFile.make_dir ~p:true dirname;
155+
EzFile.write_file file content;
156+
Unix.chmod file perm;
157+
if record then update t file [digest_content ~file ~perm ~content ()] )
158158
t.files;
159159

160160
let b = Buffer.create 1000 in
@@ -167,19 +167,31 @@ let save ?(git = true) t =
167167
Printf.bprintf b "# end version\n%!";
168168
StringMap.iter
169169
(fun filename hashes ->
170-
if Sys.file_exists filename then begin
171-
if filename = "." then begin
172-
Printf.bprintf b "\n# hash of toml configuration files\n";
173-
Printf.bprintf b "# used for generation of all files\n"
174-
end else begin
175-
Printf.bprintf b "\n# begin context for %s\n" filename;
176-
Printf.bprintf b "# file %s\n" filename
177-
end;
178-
List.iter (fun hash ->
179-
Printf.bprintf b "%s:%s\n" (HASH.to_hex hash) filename
180-
) (List.rev hashes);
181-
Printf.bprintf b "# end context for %s\n" filename
182-
end )
170+
if Sys.file_exists filename then begin
171+
let hashes =
172+
if filename = "." then begin
173+
Printf.bprintf b "\n# hash of toml configuration files\n";
174+
Printf.bprintf b "# used for generation of all files\n";
175+
hashes
176+
end else begin
177+
Printf.bprintf b "\n# begin context for %s\n" filename;
178+
Printf.bprintf b "# file %s\n" filename;
179+
let found = ref None in
180+
let current_hash = digest_file filename in
181+
List.iter (fun hash ->
182+
if hash = current_hash then
183+
found := Some current_hash;
184+
) hashes;
185+
match !found with
186+
| Some hash -> [ hash ]
187+
| None -> hashes
188+
end
189+
in
190+
List.iter (fun hash ->
191+
Printf.bprintf b "%s:%s\n" (HASH.to_hex hash) filename
192+
) (List.rev hashes);
193+
Printf.bprintf b "# end context for %s\n" filename
194+
end )
183195
t.hashes;
184196
EzFile.write_file ".drom" (Buffer.contents b);
185197

src/drom_lib/package.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pack-modules = true
4949
directories = ">=0.2"
5050
drom_toml = "version"
5151
ez_cmdliner = "0.2.0"
52-
ez_config = "0.1.0"
52+
#ez_config = "0.1.0"
5353
ez_file = "0.3.0"
5454
ez_opam_file = "0.1.0"
5555
ez_subst = ">=0.1"

src/drom_lib/version.mlt

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ let query cmd =
1313

1414
let commit_hash = query "git show -s --pretty=format:%H"
1515
let commit_date = query "git show -s --pretty=format:%ci"
16-
let version = "0.9.2~dev3"
16+
let version = "0.9.2"
1717

1818
let string_option = function
1919
| None -> "None"

src/toml.7.1.0/version.mlt

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ let query cmd =
1313

1414
let commit_hash = query "git show -s --pretty=format:%H"
1515
let commit_date = query "git show -s --pretty=format:%ci"
16-
let version = "0.9.2~dev3"
16+
let version = "0.9.2"
1717

1818
let string_option = function
1919
| None -> "None"

0 commit comments

Comments
 (0)