[ANN] v0.12 release of Jane Street packages

Dear OCaml developers,

We are happy to announce the v0.12 release of Jane Street packages!

This release comes with a lot of changes, as we ship 19 new
packages, and have enhanced and refactored a number of existing
ones. The documentation for this release is available on our
website:

https://ocaml.janestreet.com/ocaml-core/v0.12/doc/

The remainder of this mail highlights the main changes since the v0.11
release; we hope it will be useful to developers in the process of
migrating to the new version. A comprehensive change log is available
at the end.

Comparison and Equality

  • The ~cmp argument used to pass a comparison function has been renamed to ~compare.

  • The ~equal label of functions List.equal and Array.equal has been removed.

New packages

Deprecations

Async:

  • Deprecated Scheduler.add_busy_poller.

Base:

  • Deprecated Applicative's Args* module types and Make_args* functors, which have been superseded by the let%map syntax.

  • Deprecated Array.replace.

Core_kernel:

  • Deprecated Obj_array, replacing uses with Uniform_array.

  • Deprecated the Timing_wheel_ns.Priority_queue module, with no intended replacement.

No longer released:

  • async_extended.

  • async_parallel.

  • configurator.

  • findlib_top.

  • incremental_kernel.

  • jane-street-tests.

  • jenga.

  • ppx_ast.

  • ppx_core.

  • ppx_driver.

  • ppx_metaquot.

  • ppx_traverse.

  • ppx_traverse_builtins.

  • ppx_type_conv.

Moves

Async:

  • Moved Weak_hashtbl module out of Async to its own library.

  • Moved Lock_file to a single-module library, Lock_file_async.

  • Moved Async_extra.Udp to a standalone library, Async_udp.

Async_extended:

  • Moved modules out of Async_extended into their own libraries, aimed at deleting Async_extended.

Async_kernel:

  • Moved the Limiter module to a single-module library, Limiter_async.

  • Moved Eager_deferred to a standalone library.

Async_unix:

  • Moved modules to standalone libraries: Thread_pool, Thread_safe_ivar, Thread_safe_pipe.

Base:

  • Moved the Heap_block module to Core_kernel.

  • Added top-level module Base.Sign_or_nan, moved out of Float

  • Added Stack module, moved in from Core_kernel.

  • Added Base.Bigstring module, moving in most of Core_kernel.Bigstring.

  • Added the Base_bigstring library, splitting out the Bigstring module from Base.

Core:

  • Moved some modules out of Core to their own library: Crc, Piecewise_linear, Syslog, Timing_wheel_float, Weak_hashtbl.

  • Moved modules Schedule_v4_deprecated and Schedule_v5 out of Core and to their own libraries.

  • Moved the Daemon module, to a single-module library.

  • Moved the Uuid module out of Core, to a single-module library.

  • Moved Lock_file to a single-module library, Lock_file_blocking.

  • Moved the Mac_address module out of Core, to a single-module library.

  • Moved modules out to standalone libraries: Nano_mutex, Squeue.

Core_kernel:

  • Added Time_ns.Ofday submodule, moved from Core.

  • Moved module Unpack_buffer out of Core_kernel and into its own
    library.

  • Moved the implementation of Quickcheck into its own library, Base_quickcheck.

  • Moved the Limiter module to a single-module library.

  • Moved the Bucket module out to a single-module library.

  • Split out a Config_h library for generating the config.h file that many libraries (including Core_kernel) use.

  • Moved the Weak_pointer module to a standalone library.

  • Moved modules out to standalone libraries: Force_once, Hash_heap, Int_set, Rope, Thread_safe_queue, Total_map, Weak_array.

Incremental:

  • Made Incremental be the library name rather than Incremental_lib, and moved all modules from Incremental_lib to submodules of Incremental.

  • Merged the Incremental and Incremental_kernel libraries into a single library, Incremental.

  • Moved the Balanced_reducer module out of Incremental, to a single-module library.

Sexplib:

  • Moved Sexplib.Macro to its own library Sexp_macro.

ppx:

Changelog

Async:

  • Improved Async scheduler fairness by calling Thread.yield every cycle, which releases the OCaml lock if any other OCaml threads are waiting to acquire it.

  • Renamed Pipe.merge's ~cmp argument as ~compare.

  • In Async_rpc, fixed a couple places that had assumed that bin-prot writers raise Buffer_short when out of space, which isn’t always the case; instead used a wildcard match.

  • Increased Unix.listen's default backlog from 10 to 64, to reduce occurrences of TCP clients getting Unexpected EOF errors when the listening server is busy.

  • Added an optional argument to Pipe functions fold and iter so they can consider a value flushed when it is processed by the supplied ~f rather than when it is read out of the pipe.

  • Added function Tcp.Server.close_finished_and_handlers_determined.

  • Moved Weak_hashtbl module out of Async to its own library.

  • Changed Time_source so that it fires alarms that were added at the same time in the order they were added.

  • Added Writer submodule Backing_out_channel, which can be used to redirect and collect a writer’s output.

  • Optimized a comparison in the Async scheduler’s time-stamp-counter calibration to use an immediate comparison rather than caml_int_compare.

  • Moved Async_unix tests from the src directory to the test directory.

  • Added to Log.Output.stdout and stderr functions an optional argument, ?format:Format.t.

  • Added function Log.Output.filter_to_level, which gives a new log output that filters out messages more verbose than the specified level.

  • Optimized some code in the Async scheduler to make better use of the instruction cache.

  • Added to Monitor.protect an optional argument, ?extract_exn : bool.

  • Removed from the Async_unix library a top-level effect that set Async_kernel_config.task_id; instead set task_id when the Async scheduler is started.

  • Removed Writer.write_marshal, moving it to the one place where it was used, Async_parallel_deprecated.

  • Added to Synchronous_time_source.Event the ability to create unscheduled events and to re-use of unscheduled events or events that have happened or been aborted.

  • Added function Writer.use_synchronous_stdout_and_stderr, which causes all subsequent writes to stdout and stderr to occur synchronously.

  • Moved Lock_file to a single-module library, Lock_file_async.

  • Added function Synchronous_time_source.Event.schedule_at_intervals.

  • Opted in to ocamlformat.

  • Added support for configuring the cpu affinity of Async’s thread
    pool.

  • Refactored Unix.wait's implementation so that one can call wait but have it not install a SIGCHLD handler.

  • Added Rpc client function that exposes the Socket.Address.t of the RPC server connected to.

  • In Reader.load_sexp* functions, removed the ?expand_macros:bool argument, moving that functionality to the Sexp_macro library.

  • Fixed a bug in Tcp that was causing SO_REUSEADDR to always be set.

  • Changed Unix.Passwd functions to stop using In_thread.run, which was pointless because the underlying C code doesn’t release the OCaml lock.

  • Added function Scheduler.total_cycle_time : unit -> Time_ns.Span.t, which returns the total wall-clock time spent running Async cycles.

  • Added to Time_source.advance_by_alarms an optional argument, ?wait_for:(unit -> unit Deferred.t), which allows the caller to control when advance_by_alarms proceeds to the next alarm time.

  • Fixed a potential segfault in Unix.Group.getby{gid,name} functions by changing them to not us In_thread.run, which avoids a bug in the OCaml stdlib’s getgrgid C wrapper.

  • Added Reader functions that operate on whatever is in the reader’s buffer already, without performing I/O: bytes_available, peek_available, read_available.

  • Deprecated Scheduler.add_busy_poller.

  • Improved the implementation of Reader.read_one_iobuf_at_a_time to use Iobuf.Expert.reinitialize_of_bigstring.

  • Added module Deferred.Or_error.Expect_test_config.

  • Removed some noise from Rpc_transport_low_latency error messages.

  • Added to the Log module convenience functions for logging sexps: raw_s, info_s, error_s, debug_s.

  • Moved Async_extra.Udp to a standalone library, Async_udp.

  • Improved error handling in the Rpc_transport_low_latency module.

Async_extended:

  • Moved modules out of Async_extended into their own libraries, aimed at deleting Async_extended.

Async_inotify:

  • Fixed race conditions that caused Events for an unknown watch.

Async_kernel:

  • Extended the allowed range of the Async scheduler’s max_inter_cycle_timeout to include zero, which can improve latency because it causes the scheduler’s call to epoll to not give up the OCaml lock.

  • Moved Async_kernel tests from src directory to the test directory, which reduces code size.

  • Exposed Eager_deferred_or_error.List submodule.

  • Added function Pipe.fork, which takes a Pipe.Reader.t and returns a pair of readers, transferring each of the values from the input to both of the output readers.

  • Removed some Obj.magic from the implementation of Ivar that is no longer necessary now that constructors can have inline records.

  • Moved the Limiter module to a single-module library, Limiter_async.

  • Added function Synchronous_time_source.alarm_upper_bound.

  • In Synchronous_time_source, disallowed rescheduling of a previously aborted event while it is waiting to run. This fixes a bug that would cause an infinite loop.

  • Changed Deferred.Memo to use Staged.t to make staging explicit.

  • Improved Deferred.Memo.general to not require its key to support t_of_sexp.

  • Added function Deferred.Or_error.repeat_until_finished.

  • Added Deferred.Result functions fail and failf.

  • Moved Eager_deferred to a standalone library.

  • Fixed a memory leak in Pipe.values_available, by having repeated calls share the same deferred.

  • Added to Monitor.protect an optional argument, ?run:[`Now | `Schedule], like Monitor.try_with.

  • Restricted the type of Deferred.any_unit, changing it from _ t list -> unit t to unit t list -> unit t.

Async_rpc_kernel:

  • Added submodule Versioned_rpc.Both_convert.State_rpc, the only conversion-kind and rpc-kind combination missing from versioned rpcs.

Async_unix:

  • Made Async raise if the creation of the first thread-pool thread fails.

  • Improved Async’s thread-pool-stuck message.

  • Changed the Async scheduler’s implementation of the set of file descriptors that need to be updated in the file-descr watcher from a list to a Stack.t.

  • Changed Unix.Group and Unix.Passwd functions’ implementation to use In_thread.run, since the underlying Core.Unix functions have been changed to be thread safe and to release the OCaml lock.

  • Moved modules to standalone libraries: Thread_pool, Thread_safe_ivar, Thread_safe_pipe.

Base:

  • Removed the Or_error.Ok module, which matched the Container interface.

  • Removed the Ref module’s support for the Container interface.

  • In the Sequence module, renamed the labeled argument cmp to compare, following the rest of Base.

  • Deprecated the String.copy function, now that we use safestring. String.copy is already deprecated in stdlib.

  • Optimized String functions (concat, sub, and tr) to eliminate unnecessary allocation of the result string.

  • Added Blit.Make_to_string functor and Buffer.To_string submodule, for blitting to a string.

  • Added to the Applicative.S interface a map operator, >>|.

  • Added functor Applicative.Make_let_syntax, which generates the Let_syntax module for use with let%map.

  • Added function List.partition_result : ('ok, 'error) Result.t t -> 'ok t * 'error t.

  • Changed Base.raise to use the %raise primitive, so that the compiler can automatically rewrite %raise by %reraise when appropriate.

  • Added Array functions of_list_mapi, of_rev_list_mapi.

  • Optimized Array looping functions to remove allocation: exists, find_map, foldi, for_all, etc.

  • Added *_pow2 and *_log2 functions to Int_intf.S and implemented them for all integer modules: floor_pow2, ceil_pow2, is_pow2, floor_log2, ceil_log2.

  • Moved the Heap_block module to Core_kernel.

  • Made List.drop and List.drop_while tail recursive.

  • Optimized Hash_set.to_array, removing an intermediate list.

  • Optimized Sign comparison functions to be the type-specific versions, rather than the polymorphic ones.

  • Added top-level module Base.Sign_or_nan, moved out of Float

  • Made Bool implement the Identifiable.S interface.

  • For Container's sum function, added the Container.Summable interface, replacing Commutative_group.

  • Improved Type_equal.Id.sexp_of_t, reducing noise, especially in tests.

  • Changed List.equal and Array.equal, removing the ~equal label from their argument. This makes them like compare functions, and is in preparation for changing [@@deriving compare] to also derive equality functions.

  • Changed the type of List.sort from compare:('a -> 'a -> int) -> 'a t -> 'a t to 'a t -> compare:('a -> 'a -> int) -> 'a t.

  • Added Stack module, moved in from Core_kernel.

  • Deleted the Applicative.Const functor.

  • Optimized Lazy.compare to immediately return true if its arguments are phys_equal.

  • Deprecated Applicative's Args* module types and Make_args* functors, which have been superseded by the let%map syntax.

  • Added Field functions map and update.

  • Reworked the type of Ordered_collection_common.get_pos_len{,_exn}.

  • Optimized String.contains, eliminating unnecessary allocation and bounds checks.

  • Deprecated Array.replace.

  • Added String.Search_pattern function val matches : t -> string -> bool.

  • Optimized Hashtbl.mapi_inplace, making it up to 4 to 8 times faster.

  • Implemented Queue.of_array in terms of Queue.init.

  • Added swap function to Obj_array, Option_array, and Uniform_array.

  • For JavaScript, added a const annotation to the appropriate JavaScript primitives.

  • Fixed Int.Hex.of_string and related functions to not silently ignore a suffix of non-hexadecimal garbage.

  • Optimized Obj_array.set functions, removing an unnecessary check that the array is a float array.

  • Changed Option_array.value_exn to generate smaller code.

  • Change List.zip's return type from ('a * 'b) list option to ('a * 'b) list List.Or_unequal_lengths.t.

  • Added to Or_error.of_exn_result an optional ?backtrace argument.

  • Stopped exporting the Popcount module, in favor of functions in Int* modules.

  • Reimplemented List.take and take_while to avoid allocating an extra tuple.

  • Reworked String's implementation to not use Set.

  • Optimized Stack.to_array to not create an intermediate list.

  • Extended the Container.Make functor to allow one to supply a custom length function that supersedes the definition in terms of fold.

  • Added Base.Bigstring module, moving in most of Core_kernel.Bigstring.

  • Added [@@deriving equal] for primitive types (bool, char, int, etc.).

  • Optimized Array.sort, removing some unnecessary allocation,

  • Made am_testing be true in .mlt files.

Base_bigstring:

  • Added the Base_bigstring library, splitting out the Bigstring module from Base.

Bin_prot:

  • Improved the error message for integer-deserialization overflow on 32-bit platforms.

  • Switched bin_shape.ml to using Base rather than reimplementing a small fragment of it.

Core:

  • Changed Time.Zone.local to call Sys.getenv "TZ" eagerly so that modifications to the environment (e.g. modifying TZ to change the behavior of strftime) cannot change which time zone is considered “local”.

  • Added function Unix.map_file, for memory mapping a file as a big array.

  • Added new stable versions for Time_ns.Span and Time.Span, that round trip precisely. Changed the unstable string and sexp format; new code can read the old format but old code can not read the new format.

  • Added Md5.digest_bigstring and used it to implement a more efficient version of Md5.digest_bin_prot.

  • Changed Command.Spec.Arg_type.comma_separated to take a required argument, [allow_empty:bool].

  • Optimized Time_stamp_counter.Calibrator.calibrate to not allocate.

  • Moved some modules out of Core to their own library: Crc, Piecewise_linear, Syslog, Timing_wheel_float, Weak_hashtbl.

  • Changed Unix.symlink's argument labels from ~src ~dst to target and link_name, matching Unix.link.

  • Moved modules Schedule_v4_deprecated and Schedule_v5 out of Core and to their own libraries.

  • Moved Core tests from src directory to test directory.

  • Extended Time_stamp_counter's interface to match Comparisons.S, with implementation as Int63 comparisons.

  • Made the Command module satisfy the Applicative.Let_syntax interface.

  • Changed Lock_file's lock-file format to include the process start time, to avoid collisions. New code can read old lock files but old code can not read new lock files, and will report unknown lock file format if it encounters a stale lock file.

  • Added Unix.sysconf value CLK_TCK.

  • Added to Time_ns.Ofday a Zoned submodule, similar to Time.Ofday.Zoned.

  • Added function Linux_ext.sched_getaffinity.

  • Added function Sys.unsafe_getenv, intended for use in setuid and setgid executables.

  • Changed Command.Arg_type.comma_separated's allow_empty argument to be optional, with default false.

  • Moved the Daemon module, to a single-module library.

  • Renamed some Iobuf functions to clarify which ones truncate integers.

  • Removed Core.Std, which has been deprecated for over a year.

  • Added Core_stable modules Bool, List, Option, and Sexp.

  • Added to Unix.create_process_env an optional argument ?argv0 : string.

  • Moved the Uuid module out of Core, to a single-module library.

  • Moved Lock_file to a single-module library, Lock_file_blocking.

  • Moved the Mac_address module out of Core, to a single-module library.

  • Added Command.Arg_type values for Time_ns analogous to existing Time ones.

  • Removed some code from Bigstring that was duplicative of Core_kernel.Bigstring.

  • Moved values out of Command.Arg_type and into their respective modules. E.g. Arg_type.file became Filename.arg_type.

  • Added Iobuf function protect_window_and_bounds_1.

  • Added Thread functions getaffinity_self_exn and setaffinity_self_exn.

  • Added to Command.run an optional argument, ?verbose_on_parse_error : bool, that controls whether to print a line suggesting the user try the -help flag when an exception is raised while parsing the arguments.

  • Fixed Command autocompletion to work for setuid programs; executables were failing to notice that completion was being requested, and were thus reporting a missing subcommand error.

  • Fixed Time_stamp_counter.Calibrator to work when time goes backwards.

  • Added to Unix.exec and fork_exec the ability to remove environment variables for the new process.

  • Optimized Iobuf.Peek.char, by adding [@inline] annotations.

  • Extended Command so that a help-for-review.org file can be computed with a single call to the executable, rather than a call for every subcommand.

  • Changed Linux_ext.bind_to_interface's second argument to be an ordinary variant type, Bound_to_interface.t.

  • Added a test to help us keep Core's exports in sync with Core_kernel's exports.

  • Added to Unix.create_process_env an optional parameter, prog_search_path, to control the search path for the program to be executed.

  • Eliminated 3ms of program startup time by making Time_stamp_counter calibration lazy.

  • Added Linux_ext.Extended_file_attributes submodule, with wrappers for the getxattr and setxattr syscalls.

  • Made Time_stamp_counter functions’ calibrator argument required instead of optional.

  • Added Version_util.Version.parse function, for parsing a single version line.

  • Moved modules out to standalone libraries: Nano_mutex, Squeue.

Core_kernel:

  • Added function List.zip_with_remainder, which returns both the zipped and unzipped elements.

  • Exposed Map.comparator_s function, which was previously added to Base.Map.

  • Added Time_ns.Ofday submodule, moved from Core.

  • Made Time_ns.Span be stringable and sexpable, and added a Stable.V2 submodule, all moved from Core. Deprecated the Alternate_sexp module.

  • Added Univ_map.of_alist_exn function.

  • Optimized Int63.Replace_polymorphic_compare to use the Int63 comparisons directly, rather than defined via a functor.

  • Removed from Time.Ofday's and Time_ns.Ofday's interface Comparable.With_zero; one shouldn’t think of Ofday values as signed.

  • Renamed Time.Ofday.to_millisec_string to to_millisecond_string, for consistency with Time_ns.

  • Renamed Time.Ofday.of_span_since_start_of_day to of_span_since_start_of_day_exn, for consistency with Time_ns.

  • Generalized Time.Span.randomize so that Time_ns can share its implementation.

  • Updated Time.Span.to_short_string to render “24h” as “1d”, and to go down to nanosecond granularity.

  • Fixed a couple of incorrect deprecations in Substring, on of_string and of_bigstring.

  • Updated Time_ns.Ofday to provide Ofday_intf.S.

  • Made polymorphic Hash_set support [@@deriving sexp_of].

  • Exported Buffer module, from Base.

  • Moved module Unpack_buffer out of Core_kernel and into its own library.

  • Updated Quickcheck generators and observers to have named state arguments (PRNG and hash state).

  • Extended Hashtbl, Map, and Set to support the Base style of [@@deriving hash], e.g. type t = float Map.M(Int).t [@@deriving hash].

  • Moved the implementation of Quickcheck into its own library, Base_quickcheck.

  • Added function Bigstring.memcmp.

  • Fixed issues in Bigstring.unsafe_destroy_and_resize that could lead to segfaults.

  • Made Sequence.t and Sequence.Step.t support [@@deriving bin_io].

  • Moved some Time_ns functions from Core to Core_kernel: of_time, to_time, Span.of_span, Span.to_span.

  • Added function Memo.of_comparable, which uses a module matching Comparable.S_plain to memoize a function.

  • Changed Sexp_maybe to use Error's comparison functions rather than polymorphic ones.

  • Exported in Core_kernel quickcheck bindings for built-in types.

  • Moved the Limiter module to a single-module library.

  • Moved the Bucket module out to a single-module library.

  • Merged Core.Md5 into Core_kernel.Md5.

  • Added submodule Unit.Stable.V1.

  • Added function Byte_units.to_string_short.

  • Split out a Config_h library for generating the config.h file that many libraries (including Core_kernel) use.

  • Added function Char.gen_uniform_inclusive : t -> t -> t Quickcheck.Generator.t.

  • Added Filename module, moving in most of the code from Core.Filename.

  • Added Hash_queue functions enqueue_front, enqueue_back, lookup_and_move_to_front.

  • Added Command module, moving in most of Core.Command.

  • Removed the Pooled_hashtbl module, moving it to a single-module library.

  • Improved Command.choose_one's error message.

  • Changed module type Hash_heap.Key from Hashtbl.Key to Hashtbl.Key_plain.

  • Deprecated Obj_array, replacing uses with Uniform_array.

  • Renamed Time submodule Relative_to_unspecified_zone as Date_and_ofday.

  • Deprecated Timing_wheel_ns function alarm_upper_bound, in favor of max_allowed_alarm_time, which is clear about the inclusiveness of its bound.

  • Deprecated the Timing_wheel_ns.Priority_queue module, with no intended replacement.

  • Added Tuple.Comparable_plain functor.

  • Added Command.Param functions map_anons and map_flag, analogs of the corresponding Spec functions.

  • Deprecated Command.Spec.flags_of_args_exn, which isn’t used.

  • Deprecated Command.Spec functions const and pair, which have Param counterparts.

  • Added submodule Map.Stable.Symmetric_diff_element.V1.

  • Added to Timing_wheel_ns.create an optional argument, ?capacity : int, for preallocating the underlying pool.

  • Added Bigstring.memset function.

  • Made Date.t have [@@deriving typerep].

  • Changed the precision of Time_ns strings and sexps from 6 digits to 9 digits.

  • Removed Timing_wheel_ns.Priority_queue.

  • Optimized Memo, removing a closure allocation that had occurred on each call to the memoized function.

  • Added Time_ns functions next and prev.

  • Opted in to ocamlformat.

  • Refactored Command.Path and renamed some of its functions.

  • Changed Command.Path to retain the dirname of executables.

  • Extended Hash_queue to support the use of an alternate hash-table implementation.

  • Added Rope functions is_prefix and to_char_sequence.

  • Made String.Stable match Stable_containers.Hashable.V1.S.

  • Added function Date.week_number_and_year, for the ISO 8601 week number and week-numbering year.

  • Extended String_id.Stable.V1 to match Stable_containers.Hashable.V1.S.

  • Added a test to help us keep Core_kernel's exports in sync with Base's exports.

  • Added to Doubly_linked a number of utility functions: map, filter_map, filter_inplace, map_inplace, etc.

  • Added function Set_once.set_if_none.

  • Changed Hash_queue.dequeue* functions to match then enqueue* functions, making it clear whether the element is being removed from the front or the back.

  • Added Hash_queue.drop* functions.

  • Added to Flags unstable bin_io.

  • Added [@@deriving equal] for primitive types (bool, char, int, etc.).

  • Added type Filename.t = string.

  • Added Bigstring.Stable and Unstable submodules, removing serialization from Bigstring.t.

  • Exposed type equality Flags.Unstable.t = Flags.t.

  • Moved Time_ns.now functionality to a standalone library, Time_now.

  • Added Hexdump.Pretty submodule, which renders strings directly, only using hexdump format if necessary.

  • Moved the Weak_pointer module to a standalone library.

  • Reworked the Byte_units module.

  • Abstracted the heap from Sequence.merge_all, so it can be used with multiple heap implementations.

  • Added to String_id.S [@@deriving equal].

  • Made conversions between Time and Time_ns round as precisely as possible rather than to the nearest microsecond.

  • Moved modules out to standalone libraries: Force_once, Hash_heap, Int_set, Rope, Thread_safe_queue, Total_map, Weak_array.

Expect_test_helpers:

  • Added val sexp_style : Sexp_style.t ref, to configure the style print_s uses to format sexps.

  • Added to Expect_test_helpers.run optional arguments ?postprocess : (string -> string), ?print_stdout : bool, and ?print_stderr : bool.

  • Added new library Expect_test_helpers_base, pulling out code from Expect_test_helpers_kernel that only needs Base.

  • Extended within_temp_dir to work when links cross devices, by copying the file.

Incremental:

  • Switched Incremental’s API from using Time to using Time_ns.

  • Made Incremental be the library name rather than Incremental_lib, and moved all modules from Incremental_lib to submodules of Incremental.

  • Merged the Incremental and Incremental_kernel libraries into a single library, Incremental.

  • Moved the Balanced_reducer module out of Incremental, to a single-module library.

  • Reduced the use of Obj.magic.

  • Made the Incremental library’s clock handling explicit rather than implicit.

  • Added Incr_result library, for dealing with values of type ('a, 'b) Result.t Incr.t.

  • Deleted the Implicit_clock module type and Make_with_implicit_clock functor, all code having been converted to the explicit clock.

Re2:

  • Fixed a segfault bug in Re2 functions find_all, find_all_exn, find_first, find_first_exn.

  • Changed Re2.Options to be a record of all the options, and creation functions to take a single Options.t.

Rpc_parallel:

  • Add support for inline tests to use Rpc_parallel.

Sexplib:

  • Added to macro templates the ability to refer to other templates and variables.

  • Improved error messages when unable to convert a sexp to a value.

  • Moved Sexplib.Macro to its own library Sexp_macro.

  • Removed a closure allocation from Sexp.must_escape.

Stdio:

  • Added function Stdio.print_s, moved in from Core_kernel.

  • Added print_string function.

12 Likes

Since you mentioned Hardcaml here, there is an issue/initiative to improve the integration between different chip design tools and frameworks:

You mentioned Async.Udp moved but while I can find it in the v0.13 snapshots in async_extra, I seem to be unable to find it for v0.12. It is not part of async_extra and there is neither an async_udp package nor async_udp repo in the Janestreet organization on GitHub. Where did UDP go?

It appears to be accidentally missing.

1 Like

Core.Bigstring.t no longer has [@@deriving bin_io]. Was this intentional? Bin_prot.Std still seems to have all the necessary functionality.

You now have to pick between Bigstring.Unstable.t and Bigstring.Stable.V1.t.

This is so that your programs don’t break when there is a change to the serialization format, unless you ask for it by picking “unstable”.

3 Likes

What happened to the Core_extended.Bitarray module?
Where is it now? Or was it removed?

Indeed, it was removed.

1 Like

By the way, Bitarray has been added back to Core_extended (its removal was an oversight). It’s currently available in the GitHub v0.13 preview.

2 Likes

Was Core.Cache also removed?

I don’t know of such a module (I searched the history of core/core_kernel/base). Are you thinking of Core_kernel.Hash_queue (which is useful for implementing an LRU cache), or Core_kernel.Memo (which does so)?

There is also a resource_cache package.

Probably, the question is outdated, but for posterity: UDP support is in a separate async_udp library now.

@bcc32 Er I mean Core_extended.Cache: https://github.com/janestreet/core_extended/blob/v0.11.0/src/cache.mli

I’ll see if I can use Core_kernel.Hash_queue instead. I might be able to use Memo but it has a really awkward interface for what I’m trying to do (explicit caching with timeouts of values).

Ah, okay. I didn’t know about that module. It looks like it was removed and internally deprecated (with a suggestion to use Core_kernel.Memo instead). If you need more control over the cache eviction behavior, I think Hash_queue is the data structure you want.

I ended up writing an Lru_cache module using Hash_queue. Thanks for the idea.

The current version uses Core v0.11 so it’s kind of pointless but hopefully it will only require minor changes to support v0.13