Skip to content

Releases: ocaml-tracing/ambient-context

0.2

12 Feb 01:30
b12dcd5

Choose a tag to compare

CHANGES:

Breaking changes:

  • Simplified API with renamed functions:

    • create_key()new_key()
    • with_bindingwith_key_bound_to
    • without_bindingwith_key_unbound
    • set_storage_providerset_current_storage
  • Storage type changed from first-class module to record:

    • Old: type storage = (module STORAGE)
    • New: Storage.t record type
  • Key type simplified:

    • Old: type 'a key = int * 'a Hmap.key
    • New: type 'a key = 'a Hmap.key

Migration guide:

(* Old code *)
let k = Ctx.create_key () in
Ctx.set_storage_provider (Ambient_context_lwt.storage ()) ;
Ctx.with_binding k "value" @@ fun () -> ...

(* New code *)
let k = Ctx.new_key () in
Ctx.set_current_storage Ambient_context_lwt.storage ;
Ctx.with_key_bound_to k "value" @@ fun () -> ...

0.1.1

19 Jan 18:13
df99bd1

Choose a tag to compare

CHANGES:

re-release after github broke the release archive, this time using dune-release to avoid it in the future