Skip to content

Releases: mirage/irmin

1.0.2

31 Mar 11:47
Compare
Choose a tag to compare

1.0.2 (2017-03-27)

irmin

  • Add a cstruct type combinator (#429, @samoht)
  • Fix regression introduced in 1.0.1 on merge of base buffers (strings,
    cstruct). For these types, updates are idempotent, e.g. it is fine
    if two concurrent branches make the same update. (#429, @samoht)

irmin-unix

1.0.1

14 Mar 17:03
Compare
Choose a tag to compare

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

23 Feb 15:32
Compare
Choose a tag to compare

1.0.0 (2017-02-21)

Major API changes:

  • It is now simpler to define mergeable contents, using new
    combinators to describe data-types (see Type).
  • The mutable views have been replaced by immutable trees, and made
    first-class citizen in the API (see available S.Tree).
    Transactions now only ensure snapshot isolation instead of full
    serialisability.
  • Creating a store with default path and branch implementations
    is now easier using the KV 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 in irmin.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 and RW, the frontend provides S.

The package is also now split into 5 opam packages: irmin, irmin-git, irmin-http,irmin-unixandirmin-miragewith similarly named ocamlfind` libraries.

More detailled changes:

irmin

  • [info] rename Task into Info 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): change Task.messages into Info.message, take a string
    instead of a list of strings as parameter and remove Task.add
    (#397, @samoht)
  • [info] change Info.f to only takes unit as argument. Previously
    it was taken an 'a which was used by the update functions. The
    update functions now take a full Info.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 into Merge.MultiSet (#397, @samoht)
  • [merge] simplify and rename Merge.set into Merge.Set (#397, @samoht)
  • [merge] rename Merge.OP into Merge.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 in Contents.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 by S.find (#397, @samoht)
  • [api] replace S.read_exn by S.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 trees S.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 in irmin.0.*) (#397, @samoht)
  • [api] add S.with_tree for atomic update of subtrees. This
    operation replaces with_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 into S.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 mimick git status. (#397, @samoht)
  • [api] remove all the _id suffixes. (#397, @samoht)
  • [api] add S.merge_with_commit and S.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 by RO.find (#397, @samoht)
  • [backend] no more RO.read_exn (#397, @samoht)
  • [backend] no more RO.iter, replaced by RW.list (#397, @samoht)
  • [backend] replace RW.update by RW.set (#397, @samoht)
  • [backend] rename RW.compare_and_set into RW.test_and_set (#397, @samoht)
  • [backend] new RW.watch, RW.watch_key and RW.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 into S.Git (#397, @samoht)
  • Rename S.Internals.commit_of_id into S.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 and S.Git_mem.clear_all for in-memory Git
    backends (#397, @samoht)
  • Rename Memory into Mem.Make (#405, @samoht)
  • Rename FS into FS.Make (#405, @samoht)
  • Remove CONTEXT and fold it into IO (#405, @samoht)
  • Add Mem.KV and FS.KV to ease creatin of store with default
    implementations for branches and paths (#405, @samoht)
  • Add Mem.Ref and FS.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 into Info to reflect the core API changes
  • Change Info.f to accept an optional author argument and a format
    string as a message parameter (#261, #406 @samoht)
  • Rename Irmin_git into Git (#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

0.12.0

17 Nov 11:41
Compare
Choose a tag to compare

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

28 Aug 10:54
Compare
Choose a tag to compare

use Logs, change API of Store.Iter and of private stores, Windows support

04 May 11:07
Compare
Choose a tag to compare
  • 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
    and Irmin.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

04 May 09:23
Compare
Choose a tag to compare
  • Support for launchd: the --address argument of the CLI now
    supports a URI launchd://<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

14 Oct 20:56
Compare
Choose a tag to compare
  • 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 whole Cstruct.t where identical: ie. same bigarray but also
    same offset in the Cstruct.t value, which is obviously not
    always the case. Apply the same fix to Hash.SHA1.compare and
    Hash.SHA1.hash.
  • Renamed "tag" to "branch" in the API, as "tag" is confusing for Git
    users. BC.tag is now BC.name and BC.branch is now BC.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 (removes timeout and uri 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 that lcas 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 removed Git.Internals hack.
  • Moved AO.create to AO_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 called View.empty).
    • Ir_node.Graph.Store.create (unused, but previously required by AO).
    • Ir_commit.History.Store.create (same).
  • Removed the unused-and-not-exported Ir_bc.Make and Ir_bc.MAKER
    features.
  • Combine Ir_bc.STORE_EXT and Ir_s.STORE. Ir_s was the only
    consumer of the Ir_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 removed ir_s.ml.
    Before, all module types were duplicated in the .ml and .mli files.
  • BC stores now contain a Repo module. A Repo.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, and task_of_head.
    When updating old code, you can use BC.repo t to get a Repo.t
    from a branch.
    Note that heads 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 by Ir_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 with config values
    at all.
  • Sync.create now takes a Repo.t, not a config, 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 to type commit_id. head was confusing because
    it applied to all commits, not just branch heads. Putting id 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 now of_commit_id, task_of_head is now
    task_of_commit_id, Internals.commit_of_head is now
    Internals.commit_of_id and BC.Head is now BC.Hash.

Remove the 1st-class module API and expose server-side transaction in the REST API

30 Sep 17:17
Compare
Choose a tag to compare
  • 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 and Irmin.LINK_MAKER. Add Irmin_mem.Link and
    Irmin_fs.Link which implement Irmin.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

14 Aug 13:36
Compare
Choose a tag to compare
  • Allow raw bodies in queries and responses for the REST API. This is
    controlled by the Content-type field set by the client:
    by default, we still use JSON (or use application/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 with lwt.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 an head 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
  • Make the HTTP backend re-raise the Invalid_argument and Failure
    exceptions that were raised by the server.