Irmin is a distributed database that follows the same design principles as Git
ISC License
Bot releases are visible (Hide)
Published by craigfe almost 4 years ago
CHANGES:
irmin-git
irmin
to the last version of ocaml-git
(#1065)irmin-pack*
irmin*
Improve performance of last_modified
(#948, @pascutto)
Changed the pattern matching of the function last_modified
. The case of a
created key is now considered a modification by the function. (#1167,
@clecat)
Make Tree.clear tail-recursive (#1171, @samoht)
Fix Tree.fold ~force:(False f)
where results where partially skipped
(#1174, @Ngoguey42, @samoht and @CraigFe )
Fix Tree.kind
. Empty path on a tree used to return a None instead of a
`Node
. (#1218, @Ngoguey42)
ppx_irmin
irmin-unix
XDG_CONFIG_HOME
. (#1168, @zshipko)irmin-layers (new):
irmin-layers
that includes common signatures forMake_layers
functor (#882, @icristescu)irmin-bench (new):
irmin
Added Tree.Contents
module exposing operations over lazy tree contents.
(#1022 #1241, @CraigFe @samoht)
Added Type.Unboxed.{encode_bin,decode_bin,size_of}
to work with unboxed
values (#1030, @samoht)
Remove the headers
option in Type.{encode_bin,decode_bin,size_of}
. Use
Type.Unboxed.<fn>
instead (#1030, @samoht)
Type.v
now takes an extra mandatory unit
argument (#1030, @samoht)
Added Type.pp_dump
, which provides a way to pretty-print values with a
syntax almost identical to native OCaml syntax, so that they can easily be
copy-pasted into an OCaml REPL for inspection. (#1046, @liautaud)
Generic functions in Irmin.Type
are now more efficient when a partial
closure is constructed to the type representation (#1030 #1093, @samoht
@CraigFe). To make this even more explicit, these functions are now staged
and Type.{unstage,stage}
can manipulate these. The goal is to encourage
users to write this kind of (efficent) pattern:
let encode_bin = Type.(unstage (encode_bin ty))
let _ = <begin loop> ... encode_bin foo ... <end loop>
Added a clear
function for stores (#1071, @icristescu, @CraigFe)
Requires digestif>=0.9 to use digestif's default variants
(#873, @pascutto, @samoht)
Added iter_commits
and iter_nodes
functions to traverse the commits and
nodes graphs (#1077, @icristescu)
Added Repo.iter
to traverse object graphs (#1128, @samoht)
irmin-pack:
Added index_throttle
option to Irmin_pack.config
, which exposes the
memory throttle feature of Index
in Irmin-Pack
. (#1049, @icristescu)
Added Pack.clear
and Dict.clear
(#1047, @icristescu, @CraigFe, @samoht)
Added a migrate
function for upgrading stores with old formats (#1070,
@icristescu, @CraigFe)
Added a flush
function for a repo (#1092, @icristescu)
Added `Layered.Make functor, to construct layered stores from irmin-pack.
(#882, @icristescu)
Added `Checks.Make which provides some offline checks for irmin-pack
stores. (#1117, @icristescu, @CraigFe)
Added reconstruct_index
to reconstruct an index from a pack file. (#1097,
@icristescu)
Added reconstruct-index
command to irmin-fsck
for reconstructing an index from
the command line (#1189, @zshipko)
Added integrity-check
command to irmin-fsck
for checking the integrity of
an irmin-pack
store (#1196, @zshipko)
ppx_irmin:
Added support for deriving type representations for types with type
parameters. Type 'a t
generates a representation of type
'a Type.t -> 'a t Type.t
(#1085, @CraigFe)
Added a --lib
command-line option which has the same behaviour as the
lib
run-time argument (i.e. --lib Foo
will cause ppx_irmin
to derive
type representations using combinators in the Foo
module). (#1086,
@CraigFe)
Added an extension point [typ: <core-type>]
for deriving type
representations inline. (#1087, @CraigFe)
irmin
Renamed the Tree.tree
type to Tree.t
. (#1022, @CraigFe)
Replaced Tree.pp_stats
with the type representation Tree.stats_t
. (#TODO, @CraigFe)
Changed the JSON encoding of special floats. Float.nan
, Float.infinity
and Float.neg_infinity
are now encoded as "nan"
, "inf"
and "-inf"
respectively. (#979, @liautaud)
The functions Type.{v,like,map}
no longer take a ~cli
argument, and now
take separate ~pp
and ~of_string
arguments instead. (#1103, @CraigFe)
The Irmin.Type
combinators are now supplied by the repr
package. The
API of Irmin.Type
is not changed. (#1106, @CraigFe)
Irmin.Type
uses staging for equal
, short_hash
and compare
to
speed-up generic operations (#1130, #1131, #1132, @samoht)
Make Tree.fold
more expressive and ensure it uses a bounded memory
(#1169, @samoht)
Changed list
and Tree.list
to take optional offset
and length
arguments to help with pagination. Also return direct pointers to the
subtrees to speed up subsequent accesses (#1241, @samoht, @zshipko,
@CraigFe, @Ngoguey42 and @icristescu)
irmin-pack:
sync
has to be called by the read-only instance to synchronise with the
files on disk. (#1008, @icristescu)
Renamed sync
to flush
for the operation that flushes to disk all buffers
of a read-write instance. (#1008, @icristescu)
Changed the format of headers for the files on disk to include a generation
number. Version 1 of irmin-pack was used for the previous format, version 2
is used with the new format. (#1047, @icristescu, @CraigFe, @samoht)
Use Repo.iter
to speed-up copies between layers (#1149, #1150 @samoht)
Add an option to bypass data integrity checks on reads (#1154, @samoht)
Add heads
parameter to check-self-contained
command in Checks
(#1224, @zshipko)
ppx_irmin:
[@generic ...]
attribute has been renamed to [@repr ...]
. (#1082,Published by craigfe over 4 years ago
CHANGES:
irmin:
Irmin.Type.empty
to represent an uninhabited type. (#961, @CraigFe)Store.Tree.concrete_t
. (#1003, @CraigFe)ppx_irmin
Added support for the @nobuiltin
attribute, which can be used when
shadowing primitive types such as unit
. See README_PPX
for details.
(#993, @CraigFe)
Added support for a lib
argument, which can be used to supply primitive
type representations from modules other than Irmin.Type
. (#994, @CraigFe)
irmin:
Require OCaml 4.07 (#961, @CraigFe)
Add sanity checks when creating Irmin.Type
records, variants and enums
(#956 and #966, @liautaud):
Irmin.Type.{sealr,sealv,enum}
will now raise Invalid_argument
if twoIrmin.Type.{field,case0,case1}
will now raise Invalid_argument
ifChanged the JSON encoding of options and unit to avoid ambiguous cases
(#967, @liautaud):
()
is now encoded as {}
;None
is now encoded as null
;Some x
is now encoded as {"some": x}
;None
are still omitted;Some x
are still unboxed into x
.Changed pretty-printing of Irmin types to more closely resemble OCaml types.
e.g. pair int string
prints as int * string
. (#997, @CraigFe)
The type Irmin.S.tree
is now abstract. The previous form can be coerced
to/from the abstract representation with the new functions
Irmin.S.Tree.{v,destruct}
respectively. (#990, @CraigFe)
irmin-mem
KV
now expose their unit metadata type. (#995,get_{contents,tree}
fields havingPublished by pascutto over 4 years ago
CHANGES:
ppx_irmin (new):
ppx_irmin
, which provides a PPX deriving pluginirmin-unix:
--hash
parameter to the command-line interface, allowing the hash--hash=blake2b/16
. The hash
irmin:
Irmin.Hash.Make_BLAKE2B
and Irmin.Hash.Make_BLAKE2S
functors foriter
function over a closure graph (#912, @ioana)Type.pp_ty
for pretty-printing Irmin generics. (#926, @craigfe)Merge.with_conflict
for modifying the conflict error message of airmin-pack:
integrity_check
can now try to repair corrupted values. (#947, @pascutto)irmin-graphql:
Published by samoht almost 5 years ago
CHANGES:
irmin-pack (new):
irmin-pack
, which uses a space-optimisedirmin-graphql (new):
Created a new package, irmin-graphql
, which provides a GraphQL server
implementation that can be used with both the MirageOS and Unix backends.
Additionally, a graphql
command has been added to the command-line
interface for starting irmin-graphql
servers. (#558, @andreas, @zshipko)
Contents can now be queried directly using irmin-graphql
with
Irmin_graphql.Server.Make_ext
and the Irmin_graphql.Server.PRESENTER
interface. (#643, @andreas)
irmin-test (new):
irmin-test
, which allows for packages to access theirmin-unix:
Add Cli
module to expose some methods to simplify building command-line
interfaces using Irmin. (#517, @zshipko)
Add global config file $HOME/.irmin/config.yml
which may be overridden by
either $PWD/.irmin.yml
or by passing --config <PATH>
. See irmin help irmin.yml
for details. (#513, @zshipko)
irmin-git:
irmin-http:
/trees/merge
route for server-side merge operations. (#714,irmin:
Add Json_value
and Json
content types. (#516 #694, @zshipko)
Add optional seed parameter to the Irmin.Type
generic hash functions.
(#712, @samoht)
Add V1
submodules in Commit
, Contents
and Hash
to provide
compatibility with 1.x serialisation formats. (#644 #666, @samoht)
Add Store.last_modified
function, which provides a list of commits where
the given key was modified last. (#617, @pascutto)
Add a Content_addressable.unsafe_add
function allowing the key of the new
value to be specified explicitly (for performance reasons). (#783, @samoht)
Add save_contents
function for saving contents to the database. (#689,
@samoht)
Add pretty-printers for the results of Sync operations. (#789, @craigfe)
Private.Lock
now exposes a stats
function returning the number of held
locks. (#704, @samoht)
irmin-unix:
Rename irmin read
to irmin get
and irmin write
to irmin set
. (#501,
@zshipko)
Switch from custom configuration format to YAML. (#504, @zshipko)
irmin-git:
Require ocaml-git >= 2.0
. (#545, @samoht)
Cleanup handling of remote stores. (#552, @samoht)
irmin-http:
CLIENT
to HTTP_CLIENT
and simplify the signatures necessary toirmin-mirage
irmin-mirage
into irmin-{mirage,mirage-git,mirage-graphql}
toIrmin_mirage.Git
should be replaced with Irmin_mirage_git
. (#686,irmin:
Update to use dune (#534, @samoht) and opam 2.0. (#583, @samoht)
Replace Irmin.Contents.S0
with Irmin.Type.S
.
Rename Type.pre_digest
-> Type.pre_hash
and Type.hash
->
Type.short_hash
. (#720, @samoht)
Change Irmin.Type
to use incremental hash functions (functions of type
'a -> (string -> unit) -> unit
) for performance reasons. (#751, @samoht)
Simplify the Irmin.Type.like
constructor and add a new Irmin.Type.map
with the previous behaviour.
Improvements to Irmin.Type
combinators. (#550 #538 #652 #653 #655 #656
#688, @samoht)
Modify Store.set
to return a result type and create a new Store.set_exn
with the previous exception-raising behaviour. (#572, @samoht)
Rename store module types to be more descriptive:
Irmin.AO
with Irmin.CONTENT_ADDRESSABLE_STORE
;Irmin.AO_MAKER
with Irmin.CONTENT_ADDRESSABLE_STORE_MAKER
;Irmin.RW
with Irmin.ATOMIC_WRITE_STORE
;Irmin.RW_MAKER
with Irmin.ATOMIC_WRITE_STORE_MAKER
. (#601,Rename export_tree
to save_tree
(#689, @samoht) and add an option to
conditionally clear the tree cache (#702 #725, @samoht).
Change hash function for Irmin_{fs,mem,unix}.KV
to BLAKE2b rather than
SHA1 for security reasons. (#811, @craigfe)
Move Irmin.remote_uri
to Store.remote
, for stores that support remote
operations. (#552, @samoht)
Simplify the error cases of fetch/pull/push operations. (#684, @zshipko)
A batch
function has been added to the backend definition to allow for
better control over how groups of operations are processed. (#609, @samoht)
A close
function has been added to allow backends to close any held
resources (e.g. file descriptors for the FS
backend). (#845, @samoht)
Simplify Private.Node.Make
parameters to use a simpler notion of 'path' in
terms of a list of steps. (#645, @samoht)
Rename Node.update
to Node.add
. (#713, @samoht)
irmin-unix:
revert
command. (#496, @zshipko)irmin-git:
Node.add
to preserve sharing. (#802, @samoht)irmin-http:
irmin:
S.History.is_empty
would return true
for a store withRemove pp
and of_string
functions from Irmin.Contents.S
in favour of
Irmin.Type.to_string
and Irmin.Type.of_string
.
Remove Bytes
content type. (#708, @samoht)
Remove Cstruct
dependency and content type. If possible, switch to
Irmin.Contents.String
or else use Irmin.Type.map
to wrap the Cstruct
type. (#544, @samoht)
Published by samoht over 6 years ago
Contents.hash
, Tree.hash
and Commit.hash
(#512, @samoht)Tree.hash
and Tree.of_hash
now work on leaf nodes. To do this, Tree.hash
Published by samoht almost 7 years ago
Published by samoht almost 7 years ago
-safe-string
is enabled by default (#477, @djs55)Published by samoht about 7 years ago
Published by samoht about 7 years ago
irmin-chunk
Add a new package: irmin-chunk
, which was initially in a separate repository
created by @mounirnasrallah and @samoht and ported to the new Irmin API by
@g2p (#464)
irmin-unix
Re-add the irmin
binary, the example application which used to be
installed by irmin-unixbefore we switched to use
jbuilder`
(#466, @samoht -- reported by @ouenzzo and @dudelson)
irmin
That releases saw a nice series of patches to improve the performance of
Irmin.Tree
contributed by the Tezos team:
Improve complexity of Irmin.Tree
operations: on trivial benchmarks with
a lot of values, this patch introduces a 10-times speed-up
(#457, @OCamlPro-Henry)
Add missing equality for Irmin.Type
primitives (#458, @OCamlPro-Henry)
Change the type of Hash.digest
to also take a type representation
(#458, @OCamlPro-Henry)
add Irmin.Type.{encode,decode}_cstruct
(#458, @OCamlPro-Henry)
remove Irmin.Contents.RAW
(#458, @OCamlPro-Henry)
avoid unecessary serialization and deserialization when computing hashes
of cstructs (#459, @OCamlPro-Henry)
remove {Type,Merge}.int
which might cause some issue on 32 bits platforms.
Intead use the more explicit (and portable) {Type,Merge}.int32
or
{Type,Merge}.int64
(#469, @samoht)
Published by samoht over 7 years ago
This release changes the build system to use
jbuilder. By doing so, it introduces
two new packages: irmin-mem
and irmin-fs
-- containing Irmin_mem
and
Irmin_fs
respectively. That release also fixes a bunch of regressions
introduced in the big 1.0 rewrite.
all
jbuilder
(#444, @samoht)irmin
Irmin.Contents.Cstruct
: pretty-print the raw contents, not the hexdumpIrmin.Hash.X.of_string
should not raise an exception on invalid hashirmin-mem
Irmin_mem
module.irmin-fs
Irmin_fs
module.irmin-git
Published by samoht over 7 years ago
irmin
S.Tree.find_tree
to return a tree option
instead oftree
. This is a breaking API change but it let distinguish betweenurl#branch
syntaxIrmin.Merge.idempotent
for values with idempotent operationsS.repo
type as an alias to the S.Repo.t
(#436, @samoht)S.Tree.diff
intoduced in the 1.0 release: nestedirmin-unix
irmin-git
Published by samoht over 7 years ago
irmin
irmin-unix
irmin
irmin-unix
Published by samoht over 7 years ago
Major API changes:
Type
).S.Tree
).KV
functors which just take one parameter:irmin.0.*
), so thatAO
and RW
, the frontend provides S
.The package is also now split into 5 opam packages: irmin
, irmin-git,
irmin-http,
irmin-unixand
irmin-miragewith similarly named
ocamlfind` libraries.
More detailled changes:
Fmt
everywhere (#397, @samoht)create
functions into v
(#397, @samoht)irmin
Task
into Info
to denote commit info (#397, @samoht)Task.uid
(#397, @samoht)Task.messages
into Info.message
, take a stringTask.add
Info.f
to only takes unit
as argument. Previously'a
which was used by the update functions. TheInfo.f
function as parameter,mirage-tc
by a new internal moduleType
using type-based combinators. This makes defining new mergeableMerge.unit
, Merge.bool
,Merge.char
, Merge.int
, Merge.int32
, Merge.int64
,Merge.float
(#397, @samoht)Merge.option
, Merge.pair
, Merge.tripleand
Merge.alist` (#397, @samoht)Merge.MSet
into Merge.MultiSet
(#397, @samoht)Merge.set
into Merge.Set
(#397, @samoht)Merge.OP
into Merge.Infix
and rename operators topath
argument from the merge functions (#397, @samoht)Path
submodule in Contents.S
Diff
module (#397, @samoht)'a
parameter (#397, @samoht)S.read
by S.find
(#397, @samoht)S.read_exn
by S.get
(#397, @samoht)S.kind
to check the kind of store entries (files, directories)View
functor, replaced by first-class support forS.Tree
(#397, @samoht)S.find_tree
to find immutable subtrees (#397, @samoht)S.find_all
to find contents and metadat (#397, @samoht)S.mem
to only check for contents, not subtree (#397, @samoht)S.mem_tree
to check for subtrees (similar behavior toS.mem
in irmin.0.*
) (#397, @samoht)S.with_tree
for atomic update of subtrees. Thiswith_hrw_view
, but a weaker consistencyS.with_tree
S.update
into S.set
and ensure that the operation isS.remove
to ensure the operation is atomtic.S.status
to mimick git status
. (#397, @samoht)_id
suffixes. (#397, @samoht)S.merge_with_commit
and S.merge_with_branch
(#397, @samoht)S.Head.fast_forward
(#401, @samoht)S.Commit
, S.Branch
(#401, @samoht)KV_MAKER
to ease the creation of store with string listsRO.read
by RO.find
(#397, @samoht)RO.read_exn
(#397, @samoht)RO.iter
, replaced by RW.list
(#397, @samoht)RW.update
by RW.set
(#397, @samoht)RW.compare_and_set
into RW.test_and_set
(#397, @samoht)RW.watch
, RW.watch_key
and RW.unwatch
functionsirmin-git
git.0.10.0
(#397, @samoht)LOCK
modules (#397, @samoht)S.Internals
into S.Git
(#397, @samoht)S.Internals.commit_of_id
into S.Git.git_commit
(#397, @samoht)S.Git.of_repo
to convert an Irmin repo into a Git repo (#397, @samoht)S.Git.to_repo
to convert a Git repo into an Irmin repo (#397, @samoht)S.Git_mem.clear
and S.Git_mem.clear_all
for in-memory GitMemory
into Mem.Make
(#405, @samoht)FS
into FS.Make
(#405, @samoht)CONTEXT
and fold it into IO
(#405, @samoht)Mem.KV
and FS.KV
to ease creatin of store with defaultMem.Ref
and FS.Ref
access tags, remotes and other Git references.git
path (#409, @samoht)irmin-mirage
Task
module into Info
to reflect the core API changesInfo.f
to accept an optional author
argument and a formatIrmin_git
into Git
(#405, @samoht)irmin-http
ocaml-webmachine
(#397, @samoht)KV
to ease creatin of store with default implementations forirmin-unix
Irmin_unix.task
into Irmin_unix.info
(#397, @samoht)LOCK
(#397, @samoht)Irmin_unix.info
to take an optional author
argument and acceptIrmin_fs
into FS
(#405, @samoht)Irmin_git
into Git
(#405, @samoht)Irmin_http
into Http
(#405, @samoht)Published by samoht almost 8 years ago
Lwt_unix.fork
in the tests anymore (#383, @samoht)Make_with_metadata
to customize the type of thePublished by samoht about 8 years ago
Published by samoht over 8 years ago
Irmin_fs
(#345, @samoht)Store.iter
to defer opening theocaml-git
1.8.0Irmin.Private.Contents.Store
Irmin.Private.Commit.Store
to make it easier toPublished by samoht over 8 years ago
--address
argument of the CLI nowlaunchd://<name>
where <name>
corresponds/watch-rec
in the REST API (#326, by @samoht)Published by samoht about 9 years ago
Irmin_mem
backend to work when equal keys might be notPervasives.(=)
is evil)Hash.SHA1.equal
to always return true when the underlyingCstruct.t
where identical: ie. same bigarray but alsoCstruct.t
value, which is obviously notHash.SHA1.compare
andHash.SHA1.hash
.BC.tag
is now BC.name
and BC.branch
is now BC.head_ref
.Irmin_http_server.listen
. Instead, return the Cohttptimeout
and uri
parameters),Irmin.task
from API of internal stores (commit, node, etc).lcas
doesn't change anything, whilelca
requires a task because it may create commits.Irmin.Basic
. This was a functor that took a functor for makingIrmin_git.Internals
AO.config
. It was only used by the removed Git.Internals
hack.AO.create
to AO_MAKER
.View.task
is gone (it never did anything).View.create
is gone (it ignored both its arguments and called View.empty
).Ir_node.Graph.Store.create
(unused, but previously required by AO
).Ir_commit.History.Store.create
(same).Ir_bc.Make
and Ir_bc.MAKER
Ir_bc.STORE_EXT
and Ir_s.STORE
. Ir_s
was the onlyIr_bc.STORE_EXT
interface, and all it did was repackIr_bc
exports the finalir_s.mli
and removed ir_s.ml
.BC
stores now contain a Repo
module. A Repo.t
represents abranches
, remove_branch
, heads
,watch_branches
, import
, export
, and task_of_head
.BC.repo t
to get a Repo.t
heads
previously ensured that the current branch's head wasBC
Ir_bc
. This allowsconfig
valuesSync.create
now takes a Repo.t
, not a config
, allowingRepo.config
to be removed and allowing sharing of the back-end'stype head
to type commit_id
. head
was confusing becauseid
in theof_head
is now of_commit_id
, task_of_head
is nowtask_of_commit_id
, Internals.commit_of_head
is nowInternals.commit_of_id
and BC.Head
is now BC.Hash
.Published by samoht about 9 years ago
config
argument to all the backend's configIrmin.LINK
and Irmin.LINK_MAKER
. Add Irmin_mem.Link
andIrmin_fs.Link
which implement Irmin.LINK_MAKER
in these backendsCstruct.t
): Irmin.RAW
and raw store maker: Irmin.AO_MAKER_RAW
Irmin.Hash.digest_size
(initial patch by @nasrallahmounir,/view
to the REST API (#292, by @samoht)Irmin.Private.merge_node
(#292 by @samoht)Irmin_git.Irmin_value_store
functor. This provides the