irmin:
Irmin.Type.empty to represent an uninhabited type. (#961, @CraigFe)Store.Tree.concrete_t. (#1003, @CraigFe)ppx_irmin
@nobuiltin attribute, which can be used when shadowing primitive types such as unit. See README_PPX for details. (#993, @CraigFe)lib argument, which can be used to supply primitive type representations from modules other than Irmin.Type. (#994, @CraigFe)irmin:
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 two components have the same name;Irmin.Type.{field,case0,case1} will now raise Invalid_argument if the component name is not a valid UTF-8 string.Changed 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.pair int string prints as int * string. (#997, @CraigFe)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, @CraigFe)irmin-graphql
get_{contents,tree} fields having incorrect ordering (#989, @CraigFe)ppx_irmin (new):
ppx_irmin, which provides a PPX deriving plugin for generating Irmin generics.irmin-unix:
--hash parameter to the command-line interface, allowing the hash function to be specified. For BLAKE2b and BLAKE2s, the bit-length may be specified with a trailing slash, as in --hash=blake2b/16. The hash function may also be specified in the configuration file. (#898, @craigfe)irmin:
Irmin.Hash.Make_BLAKE2B and Irmin.Hash.Make_BLAKE2S functors for customizing the bit-length of these hash functions. (#898, @craigfe)iter 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 a merge function. (#926, @craigfe)irmin-pack:
integrity_check can now try to repair corrupted values. (#947, @pascutto)irmin-graphql:
irmin-pack (new):
irmin-pack, which uses a space-optimised on-disk format.irmin-graphql (new):
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)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 the Irmin test-suite. This package can now be used for new packages that implement custom backends to test their implementations against the same tests that the core backends are tested against. (#508, @zshipko)irmin-unix:
Cli module to expose some methods to simplify building command-line interfaces using Irmin. (#517, @zshipko)$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, @samoht)irmin:
Json_value and Json content types. (#516 #694, @zshipko)Irmin.Type generic hash functions. (#712, @samoht)V1 submodules in Commit, Contents and Hash to provide compatibility with 1.x serialisation formats. (#644 #666, @samoht)Store.last_modified function, which provides a list of commits where the given key was modified last. (#617, @pascutto)Content_addressable.unsafe_add function allowing the key of the new value to be specified explicitly (for performance reasons). (#783, @samoht)save_contents function for saving contents to the database. (#689, @samoht)Private.Lock now exposes a stats function returning the number of held locks. (#704, @samoht)irmin-unix:
irmin read to irmin get and irmin write to irmin set. (#501, @zshipko)irmin-git:
ocaml-git >= 2.0. (#545, @samoht)irmin-http:
CLIENT to HTTP_CLIENT and simplify the signatures necessary to construct HTTP clients and servers. (#701, @samoht)irmin-mirage
irmin-mirage into irmin-{mirage,mirage-git,mirage-graphql} to allow for more granular dependency selection. Any instances of Irmin_mirage.Git should be replaced with Irmin_mirage_git. (#686, @zshipko)irmin:
Irmin.Contents.S0 with Irmin.Type.S.Type.pre_digest -> Type.pre_hash and Type.hash -> Type.short_hash. (#720, @samoht)Irmin.Type to use incremental hash functions (functions of type 'a -> (string -> unit) -> unit) for performance reasons. (#751, @samoht)Irmin.Type.like constructor and add a new Irmin.Type.map with the previous behaviour.Irmin.Type combinators. (#550 #538 #652 #653 #655 #656 #688, @samoht)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, @samoht)export_tree to save_tree (#689, @samoht) and add an option to conditionally clear the tree cache (#702 #725, @samoht).Irmin_{fs,mem,unix}.KV to BLAKE2b rather than SHA1 for security reasons. (#811, @craigfe)Irmin.remote_uri to Store.remote, for stores that support remote operations. (#552, @samoht)batch function has been added to the backend definition to allow for better control over how groups of operations are processed. (#609, @samoht)close function has been added to allow backends to close any held resources (e.g. file descriptors for the FS backend). (#845, @samoht)Private.Node.Make parameters to use a simpler notion of 'path' in terms of a list of steps. (#645, @samoht)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 with exactly one commit. (#865, @pascutto)irmin:
pp and of_string functions from Irmin.Contents.S in favour of Irmin.Type.to_string and Irmin.Type.of_string.Bytes content type. (#708, @samoht)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)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 has to return a more complex type (#512, @samoht)-safe-string is enabled by default (#477, @djs55)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 usejbuilder` (#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:
Irmin.Tree operations: on trivial benchmarks with a lot of values, this patch introduces a 10-times speed-up (#457, @OCamlPro-Henry)Irmin.Type primitives (#458, @OCamlPro-Henry)Hash.digest to also take a type representation (#458, @OCamlPro-Henry)Irmin.Type.{encode,decode}_cstruct (#458, @OCamlPro-Henry)Irmin.Contents.RAW (#458, @OCamlPro-Henry){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)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 hexdump (#442, @samoht)Irmin.Hash.X.of_string should not raise an exception on invalid hash (#443, @samoht)irmin-mem
Irmin_mem module.irmin-fs
Irmin_fs module.irmin-git
irmin
S.Tree.find_tree to return a tree option instead of tree. This is a breaking API change but it let distinguish between the empty and non-existent cases (#431, @samoht)url#branch syntax (#432, @samoht)Irmin.Merge.idempotent for values with idempotent operations (#433, @samoht)S.repo type as an alias to the S.Repo.t (#436, @samoht)S.Tree.diff intoduced in the 1.0 release: nested differences where reported with the wrong path (#438, @samoht)irmin-unix
irmin-git
irmin
irmin-unix
irmin
irmin-unix
Major API changes:
Type).S.Tree). Transactions now only ensure snapshot isolation instead of full serialisability.KV functors which just take one parameter: the contents.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 namedocamlfind` 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 string instead of a list of strings as parameter and remove Task.add (#397, @samoht)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)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.unit, Merge.bool, Merge.char, Merge.int, Merge.int32, Merge.int64, Merge.float (#397, @samoht)Merge.option, Merge.pair, Merge.tripleandMerge.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 to avoid name-clashing with other monads (#397, @samoht)path argument from the merge functions (#397, @samoht)Path submodule in Contents.S (#397, @samoht)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) (#397, @samoht)View functor, replaced by first-class support for immutable trees S.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 to S.mem in irmin.0.*) (#397, @samoht)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)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)S.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 lists as paths and strings as branches (#405, @samoht)RO.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 functions to set-up low-level notifications (#397, @samoht)irmin-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 Git backends (#397, @samoht)Memory 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 default implementations for branches and paths (#405, @samoht)Mem.Ref and FS.Ref access tags, remotes and other Git references (#407, @samoht).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 format string as a message parameter (#261, #406 @samoht)Irmin_git into Git (#405, @samoht)irmin-http
ocaml-webmachine (#397, @samoht)KV to ease creatin of store with default implementations for branches and paths (#405, @samoht)irmin-unix
Irmin_unix.task into Irmin_unix.info (#397, @samoht)LOCK (#397, @samoht)Irmin_unix.info to take an optional author argument and accept a format string as message parameter (#261, #406 @samoht)Irmin_fs into FS (#405, @samoht)Irmin_git into Git (#405, @samoht)Irmin_http into Http (#405, @samoht)Lwt_unix.fork in the tests anymore (#383, @samoht)Make_with_metadata to customize the type of the nodes metadata (#364, @samoht)Irmin_fs (#345, @samoht)Store.iter to defer opening the file only when needed. This was causing a file-descriptor early exhaustion on Windows (#345, @samoht)ocaml-git 1.8.0Irmin.Private.Contents.Store and Irmin.Private.Commit.Store to make it easier to build new and efficient Irmin backends. (#346, @samoht)--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)/watch-rec in the REST API (#326, by @samoht)Irmin_mem backend to work when equal keys might be not structurally equal (Pervasives.(=) is evil)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.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".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.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.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.AO.config. It was only used by the removed Git.Internals hack.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).Ir_bc.Make and Ir_bc.MAKER features.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.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.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.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.config argument to all the backend's config functions. This allow the backends to composed more easily. (initial patch by @nasrallahmounir, integration by @samoht)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)Cstruct.t): Irmin.RAW and raw store maker: Irmin.AO_MAKER_RAW (initial patch by @nasrallahmounir, integration by @samoht)Irmin.Hash.digest_size (initial patch by @nasrallahmounir, integration by @samoht)/view to the REST API (#292, by @samoht)Irmin.Private.merge_node (#292 by @samoht)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)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)ocaml-git.1.7.1 (which works with lwt.2.5.0)Store.config for all the stores (AO, RW, etc.)Irmin_git.Internals to be able to get back the Git commit objects from an head value (#245, #241)Irmin.Private.remove_nodeRemove the special __root__ filename in Irmin stores and in views (#233)
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.NoneInvalid_argument and Failure exceptions that were raised by the server.Irmin.update_tag for HTTP clientsMirage_irmin.KV_RO to surface an Irmin store as a read-only key/value store implementing `V1_LWT.KV_RO (#107)Irmin.SYNCocaml-git.1.6.0-, _, '.' and /) (#186)Irmin.clone. (#221)X-IrminVersion header - the server might decide to enfore the version check or not. The server always reply with its version in the JSON reply, using a version field. The client might use that information to bail out nicely instead of failing because of some random unmarshalling errors due to API changes (#167)git fsck and git gc complain a lot (with good reasons) and do some fency things with git index. The regression has been introduced while trying to fix #190 (the fix is in #229)Irmin.Private.Watch.listen_dir and Irmin.Private.Watch.set_listen_dir_hook synchronous.alcotest >= 0.4. This removes the dependency towards OUnit and nocrypto for the tests.Irmin.export for the HTTP backend (#196, patch from Alex Zatelepin)Irmin.export (#196, patch from Alex Zatelepin)Task.empty (the empty task) and Task.none (the empty task constructor)Completely rewrite the notification mechanism. All the watch functions now take a callback as argument and return a de-allocation function. The callbacks receive a heads values (the last and current ones) and diff values. (#187)
Irmin.watch_head to watch for the changes of the current branch's headIrmin.watch_tags to watch for the changes of all the tags in the storeIrmin.watch_key to watch for the changes of the values associated to a given key (this is not recursive anymore).View.watch_path to watch for the changes in a subtree. The function return views and the user can use View.diff to compute differences between views if needed.View.remove to clean-up empty directories (#190)View.make_head (#188)Irmin.empty (#161)Irmin.Snapshot. Nobody was using it and it can be easily replaced by Irmin.head, Irmin.watch_head and Irmin.update_head.Irmin.iter to include the values and move it into the Irmin.RO signature.Irmin.fast_forward_head (#172)Irmin.compare_and_set_head (#171)Irmin.update and Irmin.merge are atomic.Irmin.clone of an empty branchIrmin.RW.compare_and_test that the backends now have to implement to guarantee atomicity of Irmin's high-level operations.Irmin.Private.Lock to provide per-handler, per-key locking. This can be used by backend to implement simple locking policies.Lwt.t to the return type of Irmin.tag and Irmin.tag_exn_exn function raise Invalid_argument (#144)Irmin.switch and Irmin.detachIrmin.history to get the branch history as a DAG of heads (#140).Irmin.Merge.promise combinatorsIrmin.watch_tags to monitor tag creation and desctructions.Irmin.pushIrmin.with_hrw_view to easily use transactions.Irmin.t to denote the store capabilities read-only, read-write or branch-consistent.~old argument of a merge function can now be optional to signify that there is no common ancestor.Irmin.with_rw_view to create a temporary, in-memory and mutable view of the store. This can be used to perform atomic operations in the store (ie. non-persistent transactions).unit -> 'a result Lwt.t argument for ~old (instead of 'a). Evalutating the function will compute the least-common ancestors. Merge functions which ignore the old argument don't have to pay the cost of computing the lcas anymore.S.lca to get the least common ancestorsS.of_head for the HTTP client (regression introduced in 0.9.0)Views introduced in 0.9.0. (thx @buzzheavyyear for the report)Irmin.update Irmin.remove, Irmin.remove_rec) even if the contents' store have not changed.None).('key, 'value) Irmint.t instead of 'value Irmin.t.merge functions now take the current filename being merged as an additional argument.Contents should expose a Path sub-module. Keys of the resulting Irmin store will be of type Path.t.irmin init --help. (#103)Origin into Task and use it pervasively through the API.git/HEAD (#76)remove_rec to remove directories (#74, #85)core_kernel (#22, #81)cryptokit and sha1and usenocrypto` instead--full on the command-lineor or ?full=1 on the web interface)dot when dumping a graph on the command-line. dot does not like big graphs, but that's still useful to have the .dot file to analyze it.open Irmin_unix at the top of your file and use less functor in your code (again, check the examples)IrminMemory.Make to return an hanlder to a shared datastore instead of creating a fresh one. Add IrminMemory.Fresh to return a fresh in-memory datastore maker.refs/heads/ anymore)IrminTree to IrminNode to reflect the fact that we can support arbitrary immutable graphs (it's better if they are DAGs but that's not mandatory)IrminBlob to IrminContents to reflect the fact that we also support structured contents (as JSON objects)irmin watch works now for all backends.irmin fetch command: we can now choose the backend to import the data inslow tests execution timeIRMIN to configure its default backendLwt_bytes and Lwt_unix instead of the custom-made IrminChannelbin_prot instead of a custom binary protocolValue is now Blob, Revision is now Commit and Tag becomes Reference (rational: consistency with Git names)core_kernel instead of building a custom Identiable.Sdolog instead of a custom log librarymstruct (mutable buffers on top of cstruct) which is now released independentlyezjsonm and alcotest libraries