Skip to content

Commit

Permalink
Merge pull request #2 from mbarbin/fpath-sexp0
Browse files Browse the repository at this point in the history
Introduce fpath-sexp0 - split package dependencies
  • Loading branch information
mbarbin authored Sep 3, 2024
2 parents 65cc1c6 + e814763 commit 3984c9a
Show file tree
Hide file tree
Showing 33 changed files with 581 additions and 607 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
# janestreet-bleeding-external: https://github.com/janestreet/opam-repository.git#external-packages

- name: Install dependencies
run: opam install . --deps-only --with-doc --with-test
run: opam install . --deps-only --with-doc --with-test --with-dev-setup

- name: Build
run: opam exec -- dune build @all @lint
Expand Down
11 changes: 4 additions & 7 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
## 0.0.11 (unreleased)
## 0.1.0 (2024-09-03)

### Added

- Added minimal library depending on `sexplib0` only.

### Changed

- Rewrite `Fpath_base` on top of `Fpath_sexp0`.
- Remove vendor, use `expect_test_helpers_core.expect_test_helpers_base`.

### Deprecated

### Fixed

### Removed

## 0.0.10 (2024-07-26)

### Added
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ lint:

.PHONY: deps
deps:
opam install . --deps-only --with-doc --with-test
opam install . --deps-only --with-doc --with-test --with-dev-setup

.PHONY: doc
doc:
Expand Down
60 changes: 48 additions & 12 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -21,39 +21,66 @@
(depends
(ocaml
(>= 5.2))
(ocamlformat
(and
:with-dev-setup
(= 0.26.2)))
(base
(and
(>= v0.17)
(< v0.18)))
(bisect_ppx
(and
:dev
:with-dev-setup
(>= 2.8.3)))
(fpath
(>= 0.7.3))
(fpath-sexp0
(= :version))
(ppx_compare
(and
(>= v0.17)
(< v0.18)))
(ppx_enumerate
(ppx_hash
(and
(>= v0.17)
(< v0.18)))
(ppx_hash
(ppx_js_style
(and
:with-dev-setup
(>= v0.17)
(< v0.18)))
(ppx_here
(ppx_sexp_conv
(and
(>= v0.17)
(< v0.18)))
(ppx_js_style
(ppx_sexp_value
(and
:dev
(>= v0.17)
(< v0.18)))
(ppx_let
(ppxlib
(>= 0.33))))

(package
(name fpath-sexp0)
(synopsis
"Adding sexp converters to Fpath as well as Abs and Rel path modules")
(depends
(ocaml
(>= 5.2))
(ocamlformat
(and
:with-dev-setup
(= 0.26.2)))
(bisect_ppx
(and
:with-dev-setup
(>= 2.8.3)))
(fpath
(>= 0.7.3))
(ppx_js_style
(and
:with-dev-setup
(>= v0.17)
(< v0.18)))
(ppx_sexp_conv
Expand All @@ -65,14 +92,22 @@
(>= v0.17)
(< v0.18)))
(ppxlib
(>= 0.33))))
(>= 0.33))
(sexplib0
(and
(>= v0.17)
(< v0.18)))))

(package
(name fpath-base-tests)
(synopsis "Tests for fpath-base")
(depends
(ocaml
(>= 5.2))
(ocamlformat
(and
:with-dev-setup
(= 0.26.2)))
(base
(and
(>= v0.17)
Expand All @@ -83,7 +118,7 @@
(< v0.18)))
(bisect_ppx
(and
:dev
:with-dev-setup
(>= 2.8.3)))
(expect_test_helpers_core
(and
Expand All @@ -93,6 +128,8 @@
(>= 0.7.3))
(fpath-base
(= :version))
(fpath-sexp0
(= :version))
(ppx_compare
(and
(>= v0.17)
Expand All @@ -115,7 +152,7 @@
(< v0.18)))
(ppx_js_style
(and
:dev
:with-dev-setup
(>= v0.17)
(< v0.18)))
(ppx_let
Expand All @@ -133,8 +170,7 @@
(ppxlib
(>= 0.33))
(re
(and
(>= 1.8.0)))
(>= 1.8.0))
(sexp_pretty
(and
(>= v0.17)
Expand Down
6 changes: 4 additions & 2 deletions fpath-base-tests.opam
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,20 @@ bug-reports: "https://github.com/mbarbin/fpath-base/issues"
depends: [
"dune" {>= "3.16"}
"ocaml" {>= "5.2"}
"ocamlformat" {with-dev-setup & = "0.26.2"}
"base" {>= "v0.17" & < "v0.18"}
"base_quickcheck" {>= "v0.17" & < "v0.18"}
"bisect_ppx" {dev & >= "2.8.3"}
"bisect_ppx" {with-dev-setup & >= "2.8.3"}
"expect_test_helpers_core" {>= "v0.17" & < "v0.18"}
"fpath" {>= "0.7.3"}
"fpath-base" {= version}
"fpath-sexp0" {= version}
"ppx_compare" {>= "v0.17" & < "v0.18"}
"ppx_enumerate" {>= "v0.17" & < "v0.18"}
"ppx_expect" {>= "v0.17" & < "v0.18"}
"ppx_hash" {>= "v0.17" & < "v0.18"}
"ppx_here" {>= "v0.17" & < "v0.18"}
"ppx_js_style" {dev & >= "v0.17" & < "v0.18"}
"ppx_js_style" {with-dev-setup & >= "v0.17" & < "v0.18"}
"ppx_let" {>= "v0.17" & < "v0.18"}
"ppx_sexp_conv" {>= "v0.17" & < "v0.18"}
"ppx_sexp_value" {>= "v0.17" & < "v0.18"}
Expand Down
9 changes: 4 additions & 5 deletions fpath-base.opam
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ bug-reports: "https://github.com/mbarbin/fpath-base/issues"
depends: [
"dune" {>= "3.16"}
"ocaml" {>= "5.2"}
"ocamlformat" {with-dev-setup & = "0.26.2"}
"base" {>= "v0.17" & < "v0.18"}
"bisect_ppx" {dev & >= "2.8.3"}
"bisect_ppx" {with-dev-setup & >= "2.8.3"}
"fpath" {>= "0.7.3"}
"fpath-sexp0" {= version}
"ppx_compare" {>= "v0.17" & < "v0.18"}
"ppx_enumerate" {>= "v0.17" & < "v0.18"}
"ppx_hash" {>= "v0.17" & < "v0.18"}
"ppx_here" {>= "v0.17" & < "v0.18"}
"ppx_js_style" {dev & >= "v0.17" & < "v0.18"}
"ppx_let" {>= "v0.17" & < "v0.18"}
"ppx_js_style" {with-dev-setup & >= "v0.17" & < "v0.18"}
"ppx_sexp_conv" {>= "v0.17" & < "v0.18"}
"ppx_sexp_value" {>= "v0.17" & < "v0.18"}
"ppxlib" {>= "0.33"}
Expand Down
38 changes: 38 additions & 0 deletions fpath-sexp0.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
synopsis:
"Adding sexp converters to Fpath as well as Abs and Rel path modules"
maintainer: ["Mathieu Barbin"]
authors: ["Mathieu Barbin"]
license: "MIT"
homepage: "https://github.com/mbarbin/fpath-base"
doc: "https://mbarbin.github.io/fpath-base/"
bug-reports: "https://github.com/mbarbin/fpath-base/issues"
depends: [
"dune" {>= "3.16"}
"ocaml" {>= "5.2"}
"ocamlformat" {with-dev-setup & = "0.26.2"}
"bisect_ppx" {with-dev-setup & >= "2.8.3"}
"fpath" {>= "0.7.3"}
"ppx_js_style" {with-dev-setup & >= "v0.17" & < "v0.18"}
"ppx_sexp_conv" {>= "v0.17" & < "v0.18"}
"ppx_sexp_value" {>= "v0.17" & < "v0.18"}
"ppxlib" {>= "0.33"}
"sexplib0" {>= "v0.17" & < "v0.18"}
"odoc" {with-doc}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/mbarbin/fpath-base.git"
5 changes: 1 addition & 4 deletions src/dune → lib/fpath_base/src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(name fpath_base)
(public_name fpath-base)
(flags :standard -w +a-4-40-41-42-44-45-48-66 -warn-error +a -open Base)
(libraries base fpath)
(libraries base fpath fpath_sexp0)
(instrumentation
(backend bisect_ppx))
(lint
Expand All @@ -11,9 +11,6 @@
(pps
-unused-code-warnings=force
ppx_compare
ppx_enumerate
ppx_hash
ppx_here
ppx_let
ppx_sexp_conv
ppx_sexp_value)))
35 changes: 35 additions & 0 deletions lib/fpath_base/src/fpath_base.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module Fpath = struct
module T = Fpath_sexp0.Fpath
include T
include Comparable.Make (T)

let hash t = String.hash (T.to_string t)
let hash_fold_t state t = String.hash_fold_t state (T.to_string t)
end

module Absolute_path = struct
module T = Fpath_sexp0.Absolute_path
include T
include Comparable.Make (T)

let hash t = String.hash (T.to_string t)
let hash_fold_t state t = String.hash_fold_t state (T.to_string t)
end

module Relative_path = struct
module T = Fpath_sexp0.Relative_path
include T
include Comparable.Make (T)

let hash t = String.hash (T.to_string t)
let hash_fold_t state t = String.hash_fold_t state (T.to_string t)
end

module File_name = struct
module T = Fpath_sexp0.File_name
include T
include Comparable.Make (T)

let hash t = String.hash (T.to_string t)
let hash_fold_t state t = String.hash_fold_t state (T.to_string t)
end
27 changes: 27 additions & 0 deletions lib/fpath_base/src/fpath_base.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module Fpath : sig
type t = Fpath_sexp0.Fpath.t [@@deriving hash]

include module type of Fpath_sexp0.Fpath with type t := t
include Comparable.S with type t := t
end

module Absolute_path : sig
type t = Fpath_sexp0.Absolute_path.t [@@deriving hash]

include module type of Fpath_sexp0.Absolute_path with type t := t
include Comparable.S with type t := t
end

module Relative_path : sig
type t = Fpath_sexp0.Relative_path.t [@@deriving hash]

include module type of Fpath_sexp0.Relative_path with type t := t
include Comparable.S with type t := t
end

module File_name : sig
type t = Fpath_sexp0.File_name.t [@@deriving hash]

include module type of Fpath_sexp0.File_name with type t := t
include Comparable.S with type t := t
end
File renamed without changes.
Loading

0 comments on commit 3984c9a

Please sign in to comment.