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 functionsList.equal
andArray.equal
has been removed.
New packages
-
base_bigstring (https://github.com/janestreet/base_bigstring): String type based on Bigarray, for use in I/O and C-bindings.
-
base_quickcheck (https://github.com/janestreet/base_quickcheck): Randomized testing framework, designed for compatibility with Base.
-
hardcaml (https://github.com/janestreet/hardcaml): Hardcaml is an OCaml library for designing hardware.
-
hardcaml_waveterm (https://github.com/janestreet/hardcaml_waveterm): A terminal based digital waveform viewer for Hardcaml.
-
incr_dom_keyboard (https://github.com/janestreet/incr_dom_keyboard): A terminal based digital waveform viewer for Hardcaml.
-
incr_dom_partial_render (https://github.com/janestreet/incr_dom_partial_render): A library for simplifying rendering of large amounts of data.
-
jst-config (https://github.com/janestreet/jst-config): Compile-time configuration for Jane Street libraries.
-
netsnmp (https://github.com/janestreet/netsnmp): An interface to the Net-SNMP client library.
-
notty_async (https://github.com/janestreet/notty_async): An Async driver for Notty.
-
pam (https://github.com/janestreet/pam): OCaml bindings for the Linux-PAM library.
-
ppx_deriving_hardcaml (https://github.com/janestreet/ppx_deriving_hardcaml): A plugin for the ppx_deriving rewriter that supports the Hardcaml syntax.
-
ppx_module_timer (https://github.com/janestreet/ppx_module_timer): Ppx rewriter that records top-level module startup times.
-
ppx_stable (https://github.com/janestreet/ppx_stable): Stable types conversions generator.
-
sexp (https://github.com/janestreet/sexp): S-expression swiss knife.
-
sexp_diff_kernel (https://github.com/janestreet/sexp_diff_kernel): Code for computing the diff of two sexps.
-
sexp_macro (https://github.com/janestreet/sexp_macro): Sexp macros.
-
shell (https://github.com/janestreet/shell): Yet another implementation of fork&exec and related functionality.
-
time_now (https://github.com/janestreet/time_now): Reports the current time.
-
zstandard (https://github.com/janestreet/zstandard): OCaml bindings to Zstandard.
Deprecations
Async
:
- Deprecated
Scheduler.add_busy_poller
.
Base
:
-
Deprecated
Applicative
'sArgs*
module types andMake_args*
functors, which have been superseded by thelet%map
syntax. -
Deprecated
Array.replace
.
Core_kernel
:
-
Deprecated
Obj_array
, replacing uses withUniform_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 ofAsync
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 deletingAsync_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 toCore_kernel
. -
Added top-level module
Base.Sign_or_nan
, moved out ofFloat
-
Added
Stack
module, moved in fromCore_kernel
. -
Added
Base.Bigstring
module, moving in most ofCore_kernel.Bigstring
. -
Added the
Base_bigstring
library, splitting out theBigstring
module fromBase
.
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
andSchedule_v5
out ofCore
and to their own libraries. -
Moved the
Daemon
module, to a single-module library. -
Moved the
Uuid
module out ofCore
, to a single-module library. -
Moved
Lock_file
to a single-module library,Lock_file_blocking
. -
Moved the
Mac_address
module out ofCore
, to a single-module library. -
Moved modules out to standalone libraries:
Nano_mutex
,Squeue
.
Core_kernel
:
-
Added
Time_ns.Ofday
submodule, moved fromCore
. -
Moved module
Unpack_buffer
out ofCore_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 theconfig.h
file that many libraries (includingCore_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 thanIncremental_lib
, and moved all modules fromIncremental_lib
to submodules ofIncremental
. -
Merged the
Incremental
andIncremental_kernel
libraries into a single library,Incremental
. -
Moved the
Balanced_reducer
module out ofIncremental
, to a single-module library.
Sexplib
:
- Moved
Sexplib.Macro
to its own librarySexp_macro
.
ppx
:
-
ppx_ast
,ppx_core
,ppx_driver
,ppx_metaquot
,ppx_traverse
,ppx_traverse_builtins
, andppx_type_conv
have been merged into ppxlib (https://github.com/ocaml-ppx/ppxlib).
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 raiseBuffer_short
when out of space, which isn’t always the case; instead used a wildcard match. -
Increased
Unix.listen
's defaultbacklog
from 10 to 64, to reduce occurrences of TCP clients gettingUnexpected EOF
errors when the listening server is busy. -
Added an optional argument to
Pipe
functionsfold
anditer
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 ofAsync
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
submoduleBacking_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 thesrc
directory to thetest
directory. -
Added to
Log.Output.stdout
andstderr
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 setAsync_kernel_config.task_id
; instead settask_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 callwait
but have it not install aSIGCHLD
handler. -
Added
Rpc
client function that exposes theSocket.Address.t
of the RPC server connected to. -
In
Reader.load_sexp*
functions, removed the?expand_macros:bool
argument, moving that functionality to theSexp_macro
library. -
Fixed a bug in
Tcp
that was causingSO_REUSEADDR
to always be set. -
Changed
Unix.Passwd
functions to stop usingIn_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 whenadvance_by_alarms
proceeds to the next alarm time. -
Fixed a potential segfault in
Unix.Group.getby{gid,name}
functions by changing them to not usIn_thread.run
, which avoids a bug in the OCaml stdlib’sgetgrgid
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 useIobuf.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 deletingAsync_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 toepoll
to not give up the OCaml lock. -
Moved
Async_kernel
tests fromsrc
directory to thetest
directory, which reduces code size. -
Exposed
Eager_deferred_or_error.List
submodule. -
Added function
Pipe.fork
, which takes aPipe.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 ofIvar
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 useStaged.t
to make staging explicit. -
Improved
Deferred.Memo.general
to not require its key to supportt_of_sexp
. -
Added function
Deferred.Or_error.repeat_until_finished
. -
Added
Deferred.Result
functionsfail
andfailf
. -
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]
, likeMonitor.try_with
. -
Restricted the type of
Deferred.any_unit
, changing it from_ t list -> unit t
tounit 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
andUnix.Passwd
functions’ implementation to useIn_thread.run
, since the underlyingCore.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 theContainer
interface. -
Removed the
Ref
module’s support for theContainer
interface. -
In the
Sequence
module, renamed the labeled argumentcmp
tocompare
, following the rest ofBase
. -
Deprecated the
String.copy
function, now that we use safestring.String.copy
is already deprecated in stdlib. -
Optimized
String
functions (concat
,sub
, andtr
) to eliminate unnecessary allocation of the result string. -
Added
Blit.Make_to_string
functor andBuffer.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 theLet_syntax
module for use withlet%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
functionsof_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 toInt_intf.S
and implemented them for all integer modules:floor_pow2
,ceil_pow2
,is_pow2
,floor_log2
,ceil_log2
. -
Moved the
Heap_block
module toCore_kernel
. -
Made
List.drop
andList.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 ofFloat
-
Made
Bool
implement theIdentifiable.S
interface. -
For
Container
'ssum
function, added theContainer.Summable
interface, replacingCommutative_group
. -
Improved
Type_equal.Id.sexp_of_t
, reducing noise, especially in tests. -
Changed
List.equal
andArray.equal
, removing the~equal
label from their argument. This makes them likecompare
functions, and is in preparation for changing[@@deriving compare]
to also derive equality functions. -
Changed the type of
List.sort
fromcompare:('a -> 'a -> int) -> 'a t -> 'a t
to'a t -> compare:('a -> 'a -> int) -> 'a t
. -
Added
Stack
module, moved in fromCore_kernel
. -
Deleted the
Applicative.Const
functor. -
Optimized
Lazy.compare
to immediately returntrue
if its arguments arephys_equal
. -
Deprecated
Applicative
'sArgs*
module types andMake_args*
functors, which have been superseded by thelet%map
syntax. -
Added
Field
functionsmap
andupdate
. -
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
functionval matches : t -> string -> bool
. -
Optimized
Hashtbl.mapi_inplace
, making it up to 4 to 8 times faster. -
Implemented
Queue.of_array
in terms ofQueue.init
. -
Added
swap
function toObj_array
,Option_array
, andUniform_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 inInt*
modules. -
Reimplemented
List.take
andtake_while
to avoid allocating an extra tuple. -
Reworked
String
's implementation to not useSet
. -
Optimized
Stack.to_array
to not create an intermediate list. -
Extended the
Container.Make
functor to allow one to supply a customlength
function that supersedes the definition in terms offold
. -
Added
Base.Bigstring
module, moving in most ofCore_kernel.Bigstring
. -
Added
[@@deriving equal]
for primitive types (bool
,char
,int
, etc.). -
Optimized
Array.sort
, removing some unnecessary allocation, -
Made
am_testing
betrue
in.mlt
files.
Base_bigstring
:
- Added the
Base_bigstring
library, splitting out theBigstring
module fromBase
.
Bin_prot
:
-
Improved the error message for integer-deserialization overflow on 32-bit platforms.
-
Switched
bin_shape.ml
to usingBase
rather than reimplementing a small fragment of it.
Core
:
-
Changed
Time.Zone.local
to callSys.getenv "TZ"
eagerly so that modifications to the environment (e.g. modifyingTZ
to change the behavior ofstrftime
) 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
andTime.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 ofMd5.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
totarget
andlink_name
, matchingUnix.link
. -
Moved modules
Schedule_v4_deprecated
andSchedule_v5
out ofCore
and to their own libraries. -
Moved
Core
tests fromsrc
directory totest
directory. -
Extended
Time_stamp_counter
's interface to matchComparisons.S
, with implementation asInt63
comparisons. -
Made the
Command
module satisfy theApplicative.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 reportunknown lock file format
if it encounters a stale lock file. -
Added
Unix.sysconf
valueCLK_TCK
. -
Added to
Time_ns.Ofday
aZoned
submodule, similar toTime.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
'sallow_empty
argument to be optional, with defaultfalse
. -
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
modulesBool
,List
,Option
, andSexp
. -
Added to
Unix.create_process_env
an optional argument?argv0 : string
. -
Moved the
Uuid
module out ofCore
, to a single-module library. -
Moved
Lock_file
to a single-module library,Lock_file_blocking
. -
Moved the
Mac_address
module out ofCore
, to a single-module library. -
Added
Command.Arg_type
values forTime_ns
analogous to existingTime
ones. -
Removed some code from
Bigstring
that was duplicative ofCore_kernel.Bigstring
. -
Moved values out of
Command.Arg_type
and into their respective modules. E.g.Arg_type.file
becameFilename.arg_type
. -
Added
Iobuf
functionprotect_window_and_bounds_1
. -
Added Thread functions
getaffinity_self_exn
andsetaffinity_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 amissing subcommand
error. -
Fixed
Time_stamp_counter.Calibrator
to work when time goes backwards. -
Added to
Unix.exec
andfork_exec
the ability to remove environment variables for the new process. -
Optimized
Iobuf.Peek.char
, by adding[@inline]
annotations. -
Extended
Command
so that ahelp-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 withCore_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 thegetxattr
andsetxattr
syscalls. -
Made
Time_stamp_counter
functions’ calibrator argument required instead of optional. -
Added
Version_util.Version.parse
function, for parsing a singleversion
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 toBase.Map
. -
Added
Time_ns.Ofday
submodule, moved fromCore
. -
Made
Time_ns.Span
be stringable and sexpable, and added aStable.V2
submodule, all moved fromCore
. Deprecated theAlternate_sexp
module. -
Added
Univ_map.of_alist_exn
function. -
Optimized
Int63.Replace_polymorphic_compare
to use theInt63
comparisons directly, rather than defined via a functor. -
Removed from
Time.Ofday
's andTime_ns.Ofday
's interfaceComparable.With_zero
; one shouldn’t think ofOfday
values as signed. -
Renamed
Time.Ofday.to_millisec_string
toto_millisecond_string
, for consistency withTime_ns
. -
Renamed
Time.Ofday.of_span_since_start_of_day
toof_span_since_start_of_day_exn
, for consistency withTime_ns
. -
Generalized
Time.Span.randomize
so thatTime_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
, onof_string
andof_bigstring
. -
Updated
Time_ns.Ofday
to provideOfday_intf.S
. -
Made polymorphic
Hash_set
support[@@deriving sexp_of]
. -
Exported
Buffer
module, fromBase
. -
Moved module
Unpack_buffer
out ofCore_kernel
and into its own library. -
Updated
Quickcheck
generators and observers to have named state arguments (PRNG and hash state). -
Extended
Hashtbl
,Map
, andSet
to support theBase
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
andSequence.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 matchingComparable.S_plain
to memoize a function. -
Changed
Sexp_maybe
to useError
'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
intoCore_kernel.Md5
. -
Added submodule
Unit.Stable.V1
. -
Added function
Byte_units.to_string_short
. -
Split out a
Config_h
library for generating theconfig.h
file that many libraries (includingCore_kernel
) use. -
Added function
Char.gen_uniform_inclusive : t -> t -> t Quickcheck.Generator.t
. -
Added
Filename
module, moving in most of the code fromCore.Filename
. -
Added
Hash_queue
functionsenqueue_front
,enqueue_back
,lookup_and_move_to_front
. -
Added
Command
module, moving in most ofCore.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
fromHashtbl.Key
toHashtbl.Key_plain
. -
Deprecated
Obj_array
, replacing uses withUniform_array
. -
Renamed
Time
submoduleRelative_to_unspecified_zone
asDate_and_ofday
. -
Deprecated
Timing_wheel_ns
functionalarm_upper_bound
, in favor ofmax_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
functionsmap_anons
andmap_flag
, analogs of the correspondingSpec
functions. -
Deprecated
Command.Spec.flags_of_args_exn
, which isn’t used. -
Deprecated
Command.Spec
functionsconst
andpair
, which haveParam
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
functionsnext
andprev
. -
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
functionsis_prefix
andto_char_sequence
. -
Made
String.Stable
matchStable_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 matchStable_containers.Hashable.V1.S
. -
Added a test to help us keep
Core_kernel
's exports in sync withBase
'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 thenenqueue*
functions, making it clear whether the element is being removed from the front or the back. -
Added
Hash_queue.drop*
functions. -
Added to
Flags
unstablebin_io
. -
Added
[@@deriving equal]
for primitive types (bool
,char
,int
, etc.). -
Added type
Filename.t = string
. -
Added
Bigstring.Stable
andUnstable
submodules, removing serialization fromBigstring.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
andTime_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 styleprint_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 fromExpect_test_helpers_kernel
that only needsBase
. -
Extended
within_temp_dir
to work when links cross devices, by copying the file.
Incremental
:
-
Switched Incremental’s API from using
Time
to usingTime_ns
. -
Made
Incremental
be the library name rather thanIncremental_lib
, and moved all modules fromIncremental_lib
to submodules ofIncremental
. -
Merged the
Incremental
andIncremental_kernel
libraries into a single library,Incremental
. -
Moved the
Balanced_reducer
module out ofIncremental
, 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 andMake_with_implicit_clock
functor, all code having been converted to the explicit clock.
Re2
:
-
Fixed a segfault bug in
Re2
functionsfind_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 singleOptions.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 librarySexp_macro
. -
Removed a closure allocation from
Sexp.must_escape
.
Stdio
:
-
Added function
Stdio.print_s
, moved in fromCore_kernel
. -
Added
print_string
function.