Skip to content

Commit

Permalink
irmin-unix: remove package
Browse files Browse the repository at this point in the history
  • Loading branch information
metanivek committed Jul 6, 2022
1 parent abeee12 commit a5ea818
Show file tree
Hide file tree
Showing 27 changed files with 65 additions and 328 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ The following packages have been made available on `opam`:
- `irmin-mirage` - mirage compatibility
- `irmin-mirage-git` - Git compatible storage for mirage
- `irmin-mirage-graphql` - mirage compatible GraphQL server
- `irmin-unix` - unix compatibility
- `irmin-pack` - compressed, on-disk, posix backend
- `ppx_irmin` - PPX deriver for Irmin content types (see [README_PPX.md][ppx_irmin-readme])
- `irmin-containers` - collection of simple, ready-to-use mergeable data structures
Expand Down
4 changes: 2 additions & 2 deletions dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

(mdx
(files README.md)
(package irmin-unix)
(packages irmin-unix))
(package irmin-cli)
(packages irmin-cli))
2 changes: 1 addition & 1 deletion examples/custom_graphql.ml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module Car = struct
let merge = Irmin.Merge.(option (idempotent t))
end

module Store = Irmin_unix.Git.Mem.KV (Car)
module Store = Irmin_git_unix.Mem.KV (Car)

module Custom_types = struct
module Defaults = Irmin_graphql.Server.Default_types (Store)
Expand Down
12 changes: 10 additions & 2 deletions examples/dune
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@
push
custom_graphql
fold)
(libraries astring cohttp fmt git irmin irmin-git irmin-unix lwt lwt.unix)
(libraries
astring
cohttp
fmt
irmin.unix
irmin-git.unix
irmin-graphql.unix
lwt
lwt.unix)
(preprocess
(pps ppx_irmin)))

Expand All @@ -30,7 +38,7 @@

(alias
(name runtest)
(package irmin-unix)
(package irmin-git)
(deps
readme.exe
trees.exe
Expand Down
58 changes: 0 additions & 58 deletions irmin-unix.opam

This file was deleted.

1 change: 1 addition & 0 deletions irmin.opam
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ depends: [
"mtime" {>= "1.0.0"}
"bigstringaf" { >= "0.2.0" }
"ppx_irmin" {= version}
"irmin-watcher" {>= "0.2.0"}
"hex" {with-test}
"alcotest" {>= "1.1.0" & with-test}
"alcotest-lwt" {with-test}
Expand Down
3 changes: 2 additions & 1 deletion libirmin.opam
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ depends: [
"dune" {>= "2.9"}
"ctypes" {>= "0.19"}
"ctypes-foreign" {>= "0.18"}
"irmin-unix" {= version}
"irmin" {= version}
"irmin-cli" {= version}
]
build: [
["dune" "subst"] {dev}
Expand Down
38 changes: 0 additions & 38 deletions src/irmin-unix/dune

This file was deleted.

17 changes: 0 additions & 17 deletions src/irmin-unix/hook.ml

This file was deleted.

17 changes: 0 additions & 17 deletions src/irmin-unix/hook.mli

This file was deleted.

18 changes: 0 additions & 18 deletions src/irmin-unix/import.ml

This file was deleted.

60 changes: 0 additions & 60 deletions src/irmin-unix/irmin_unix.mli

This file was deleted.

8 changes: 8 additions & 0 deletions src/irmin/unix/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(library
(name irmin_unix)
(public_name irmin.unix)
(libraries irmin unix irmin-watcher)
(preprocess
(pps ppx_irmin.internal))
(instrumentation
(backend bisect_ppx)))
1 change: 0 additions & 1 deletion src/irmin-unix/info.ml → src/irmin/unix/info.ml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ module Make (I : Irmin.Info.S) = struct
match author with
| Some a -> a
| None ->
(* XXX: get "git config user.name" *)
Printf.sprintf "Irmin %s.[%d]" (Unix.gethostname ())
(Unix.getpid ())
in
Expand Down
File renamed without changes.
12 changes: 8 additions & 4 deletions test/irmin-unix/test.ml → src/irmin/unix/irmin_unix.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
(*
* Copyright (c) 2013-2022 Thomas Gazagnaire <[email protected]>
* Copyright (c) 2022 Tarides <[email protected]>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand All @@ -15,5 +14,10 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*)

let misc = []
let () = Irmin_test.Store.run "irmin-unix" ~misc []
module Info = Info.Make
module I = Info (Irmin.Info.Default)

let info = I.v

let set_listen_dir_hook () =
Irmin.Backend.Watch.set_listen_dir_hook Irmin_watcher.hook
27 changes: 16 additions & 11 deletions src/irmin-unix/irmin_unix.ml → src/irmin/unix/irmin_unix.mli
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(*
* Copyright (c) 2013-2022 Thomas Gazagnaire <[email protected]>
* Copyright (c) 2022 Tarides <[email protected]>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand All @@ -14,16 +14,21 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*)

let set_listen_dir_hook = Hook.init
(** {1 Irmin Unix utilities}
module I = Info.Make (Irmin.Info.Default)

let info = I.v
This module provides utilities for Unix applications. *)

module Info = Info.Make
module Git = Irmin_git_unix
module Http = Irmin_http_unix
module Graphql = Irmin_graphql_unix
module FS = Irmin_fs_unix
module Cli = Irmin_cli
module Resolver = Irmin_cli.Resolver

val info :
?author:string ->
('a, Format.formatter, unit, unit -> Irmin.Info.default) format4 ->
'a
(** [info fmt ()] creates a fresh commit info, with the {{!Irmin.Info.S.date}
date} set to [Unix.gettimeoday ()] and the {{!Irmin.Info.S.author} author}
built using [Unix.gethostname()] and [Unix.getpid()] if [author] is not
provided. *)

val set_listen_dir_hook : unit -> unit
(** Install {!Irmin_watcher.hook} as the listen hook for watching changes in
directories. *)
Loading

0 comments on commit a5ea818

Please sign in to comment.