Releases: mirage/irmin
Releases · mirage/irmin
1.0.2
1.0.1
1.0.1 (2017-03-14)
irmin
- Default merge function should not assume idempotence of edits
(#420, @kayceesrk) - Wrap the merge functions for pair and triple with the default case.
(#420, @kayceesrk)
irmin-unix
- Support all versions of cmdliner, 1.0.0 included (@samoht)
1.0.0
1.0.0 (2017-02-21)
Major API changes:
- It is now simpler to define mergeable contents, using new
combinators to describe data-types (seeType
). - The mutable views have been replaced by immutable trees, and made
first-class citizen in the API (see availableS.Tree
).
Transactions now only ensure snapshot isolation instead of full
serialisability. - Creating a store with default path and branch implementations
is now easier using theKV
functors which just take one parameter:
the contents. - the backend and user-facing API are now totally independant (instead
of being half-included in each other inirmin.0.*
), so that
backends have to implement the minimum set of functions to be
Irmin-compatible, and users can have many convenient high-level
functions when using the Irmin API. The backends implement
AO
andRW
, the frontend providesS
.
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:
- use result type everywhere (#397, @samoht)
- use
Fmt
everywhere (#397, @samoht) - rename
create
functions intov
(#397, @samoht)
irmin
- [info] rename
Task
intoInfo
to denote commit info (#397, @samoht) - [info] remove
Task.uid
(#397, @samoht) - [info] Commit messages are now plain strings (instead of a lists of
strings): changeTask.messages
intoInfo.message
, take a string
instead of a list of strings as parameter and removeTask.add
(#397, @samoht) - [info] change
Info.f
to only takesunit
as argument. Previously
it was taken an'a
which was used by the update functions. The
update functions now take a fullInfo.f
function as parameter,
which should be less confusing (#397, @samoht) - [merge] replace the dependency to
mirage-tc
by a new internal module
Type
using type-based combinators. This makes defining new mergeable
data-types much easier, especially records and variants (#397, @samoht) - [merge] change [Merge.t] to be an abstract type (#397, @samoht)
- [merge] add [Merge.f] to transform a [Merge.t] value into a merge function
(#397, @samoht) - [merge] add base merge combinators:
Merge.unit
,Merge.bool
,
Merge.char
,Merge.int
,Merge.int32
,Merge.int64
,
Merge.float
(#397, @samoht) - [merge] simplify the type of
Merge.option
,Merge.pair
, Merge.tripleand
Merge.alist` (#397, @samoht) - [merge] simplify and rename
Merge.MSet
intoMerge.MultiSet
(#397, @samoht) - [merge] simplify and rename
Merge.set
intoMerge.Set
(#397, @samoht) - [merge] rename
Merge.OP
intoMerge.Infix
and rename operators to
avoid name-clashing with other monads (#397, @samoht) - [merge] remove the
path
argument from the merge functions (#397, @samoht) - [merge] remove the need to defined a
Path
submodule inContents.S
(#397, @samoht) - [merge] add a (very simple at the moment)
Diff
module (#397, @samoht) - [api] read operations do not take a task parameter anymore (#397, @samoht)
- [api] write operations not take a full commit info instead of a confusing
'a
parameter (#397, @samoht) - [api] rename [Ref] into [Branch](#397, @samoht)
- [api] replace
S.read
byS.find
(#397, @samoht) - [api] replace
S.read_exn
byS.get
(#397, @samoht) - [api] add
S.kind
to check the kind of store entries (files, directories)
(#397, @samoht) - [api] remove the
View
functor, replaced by first-class support for
immutable treesS.Tree
(#397, @samoht) - [api] add
S.find_tree
to find immutable subtrees (#397, @samoht) - [api] add
S.find_all
to find contents and metadat (#397, @samoht) - [api] change
S.mem
to only check for contents, not subtree (#397, @samoht) - [api] add
S.mem_tree
to check for subtrees (similar behavior to
S.mem
inirmin.0.*
) (#397, @samoht) - [api] add
S.with_tree
for atomic update of subtrees. This
operation replaceswith_hrw_view
, but a weaker consistency
guarantee: instead of providing full seriasilabilty,S.with_tree
provides snapshot isolation, which is consistent enough for most of
the users. (#397, @samoht) - [api] rename
S.update
intoS.set
and ensure that the operation is
atomic by using a combination of test-and-set and optimistic concurrency
control. (#397, @samoht) - [api] change
S.remove
to ensure the operation is atomtic. - [api] add
S.status
to mimickgit status
. (#397, @samoht) - [api] remove all the
_id
suffixes. (#397, @samoht) - [api] add
S.merge_with_commit
andS.merge_with_branch
(#397, @samoht) - [api] more precise return type for
S.Head.fast_forward
(#401, @samoht) - [api] add
S.Commit
,S.Branch
(#401, @samoht) - [api] add
KV_MAKER
to ease the creation of store with string lists
as paths and strings as branches (#405, @samoht) - [backend] replace
RO.read
byRO.find
(#397, @samoht) - [backend] no more
RO.read_exn
(#397, @samoht) - [backend] no more
RO.iter
, replaced byRW.list
(#397, @samoht) - [backend] replace
RW.update
byRW.set
(#397, @samoht) - [backend] rename
RW.compare_and_set
intoRW.test_and_set
(#397, @samoht) - [backend] new
RW.watch
,RW.watch_key
andRW.unwatch
functions
to set-up low-level notifications (#397, @samoht)
irmin-git
- Adapt to
git.0.10.0
(#397, @samoht) - Remove the
LOCK
modules (#397, @samoht) - Rename
S.Internals
intoS.Git
(#397, @samoht) - Rename
S.Internals.commit_of_id
intoS.Git.git_commit
(#397, @samoht) - Add
S.Git.of_repo
to convert an Irmin repo into a Git repo (#397, @samoht) - Add
S.Git.to_repo
to convert a Git repo into an Irmin repo (#397, @samoht) - Expose
S.Git_mem.clear
andS.Git_mem.clear_all
for in-memory Git
backends (#397, @samoht) - Rename
Memory
intoMem.Make
(#405, @samoht) - Rename
FS
intoFS.Make
(#405, @samoht) - Remove
CONTEXT
and fold it intoIO
(#405, @samoht) - Add
Mem.KV
andFS.KV
to ease creatin of store with default
implementations for branches and paths (#405, @samoht) - Add
Mem.Ref
andFS.Ref
access tags, remotes and other Git references
(#407, @samoht) - Allow to set-up a custom
.git
path (#409, @samoht)
irmin-mirage
- Adapt to Mirage3 (@hannesm, @yomimono, @samoht)
- Rename the
Task
module intoInfo
to reflect the core API changes - Change
Info.f
to accept an optionalauthor
argument and a format
string as a message parameter (#261, #406 @samoht) - Rename
Irmin_git
intoGit
(#405, @samoht)
irmin-http
- Remove the high-level HTTP API (#397, @samoht)
- Rewrite the low-level (backend) API using
ocaml-webmachine
(#397, @samoht) - Add
KV
to ease creatin of store with default implementations for
branches and paths (#405, @samoht)
irmin-unix
- Rename
Irmin_unix.task
intoIrmin_unix.info
(#397, @samoht) - Remove
LOCK
(#397, @samoht) - Change
Irmin_unix.info
to take an optionalauthor
argument and accept
a format string as message parameter (#261, #406 @samoht) - Rename
Irmin_fs
intoFS
(#405, @samoht) - Rename
Irmin_git
intoGit
(#405, @samoht) - Rename
Irmin_http
intoHttp
(#405, @samoht)
0.12.0
0.12.0 (2016-11-17)
- Depends on irmin-watcher 0.2.0 to use portable file-system watches
(fsevents on OSX or inotify on Linux) to replace the slow and CPU
intensive file-system polling that was the default (#380, @samoht) - Do not use
Lwt_unix.fork
in the tests anymore (#383, @samoht) - Switch from Stringext to Astring (#382, @samoht)
- Fix regression in the tests for using Git over HTTP (#376, @samoht)
- Catch top-level exceptions in watch callbacks (#375, @samoht)
- Fix merge of assoc list with no common ancestor (#374, @samoht)
- Improve documentation for Git bare repositories (#363, @kayceesrk)
- New functor
Make_with_metadata
to customize the type of the
nodes metadata (#364, @samoht) - Remove mentions of private modules from the public interface
(#364, @samoht)
Fix compilation of examples
use Logs, change API of Store.Iter and of private stores, Windows support
- Use Logs (#342, @talex5)
- Improve non-unix portablity of
Irmin_fs
(#345, @samoht) - Change the signature of
Store.iter
to defer opening the
file only when needed. This was causing a file-descriptor
early exhaustion on Windows (#345, @samoht) - Fix paths for references on Windows (#345, @samoht)
- Port to
ocaml-git
1.8.0 - Rather large API change in
Irmin.Private.Contents.Store
andIrmin.Private.Commit.Store
to make it easier to
build new and efficient Irmin backends. (#346, @samoht) - Fix performance problem in the computation of LCAs (#351, @talex5)
- Fix sort order for Git trees (#352, @talex5)
support for launchd, expose `watch-rec` in the REST API, expose more type equalities
- Support for launchd: the
--address
argument of the CLI now
supports a URIlaunchd://<name>
where<name>
corresponds
to the section in the property list file (#321, by @djs55) - Expose
/watch-rec
in the REST API (#326, by @samoht) - Expose Store.Key = Contents.Path in Irmin.Maker. Otherwise,
the type of steps is abstract. (#327, by @talex5)
Git-like API
- Fix the
Irmin_mem
backend to work when equal keys might be not
structurally equal (Pervasives.(=)
is evil) - Fix
Hash.SHA1.equal
to always return true when the underlying
bigarrays are equals. Before that, this was only the case when
the wholeCstruct.t
where identical: ie. same bigarray but also
same offset in theCstruct.t
value, which is obviously not
always the case. Apply the same fix toHash.SHA1.compare
and
Hash.SHA1.hash
. - Renamed "tag" to "branch" in the API, as "tag" is confusing for Git
users.BC.tag
is nowBC.name
andBC.branch
is nowBC.head_ref
.
The various "Tag" modules are now called "Ref" ("Branch" would be
confusing here since they only store references to commits, not the
branch contents).
Note: The remote HTTP protocol still uses "tag". - Remove
Irmin_http_server.listen
. Instead, return the Cohttp
configuration for the server and let the user perform the listen. The
resulting API is simpler (removestimeout
anduri
parameters),
more flexible, and easier to use from Mirage. - Remove
Irmin.task
from API of internal stores (commit, node, etc).
Tasks are now passed explicitly to operations that need them, so it
is now explicit which operations create commits. For example, the
API now makes it clear thatlcas
doesn't change anything, while
lca
requires a task because it may create commits.
Apart from simplifying the code, this change also makes it possible to
create the internal stores once, not once per commit message.
Note: this does not affect the main BC API, so most users will see no
difference. - Remove
Irmin.Basic
. This was a functor that took a functor for making
stores and returned a functor for making stores with strings for
branch names and SHA1 for the hash. It's easier to write the
application out in full than to explain to people what it does.
This change also makes it possible for back-ends to provide extra
operations in a type-safe way. In particular,Irmin_git.Internals
has moved inside the store type and the runtime check that it is only
used with the correct store type is now enforced at compile time
instead. - Removed
AO.config
. It was only used by the removedGit.Internals
hack. - Moved
AO.create
toAO_MAKER
. - Remove dummy functions that are no longer needed with the new API:
View.task
is gone (it never did anything).View.create
is gone (it ignored both its arguments and calledView.empty
).Ir_node.Graph.Store.create
(unused, but previously required byAO
).Ir_commit.History.Store.create
(same).
- Removed the unused-and-not-exported
Ir_bc.Make
andIr_bc.MAKER
features. - Combine
Ir_bc.STORE_EXT
andIr_s.STORE
.Ir_s
was the only
consumer of theIr_bc.STORE_EXT
interface, and all it did was repack
the values to match its own interface. Now,Ir_bc
exports the final
public API directly, which simplifies the code. - Moved module types into
ir_s.mli
and removedir_s.ml
.
Before, all module types were duplicated in the .ml and .mli files. BC
stores now contain aRepo
module. ARepo.t
represents a
repository as a whole, rather than any particular branch. Operations
which do not look at the current branch have been moved to this
module. They are:branches
,remove_branch
,heads
,
watch_branches
,import
,export
, andtask_of_head
.
When updating old code, you can useBC.repo t
to get aRepo.t
from a branch.
Note thatheads
previously ensured that the current branch's head was
included in the returned set (which made a difference for anonymous
branches). This feature has been removed. In the future, the plan is
to use OCaml's GC to track which anonymous branches are still being
used and return all of them.- The internal stores (commit, node, etc) used to implement a full
BC
store are now created by the back-ends, not byIr_bc
. This allows
back-ends to use their own APIs for this. In particular, back-ends
can now share resources (such as a database connection) between
stores. Internal stores no longer need to deal withconfig
values
at all. Sync.create
now takes aRepo.t
, not aconfig
, allowing
Repo.config
to be removed and allowing sharing of the back-end's
internal state with the sync code. For example, the Git back-end
no longer needs to create a new Git store object for sync.- Change
type head
totype commit_id
.head
was confusing because
it applied to all commits, not just branch heads. Puttingid
in the
name makes it clear that this is just data and (for example) holding
an ID will not prevent the corresponding commit from being GC'd (once
we have GC).of_head
is nowof_commit_id
,task_of_head
is now
task_of_commit_id
,Internals.commit_of_head
is now
Internals.commit_of_id
andBC.Head
is nowBC.Hash
.
Remove the 1st-class module API and expose server-side transaction in the REST API
- Expose the Git compression level (#104, #298 by @samoht)
- Add an optional
config
argument to all the backend's config
functions. This allow the backends to composed more easily. (initial
patch by @nasrallahmounir, integration by @samoht) - Add signatures for immutable link store, to store links between
keys:Irmin.LINK
andIrmin.LINK_MAKER
. AddIrmin_mem.Link
and
Irmin_fs.Link
which implementIrmin.LINK_MAKER
in these backends
(initial patch by @nasrallahmounir, integration by @samoht) - Add signatures for raw values (ie. whose values are of type
Cstruct.t
):Irmin.RAW
and raw store maker:Irmin.AO_MAKER_RAW
(initial patch by @nasrallahmounir, integration by @samoht) - Expose
Irmin.Hash.digest_size
(initial patch by @nasrallahmounir,
integration by @samoht) - Expose
/view
to the REST API (#292, by @samoht) - Expose
Irmin.Private.merge_node
(#292 by @samoht) - Change the JSON stream API, which requres ezjsonm.0.4.2. (#266, #269,
#273 by @samoht) - Fix a race when a lot of processes are trying to add a watch at the
same time. (#270, #271, by @samoht) - Expose
Irmin_git.Irmin_value_store
functor. This provides the
Irmin Contents/Node/Commit APIs on top of a Git-type store. This is
useful for backends that want to store data using the Git object
format, to be able to sync with Git, but without using Git's
filesystem layout and locking. (#268 by @talex5) - Remove the first-class module API. It's confusing to duplicate the API
(#293, by @talex5)
support for lwt 2.5.0, bug fixes and content-type for the REST API
- Allow raw bodies in queries and responses for the REST API. This is
controlled by theContent-type
field set by the client:
by default, we still use JSON (or useapplication/json
) but using
application/octet-stream
will avoid having to hex-encode large
binary blobs to make them JSON-compatible. This feature is still
experimental (especially when using Git on the server) (#255) - Adapt to
ocaml-git.1.7.1
(which works withlwt.2.5.0
) - Expose
Store.config
for all the stores (AO
,RW
, etc.) - Expose
Irmin_git.Internals
to be able to get back the
Git commit objects from anhead
value (#245, #241) - Expose
Irmin.Private.remove_node
- Remove the special
__root__
filename in Irmin stores and in views
(#233)- This fixes
View.update_path
when the view contains a value at its
root. Now the updated path contains a the value stored at the root
of the view. - Writing a value to the root of a store is now an error
- Reading a value at the root of a store always return
None
- This fixes
- Make the HTTP backend re-raise the
Invalid_argument
andFailure
exceptions that were raised by the server.