Skip to content

Commit

Permalink
Merge pull request #5 from lefessan/z-2022-03-03-new-version
Browse files Browse the repository at this point in the history
Remove EzFile, use Ez_file.V1 with EzFile.* functions, bump to 0.3.0
  • Loading branch information
lefessan committed Mar 4, 2022
2 parents d9ad36e + 1c58263 commit 6e533c1
Show file tree
Hide file tree
Showing 9 changed files with 119 additions and 35 deletions.
17 changes: 11 additions & 6 deletions .drom
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version:0.6.0~dev

# hash of toml configuration files
# used for generation of all files
ed55563d05f17407eb14607d300ad7ef:.
38d7ee132fdca58e40e8593ebb731eb5:.
# end context for .

# begin context for .github/workflows/ci.ml
Expand Down Expand Up @@ -100,7 +100,7 @@ c8281f46ba9a11d0b61bc8ef67eaa357:docs/style.css

# begin context for drom.toml
# file drom.toml
f35a1e785f05124f2af11f8d4e62d4a7:drom.toml
4680d74fae3ab56021b78667d5b0fc25:drom.toml
# end context for drom.toml

# begin context for dune
Expand All @@ -110,12 +110,12 @@ df544cfaf9078d1bba2f90ed1b5adf5f:dune

# begin context for dune-project
# file dune-project
fbc741bf8b5e8952446805237a35f100:dune-project
d19df50bc2a2b6d306ddde718c10f7bf:dune-project
# end context for dune-project

# begin context for opam/ez_file.opam
# file opam/ez_file.opam
979841f5c5a64b5da8432842844dcab9:opam/ez_file.opam
89634f5f8677617a9a6b729cbdfd3ca9:opam/ez_file.opam
# end context for opam/ez_file.opam

# begin context for scripts/after.sh
Expand Down Expand Up @@ -165,14 +165,19 @@ abc6ae223dbcd2a710665e948f370518:sphinx/license.rst

# begin context for src/ez_file/dune
# file src/ez_file/dune
beebc8c3cfe907fce39a7cdc100189ec:src/ez_file/dune
4ebbfb6c250e6241171b938a4bc7f6c0:src/ez_file/dune
# end context for src/ez_file/dune

# begin context for src/ez_file/index.mld
# file src/ez_file/index.mld
bed85e743dfd59e9bd016db13f965650:src/ez_file/index.mld
1b046c188c2bde7a33d6bc66a917525f:src/ez_file/index.mld
# end context for src/ez_file/index.mld

# begin context for src/ez_file/package.toml
# file src/ez_file/package.toml
45c89f9c025ffd8438e7ba68ad24ab10:src/ez_file/package.toml
# end context for src/ez_file/package.toml

# begin context for test/expect-tests/dune
# file test/expect-tests/dune
e2b4f39fcfb303f845699e550cb89a31:test/expect-tests/dune
Expand Down
46 changes: 28 additions & 18 deletions drom.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[project]
drom-version = "0.1.0"
drom-version = "0.1"

[project]
authors = ["Fabrice Le Fessant <fabrice.le_fessant@ocamlpro.com>"]
ci-systems = ["ubuntu-latest", "macos-latest"]
copyright = "OCamlPro SAS"
edition = "4.10.0"
github-organization = "ocamlpro"
license = "LGPL2"
min-edition = "4.07.0"
mode = "binary"
name = "ez_file"
synopsis = "Easy file manipulation (read_file, write_file, etc.)"
version = "0.2.1"
windows-ci = false
version = "0.3.0"

# keys that you could also define:
# odoc-target = "...odoc-target..."
# sphinx-target = "...sphinx-target..."
# archive = "...archive..."
# dev-repo = "...dev-repo..."
Expand All @@ -24,21 +24,17 @@ windows-ci = false
# homepage = "...homepage..."

[project]
description = """
This library provides some modules to read and write files, and create
description = """This library provides some modules to read and write files, and create
and scan directories.
"""

[drom]
skip = "src/ez_file/main.ml CHANGES.md test/expect-tests/test.ml"
[project]
skip = ["src/ez_file/main.ml", "CHANGES.md", "test/expect-tests/test.ml"]

# project-wide library dependencies (not for package-specific deps)
[dependencies]
ocplib_stuff = "0.1.0"
re = "1.8.0"
[dependencies.base-unix]
libname = "unix"
version = ">=base"

# project-wide tools dependencies (not for package-specific deps)
[tools]
dune = "2.6.0"
[tools.ocamlformat]
Expand All @@ -51,14 +47,28 @@ for-test = true
for-test = true

[project]
pack = "EzFile"
pack-modules = false

# dirs to skip while scanning for dune files
skip-dirs = []

# dirs to scan for share/ folders (with package names)
share-dirs = ["share"]

# build profile to use by default
# build-profile = ...

# Profile options for this project
# [profile]
# dev = { ocaml-flags = "-w +a-4-40-41-42-44" }
# release = { ocaml-flags = "-w -a" }
[profile]
# ...

# project-wide fields (depends on project skeleton)
[fields]
# ...

[[package]]
dir = "src/ez_file"
kind = "library"
name = "ez_file"
pack = "EzFile"
# edit 'src/ez_file/package.toml' for package-specific options

2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
(name ez_file)
(allow_approximate_merlin)
(generate_opam_files false)
(version 0.2.1)
(version 0.3.0)
(formatting (enabled_for ocaml reason))

(package
Expand Down
2 changes: 1 addition & 1 deletion opam/ez_file.opam
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Do not modify, or add to the `skip` field of `drom.toml`.
opam-version: "2.0"
name: "ez_file"
version: "0.2.1"
version: "0.3.0"
license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
synopsis: "Easy file manipulation (read_file, write_file, etc.)"
description: """\
Expand Down
2 changes: 1 addition & 1 deletion src/ez_file/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; generated by drom from package skeleton 'library'

(library
(name ezFile)
(name ez_file)
(public_name ez_file)
(wrapped true)
(libraries re ocplib_stuff unix )
Expand Down
2 changes: 1 addition & 1 deletion src/ez_file/index.mld
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ and scan directories.



The entry point of this library is the module: {!EzFile}.
The entry point of this library is the module: {!Ez_file}.

69 changes: 69 additions & 0 deletions src/ez_file/package.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

# name of package
name = "ez_file"
# skeleton = ...

# version if different from project version
# version = "0.1.0"

# synopsis if different from project synopsis
# synopsis = ...

# description if different from project description
# description = ...

# kind is either "library", "program" or "virtual"
kind = "library"

# authors if different from project authors
# authors = [ "Me <me@metoo.org>" ]

# name of a file to generate with the current version
# gen-version = "version.ml"

# supported file generators are "ocamllex", "ocamlyacc" and "menhir"
# default is [ "ocamllex", "ocamlyacc" ]
# generators = [ "ocamllex", "menhir" ]

# whether all modules should be packed/wrapped (default is true)
# pack-modules = false

# whether the package can be silently skipped if missing deps (default is false)
# optional = true

# module name used to pack modules (if pack-modules is true)
# pack = "EzFile"

# preprocessing options
# preprocess = "per-module (((action (run ./toto.sh %{input-file})) mod))"
# preprocess = "pps ppx_deriving_encoding"

# files to skip while updating at package level
# skip = []

# package library dependencies
# [dependencies]
# ez_file = ">=0.1 <1.3"
# base-unix = { libname = "unix", version = ">=base" }
[dependencies]
ocplib_stuff = "0.1.0"
re = "1.8.0"
[dependencies.base-unix]
libname = "unix"
version = ">=base"

# package tools dependencies
[tools]
# ...

# package fields (depends on package skeleton)
#Examples:
# dune-stanzas = "(preprocess (pps ppx_deriving_encoding))"
# dune-libraries = "bigstring"
# dune-trailer = "(install (..))"
# opam-trailer = "pin-depends: [..]"
# no-opam-test = "yes"
# no-opam-doc = "yes"
# gen-opam = "some" | "all"
[fields]
# ...
13 changes: 6 additions & 7 deletions src/ez_file/ezFile.ml → src/ez_file/v1.ml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
(* *)
(**************************************************************************)

(* [String] and [Abstract] implement the [FileSig] interface. *)
(* [FileString] and [FileAbstract] implement the [FileSig] interface. *)

module OS = FileOS
module Sig = FileSig
module FileOS = FileOS
module FileSig = FileSig

include FileString
module String = FileString
module Abstract = FileAbstract
module Channel = FileChannel
module EzFile = FileString
module FileAbstract = FileAbstract
module FileChannel = FileChannel
1 change: 1 addition & 0 deletions test/expect-tests/test.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

open Ez_file.V1
open EzFile.OP

let create_files dir =
Expand Down

0 comments on commit 6e533c1

Please sign in to comment.