diff --git a/.drom b/.drom index 736fa3c9..a4c74721 100644 --- a/.drom +++ b/.drom @@ -5,12 +5,12 @@ version:0.9.0 # hash of toml configuration files # used for generation of all files -27968ad2d0e5e4bf2de6882737668c66:. +cfa41e62814087cf2f340eab496a6542:. # end context for . # begin context for .github/workflows/workflow.yml # file .github/workflows/workflow.yml -17379dd384713dc356e0f1f47b7de18b:.github/workflows/workflow.yml +533318fb1c01b0861406a644a7d9f39c:.github/workflows/workflow.yml # end context for .github/workflows/workflow.yml # begin context for .gitignore @@ -40,12 +40,12 @@ version:0.9.0 # begin context for LICENSE.md # file LICENSE.md -e31b19b601ab25353ef16d67127735f1:LICENSE.md +8fc45323c2500fb66e52deb392dda4f2:LICENSE.md # end context for LICENSE.md # begin context for Makefile # file Makefile -20473ad87e42d8860a8bdd33a79842ad:Makefile +9018881cf0682f4f7f262417b0d4f9ff:Makefile # end context for Makefile # begin context for README.md @@ -100,22 +100,22 @@ e850a13c004f963e9f5a568eac93c217:dune # begin context for dune-project # file dune-project -f8f5311a3752d34fcd492d98660840ad:dune-project +47416b4e7b7e7febc8da32932cae0d54:dune-project # end context for dune-project # begin context for opam/drom.opam # file opam/drom.opam -2de609a6a5c806247b3bdd82f913a109:opam/drom.opam +d3c8882f1742f865c2987dea6c7c83e2:opam/drom.opam # end context for opam/drom.opam # begin context for opam/drom_lib.opam # file opam/drom_lib.opam -38acddee945b9967310158787939ea09:opam/drom_lib.opam +8b323689fcc28f9783fa85ca4a4fac55:opam/drom_lib.opam # end context for opam/drom_lib.opam # begin context for opam/drom_toml.opam # file opam/drom_toml.opam -0414e4eed49fb8e24683f51dfd27d7d3:opam/drom_toml.opam +81116a1889e6414dee5c2e921961aa77:opam/drom_toml.opam # end context for opam/drom_toml.opam # begin context for scripts/after.sh @@ -165,7 +165,7 @@ a44c87f3a364dd95f55427fe40b2c5d1:sphinx/about.rst # begin context for sphinx/license.rst # file sphinx/license.rst -7f09d28eb87ab9f2650899f85835e74a:sphinx/license.rst +8f504f01aea592543c0a662b81169d91:sphinx/license.rst # end context for sphinx/license.rst # begin context for src/drom/dune @@ -195,7 +195,7 @@ efad88968955023a354f16469eb1ae15:src/drom/dune # begin context for src/drom_lib/dune # file src/drom_lib/dune -e7ddb8c3da7d7b47c8100964303ba50a:src/drom_lib/dune +a97be0d7328e7c15eb149c454844646a:src/drom_lib/dune # end context for src/drom_lib/dune # begin context for src/drom_lib/index.mld @@ -210,7 +210,7 @@ e7ddb8c3da7d7b47c8100964303ba50a:src/drom_lib/dune # begin context for src/drom_lib/version.mlt # file src/drom_lib/version.mlt -9749ccfb897b43e7f10913c8ee636af5:src/drom_lib/version.mlt +fc09abbaf032f775d148928fa1398cf9:src/drom_lib/version.mlt # end context for src/drom_lib/version.mlt # begin context for src/toml.7.1.0/dune @@ -235,7 +235,7 @@ d1b05207fce876a1b44a8b268bcaf226:src/toml.7.1.0/index.mld # begin context for src/toml.7.1.0/version.mlt # file src/toml.7.1.0/version.mlt -9749ccfb897b43e7f10913c8ee636af5:src/toml.7.1.0/version.mlt +fc09abbaf032f775d148928fa1398cf9:src/toml.7.1.0/version.mlt # end context for src/toml.7.1.0/version.mlt # begin context for test/expect-tests/dune diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 52d52524..ebbf589a 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -19,7 +19,7 @@ jobs: - macos-latest - windows-latest ocaml-compiler: - - 4.10.0 + - 4.14.1 skip_test: - false @@ -93,10 +93,10 @@ jobs: - name: test source is well formatted run: make fmt continue-on-error: true - if: matrix.ocaml-compiler == '4.10.0' && matrix.os == 'ubuntu-latest' + if: matrix.ocaml-compiler == '4.14.1' && matrix.os == 'ubuntu-latest' - name: build-doc - if: github.ref == 'refs/heads/master' && matrix.ocaml-compiler == '4.10.0' && matrix.os == 'ubuntu-latest' + if: github.ref == 'refs/heads/master' && matrix.ocaml-compiler == '4.14.1' && matrix.os == 'ubuntu-latest' run: | sudo apt install -yqq python3-sphinx python3-sphinx-rtd-theme opam install -y dune odoc @@ -107,7 +107,7 @@ jobs: - name: deploy-doc uses: JamesIves/github-pages-deploy-action@3.6.2 - if: github.ref == 'refs/heads/master' && matrix.ocaml-compiler == '4.10.0' && matrix.os == 'ubuntu-latest' + if: github.ref == 'refs/heads/master' && matrix.ocaml-compiler == '4.14.1' && matrix.os == 'ubuntu-latest' with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH: gh-pages diff --git a/LICENSE.md b/LICENSE.md index caa0f0ec..80a03a60 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2023 OCamlPro SAS +Copyright (c) 2024 OCamlPro SAS This software is distributed under the terms of the GNU Lesser General Public License (LGPL) version 2.1 (included below). diff --git a/Makefile b/Makefile index 8e2df0ae..b2986309 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ build: build-deps: if ! [ -e _opam ]; then \ - opam switch create . 4.10.0 ; \ + opam switch create . 4.14.1 ; \ fi opam install ./*.opam --deps-only diff --git a/drom.toml b/drom.toml index b2d6907d..a4b95462 100644 --- a/drom.toml +++ b/drom.toml @@ -8,14 +8,14 @@ share-version = "0.9.0" authors = ["Fabrice Le Fessant ", "Léo Andrès "] ci-systems = ["ubuntu-latest", "macos-latest", "windows-latest"] copyright = "OCamlPro SAS" -edition = "4.10.0" +edition = "4.14.1" github-organization = "ocamlpro" license = "LGPL2" min-edition = "4.07.0" name = "drom" skeleton = "program" synopsis = "The drom tool is a wrapper over opam/dune in an attempt to provide a cargo-like user experience" -version = "0.9.2~dev4" +version = "0.9.2" # keys that you could also define: # odoc-target = "...odoc-target..." diff --git a/dune-project b/dune-project index 19ba757f..8ff437cd 100644 --- a/dune-project +++ b/dune-project @@ -5,7 +5,7 @@ (name drom) (allow_approximate_merlin) (generate_opam_files false) -(version 0.9.2~dev3) +(version 0.9.2) (formatting (enabled_for ocaml reason)) (using menhir 2.0) @@ -33,7 +33,6 @@ (ez_subst ( >= 0.1 )) (ez_opam_file (and (>= 0.1.0) (< 1.0.0))) (ez_file (and (>= 0.3.0) (< 1.0.0))) - (ez_config (and (>= 0.1.0) (< 1.0.0))) (ez_cmdliner (and (>= 0.2.0) (< 1.0.0))) (drom_toml (= version)) (directories ( >= 0.2 )) diff --git a/opam/drom.opam b/opam/drom.opam index fe14cdb3..25b99c39 100644 --- a/opam/drom.opam +++ b/opam/drom.opam @@ -2,7 +2,7 @@ # Do not modify, or add to the `skip` field of `drom.toml`. opam-version: "2.0" name: "drom" -version: "0.9.2~dev3" +version: "0.9.2" license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" synopsis: "The drom tool is a wrapper over opam/dune in an attempt to provide a cargo-like user experience" diff --git a/opam/drom_lib.opam b/opam/drom_lib.opam index 8a80e69b..0f737688 100644 --- a/opam/drom_lib.opam +++ b/opam/drom_lib.opam @@ -2,7 +2,7 @@ # Do not modify, or add to the `skip` field of `drom.toml`. opam-version: "2.0" name: "drom_lib" -version: "0.9.2~dev3" +version: "0.9.2" license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" synopsis: "The drom tool is a wrapper over opam/dune in an attempt to provide a cargo-like user experience" @@ -51,7 +51,6 @@ depends: [ "ez_subst" {>= "0.1"} "ez_opam_file" {>= "0.1.0" & < "1.0.0"} "ez_file" {>= "0.3.0" & < "1.0.0"} - "ez_config" {>= "0.1.0" & < "1.0.0"} "ez_cmdliner" {>= "0.2.0" & < "1.0.0"} "drom_toml" {= version} "directories" {>= "0.2"} diff --git a/opam/drom_toml.opam b/opam/drom_toml.opam index 9920073a..da2ccdc5 100644 --- a/opam/drom_toml.opam +++ b/opam/drom_toml.opam @@ -2,7 +2,7 @@ # Do not modify, or add to the `skip` field of `drom.toml`. opam-version: "2.0" name: "drom_toml" -version: "0.9.2~dev3" +version: "0.9.2" license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception" synopsis: "The drom tool is a wrapper over opam/dune in an attempt to provide a cargo-like user experience" diff --git a/sphinx/conf.py b/sphinx/conf.py index deeee34e..83986c77 100644 --- a/sphinx/conf.py +++ b/sphinx/conf.py @@ -220,4 +220,4 @@ # entry point for setup def setup(app): - app.add_css_file('css/fixes.css') + app.add_stylesheet('css/fixes.css') diff --git a/sphinx/license.rst b/sphinx/license.rst index 849b20fd..fff0c398 100644 --- a/sphinx/license.rst +++ b/sphinx/license.rst @@ -1,7 +1,7 @@ Copyright and License ===================== -Copyright (c) 2023 OCamlPro SAS +Copyright (c) 2024 OCamlPro SAS This software is distributed under the terms of the GNU Lesser General Public License (LGPL) version 2.1 (included below). diff --git a/src/drom_lib/dune b/src/drom_lib/dune index af411342..628c3b40 100644 --- a/src/drom_lib/dune +++ b/src/drom_lib/dune @@ -4,7 +4,7 @@ (name drom_lib) (public_name drom_lib) (wrapped true) - (libraries omd ez_subst ez_opam_file ez_file ez_config ez_cmdliner drom_toml directories bigarray) + (libraries omd ez_subst ez_opam_file ez_file ez_cmdliner drom_toml directories bigarray) ) diff --git a/src/drom_lib/hashes.ml b/src/drom_lib/hashes.ml index b146c18c..a0b825af 100644 --- a/src/drom_lib/hashes.ml +++ b/src/drom_lib/hashes.ml @@ -67,7 +67,7 @@ type t = let load () = let version = ref None in let hashes = - if Sys.file_exists ".drom" then ( + if Sys.file_exists ".drom" then let map = ref StringMap.empty in (* Printf.eprintf "Loading .drom\n%!"; *) Array.iteri @@ -104,7 +104,7 @@ let load () = exit 2 ) (EzFile.read_lines ".drom"); !map - ) else + else StringMap.empty in { hashes; @@ -150,11 +150,11 @@ let save ?(git = true) t = if t.modified then begin StringMap.iter (fun file (record, content, perm) -> - let dirname = Filename.dirname file in - if not (Sys.file_exists dirname) then EzFile.make_dir ~p:true dirname; - EzFile.write_file file content; - Unix.chmod file perm; - if record then update t file [digest_content ~file ~perm ~content ()] ) + let dirname = Filename.dirname file in + if not (Sys.file_exists dirname) then EzFile.make_dir ~p:true dirname; + EzFile.write_file file content; + Unix.chmod file perm; + if record then update t file [digest_content ~file ~perm ~content ()] ) t.files; let b = Buffer.create 1000 in @@ -167,19 +167,31 @@ let save ?(git = true) t = Printf.bprintf b "# end version\n%!"; StringMap.iter (fun filename hashes -> - if Sys.file_exists filename then begin - if filename = "." then begin - Printf.bprintf b "\n# hash of toml configuration files\n"; - Printf.bprintf b "# used for generation of all files\n" - end else begin - Printf.bprintf b "\n# begin context for %s\n" filename; - Printf.bprintf b "# file %s\n" filename - end; - List.iter (fun hash -> - Printf.bprintf b "%s:%s\n" (HASH.to_hex hash) filename - ) (List.rev hashes); - Printf.bprintf b "# end context for %s\n" filename - end ) + if Sys.file_exists filename then begin + let hashes = + if filename = "." then begin + Printf.bprintf b "\n# hash of toml configuration files\n"; + Printf.bprintf b "# used for generation of all files\n"; + hashes + end else begin + Printf.bprintf b "\n# begin context for %s\n" filename; + Printf.bprintf b "# file %s\n" filename; + let found = ref None in + let current_hash = digest_file filename in + List.iter (fun hash -> + if hash = current_hash then + found := Some current_hash; + ) hashes; + match !found with + | Some hash -> [ hash ] + | None -> hashes + end + in + List.iter (fun hash -> + Printf.bprintf b "%s:%s\n" (HASH.to_hex hash) filename + ) (List.rev hashes); + Printf.bprintf b "# end context for %s\n" filename + end ) t.hashes; EzFile.write_file ".drom" (Buffer.contents b); diff --git a/src/drom_lib/package.toml b/src/drom_lib/package.toml index af9a7c9a..c18fbdb3 100644 --- a/src/drom_lib/package.toml +++ b/src/drom_lib/package.toml @@ -49,7 +49,7 @@ pack-modules = true directories = ">=0.2" drom_toml = "version" ez_cmdliner = "0.2.0" -ez_config = "0.1.0" +#ez_config = "0.1.0" ez_file = "0.3.0" ez_opam_file = "0.1.0" ez_subst = ">=0.1" diff --git a/src/drom_lib/version.mlt b/src/drom_lib/version.mlt index c62bcc63..0bf27f13 100644 --- a/src/drom_lib/version.mlt +++ b/src/drom_lib/version.mlt @@ -13,7 +13,7 @@ let query cmd = let commit_hash = query "git show -s --pretty=format:%H" let commit_date = query "git show -s --pretty=format:%ci" -let version = "0.9.2~dev3" +let version = "0.9.2" let string_option = function | None -> "None" diff --git a/src/toml.7.1.0/version.mlt b/src/toml.7.1.0/version.mlt index c62bcc63..0bf27f13 100644 --- a/src/toml.7.1.0/version.mlt +++ b/src/toml.7.1.0/version.mlt @@ -13,7 +13,7 @@ let query cmd = let commit_hash = query "git show -s --pretty=format:%H" let commit_date = query "git show -s --pretty=format:%ci" -let version = "0.9.2~dev3" +let version = "0.9.2" let string_option = function | None -> "None"