The Irmin team is happy to announce the 2.0.0 release of Irmin, an OCaml library and command-line tool for building Git-like databases. This release includes many improvements made to the usability and consistency of the API in addition to some new features. A website and tutorial have also been created: irmin.io!
- Added
irmin-graphql
package for serving Irmin data over GraphQL- You can also use
irmin graphql
on the command-line to start a server
- You can also use
- Added
irmin-test
package to enable external Irmin backends to reuse the existing test suite Irmin.Contents.Json
andIrmin.Contents.Json_value
content types were addedIrmin.Json_tree
allows for JSON objects to be written as trees- The custom config file format has been changed to YAML and it is now possible to create a global configuration file (
~/.irmin/config.yml
) - Updates to
Irmin.Type
combinator to simplify the creation of custom contents - Upgraded to irmin-git 2.0
- Lots of bugfixes!
- See CHANGES.md for a full list
Irmin 2.0 cleans up many of the rough edges found in Irmin 1.x, because of this there are a few breaking changes that need to be addressed in order to upgrade.
Many commands have been renamed to match the corresponding action in the OCaml API:
read
was changed toget
write
was changed toset
The .irminconfig
file has been replaced by irmin.yml
- the format has also changed to YAML. This means you will need to convert your existing .irminconfig
files to YAML, which in most cases means changing the =
seperator to an :
.
A new global configuration file at ~/.irmin/config.yml
has also been added. A .irmin.yml
in the same directory (or passed as a command line argument) takes precedence over the global configuration.
Irmin.Contents.Cstruct
has been removed
- If possible, switch to either
Irmin.Contents.String
orIrmin.Contents.Bytes
- You can also use
Irmin.Type.map
to wrap the cstruct type if needed.
Irmin.Contents.S0
has been replaced with Irmin.Type.S
pp
and of_string
are no longer needed when defining a content type. This is due to the addition of Irmin.Type.to_string
and Irmin.Type.of_string
.
Irmin.remote_uri
has been removed and has been moved into the Irmin store module when remote operations are supported. For example, Irmin_mem.S
does not contain a remote
function, however Irmin_unix.Git.S
does.
- Change all calls from
Irmin.remote_uri
toStore.remote
Functions like Irmin.Contents.String.pp
and Irmin.Contents.String.of_string
have been removed in favor of more general
string conversion provided by Irmin.Type
.
Irmin.Type.t
values can be encoded/decoded usingIrmin.Type.to_string
andIrmin.Type.from_string
,Irmin.Type.to_json_string
andIrmin.Type.from_json_string
orIrmin.Type.to_bin_string
andIrmin.Type.from_bin_string
Irmin.Type.like
has been renamed to Irmin.Type.map
.
A new Irmin.Type.like
has also been added, which is a simplified version of Irmin.Type.map
without the function parameters.
- Switch
Irmin.Type.like
toIrmin.Type.map
Store.sethas been moved to
Store.set_exnand
Store.set` new returns a result since it may fail.
- Switch to
Store.set_exn
or handle the result value
As part of the effort to help clarify the API, Irmin.AO
and Irmin.RW
have been given more descriptive names:
Irmin.AO
has been replaced with Irmin.CONTENT_ADDRESSABLE_STORE
and Irmin.AO_MAKER
has been replaced with Irmin.CONTENT_ADDRESSABLE_STORE_MAKER
Irmin.RW
has been replaced with Irmin.ATOMIC_WRITE_STORE
and Irmin.RW_MAKER
has been replaced with Irmin.ATOMIC_WRITE_STORE_MAKER
.
A batch
function has been added as part of the backend definition. This can be used to control how groups of operations are processed.
Executable applications using irmin
will need to link digestif.c
or digestif.ocaml
at compile time.
- Add
digestif.c
to thelibraries
section of yourexecutable
stanza
irmin-mirage
has been split into irmin-mirage
, irmin-mirage-git
and irmin-mirage-graphql
to avoid forcing users to include unused dependencies.
- If you're using
Irmin_mirage.Git.*
it should be replaced withIrmin_mirage_git.*
Irmin.Sync.fetch
, Irmin.Sync.pull
and Irmin.Sync.push
now return a status value: [`Empty | `Head of commit]
.
- Handle or ignore the result of the above functions depending on your application.
irmin.io seems down for me