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
~cmpargument used to pass a comparison function has been renamed to~compare. -
The
~equallabel of functionsList.equalandArray.equalhas 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%mapsyntax. -
Deprecated
Array.replace.
Core_kernel:
-
Deprecated
Obj_array, replacing uses withUniform_array. -
Deprecated the
Timing_wheel_ns.Priority_queuemodule, 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_hashtblmodule out ofAsyncto its own library. -
Moved
Lock_fileto a single-module library,Lock_file_async. -
Moved
Async_extra.Udpto a standalone library,Async_udp.
Async_extended:
- Moved modules out of
Async_extendedinto their own libraries, aimed at deletingAsync_extended.
Async_kernel:
-
Moved the
Limitermodule to a single-module library,Limiter_async. -
Moved
Eager_deferredto a standalone library.
Async_unix:
- Moved modules to standalone libraries:
Thread_pool,Thread_safe_ivar,Thread_safe_pipe.
Base:
-
Moved the
Heap_blockmodule toCore_kernel. -
Added top-level module
Base.Sign_or_nan, moved out ofFloat -
Added
Stackmodule, moved in fromCore_kernel. -
Added
Base.Bigstringmodule, moving in most ofCore_kernel.Bigstring. -
Added the
Base_bigstringlibrary, splitting out theBigstringmodule fromBase.
Core:
-
Moved some modules out of
Coreto their own library:Crc,Piecewise_linear,Syslog,Timing_wheel_float,Weak_hashtbl. -
Moved modules
Schedule_v4_deprecatedandSchedule_v5out ofCoreand to their own libraries. -
Moved the
Daemonmodule, to a single-module library. -
Moved the
Uuidmodule out ofCore, to a single-module library. -
Moved
Lock_fileto a single-module library,Lock_file_blocking. -
Moved the
Mac_addressmodule out ofCore, to a single-module library. -
Moved modules out to standalone libraries:
Nano_mutex,Squeue.
Core_kernel:
-
Added
Time_ns.Ofdaysubmodule, moved fromCore. -
Moved module
Unpack_bufferout ofCore_kerneland into its own
library. -
Moved the implementation of
Quickcheckinto its own library,Base_quickcheck. -
Moved the
Limitermodule to a single-module library. -
Moved the
Bucketmodule out to a single-module library. -
Split out a
Config_hlibrary for generating theconfig.hfile that many libraries (includingCore_kernel) use. -
Moved the
Weak_pointermodule 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
Incrementalbe the library name rather thanIncremental_lib, and moved all modules fromIncremental_libto submodules ofIncremental. -
Merged the
IncrementalandIncremental_kernellibraries into a single library,Incremental. -
Moved the
Balanced_reducermodule out ofIncremental, to a single-module library.
Sexplib:
- Moved
Sexplib.Macroto its own librarySexp_macro.
ppx:
-
ppx_ast,ppx_core,ppx_driver,ppx_metaquot,ppx_traverse,ppx_traverse_builtins, andppx_type_convhave been merged into ppxlib (https://github.com/ocaml-ppx/ppxlib).
Changelog
Async:
-
Improved Async scheduler fairness by calling
Thread.yieldevery cycle, which releases the OCaml lock if any other OCaml threads are waiting to acquire it. -
Renamed
Pipe.merge's~cmpargument as~compare. -
In
Async_rpc, fixed a couple places that had assumed that bin-prot writers raiseBuffer_shortwhen out of space, which isn’t always the case; instead used a wildcard match. -
Increased
Unix.listen's defaultbacklogfrom 10 to 64, to reduce occurrences of TCP clients gettingUnexpected EOFerrors when the listening server is busy. -
Added an optional argument to
Pipefunctionsfoldanditerso they can consider a value flushed when it is processed by the supplied~frather than when it is read out of the pipe. -
Added function
Tcp.Server.close_finished_and_handlers_determined. -
Moved
Weak_hashtblmodule out ofAsyncto its own library. -
Changed
Time_sourceso that it fires alarms that were added at the same time in the order they were added. -
Added
WritersubmoduleBacking_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_unixtests from thesrcdirectory to thetestdirectory. -
Added to
Log.Output.stdoutandstderrfunctions 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.protectan optional argument,?extract_exn : bool. -
Removed from the
Async_unixlibrary a top-level effect that setAsync_kernel_config.task_id; instead settask_idwhen 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.Eventthe 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_fileto 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 callwaitbut have it not install aSIGCHLDhandler. -
Added
Rpcclient function that exposes theSocket.Address.tof the RPC server connected to. -
In
Reader.load_sexp*functions, removed the?expand_macros:boolargument, moving that functionality to theSexp_macrolibrary. -
Fixed a bug in
Tcpthat was causingSO_REUSEADDRto always be set. -
Changed
Unix.Passwdfunctions 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_alarmsan optional argument,?wait_for:(unit -> unit Deferred.t), which allows the caller to control whenadvance_by_alarmsproceeds 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’sgetgrgidC wrapper. -
Added
Readerfunctions 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_timeto useIobuf.Expert.reinitialize_of_bigstring. -
Added module
Deferred.Or_error.Expect_test_config. -
Removed some noise from
Rpc_transport_low_latencyerror messages. -
Added to the
Logmodule convenience functions for logging sexps:raw_s,info_s,error_s,debug_s. -
Moved
Async_extra.Udpto a standalone library,Async_udp. -
Improved error handling in the
Rpc_transport_low_latencymodule.
Async_extended:
- Moved modules out of
Async_extendedinto 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_timeoutto include zero, which can improve latency because it causes the scheduler’s call toepollto not give up the OCaml lock. -
Moved
Async_kerneltests fromsrcdirectory to thetestdirectory, which reduces code size. -
Exposed
Eager_deferred_or_error.Listsubmodule. -
Added function
Pipe.fork, which takes aPipe.Reader.tand returns a pair of readers, transferring each of the values from the input to both of the output readers. -
Removed some
Obj.magicfrom the implementation ofIvarthat is no longer necessary now that constructors can have inline records. -
Moved the
Limitermodule 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.Memoto useStaged.tto make staging explicit. -
Improved
Deferred.Memo.generalto not require its key to supportt_of_sexp. -
Added function
Deferred.Or_error.repeat_until_finished. -
Added
Deferred.Resultfunctionsfailandfailf. -
Moved
Eager_deferredto a standalone library. -
Fixed a memory leak in
Pipe.values_available, by having repeated calls share the same deferred. -
Added to
Monitor.protectan optional argument,?run:[`Now | `Schedule], likeMonitor.try_with. -
Restricted the type of
Deferred.any_unit, changing it from_ t list -> unit ttounit 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.GroupandUnix.Passwdfunctions’ implementation to useIn_thread.run, since the underlyingCore.Unixfunctions 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.Okmodule, which matched theContainerinterface. -
Removed the
Refmodule’s support for theContainerinterface. -
In the
Sequencemodule, renamed the labeled argumentcmptocompare, following the rest ofBase. -
Deprecated the
String.copyfunction, now that we use safestring.String.copyis already deprecated in stdlib. -
Optimized
Stringfunctions (concat,sub, andtr) to eliminate unnecessary allocation of the result string. -
Added
Blit.Make_to_stringfunctor andBuffer.To_stringsubmodule, for blitting to a string. -
Added to the
Applicative.Sinterface a map operator,>>|. -
Added functor
Applicative.Make_let_syntax, which generates theLet_syntaxmodule for use withlet%map. -
Added function
List.partition_result : ('ok, 'error) Result.t t -> 'ok t * 'error t. -
Changed
Base.raiseto use the%raiseprimitive, so that the compiler can automatically rewrite%raiseby%reraisewhen appropriate. -
Added
Arrayfunctionsof_list_mapi,of_rev_list_mapi. -
Optimized
Arraylooping functions to remove allocation:exists,find_map,foldi,for_all, etc. -
Added
*_pow2and*_log2functions toInt_intf.Sand implemented them for all integer modules:floor_pow2,ceil_pow2,is_pow2,floor_log2,ceil_log2. -
Moved the
Heap_blockmodule toCore_kernel. -
Made
List.dropandList.drop_whiletail recursive. -
Optimized
Hash_set.to_array, removing an intermediate list. -
Optimized
Signcomparison functions to be the type-specific versions, rather than the polymorphic ones. -
Added top-level module
Base.Sign_or_nan, moved out ofFloat -
Made
Boolimplement theIdentifiable.Sinterface. -
For
Container'ssumfunction, added theContainer.Summableinterface, replacingCommutative_group. -
Improved
Type_equal.Id.sexp_of_t, reducing noise, especially in tests. -
Changed
List.equalandArray.equal, removing the~equallabel from their argument. This makes them likecomparefunctions, and is in preparation for changing[@@deriving compare]to also derive equality functions. -
Changed the type of
List.sortfromcompare:('a -> 'a -> int) -> 'a t -> 'a tto'a t -> compare:('a -> 'a -> int) -> 'a t. -
Added
Stackmodule, moved in fromCore_kernel. -
Deleted the
Applicative.Constfunctor. -
Optimized
Lazy.compareto immediately returntrueif its arguments arephys_equal. -
Deprecated
Applicative'sArgs*module types andMake_args*functors, which have been superseded by thelet%mapsyntax. -
Added
Fieldfunctionsmapandupdate. -
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_patternfunctionval matches : t -> string -> bool. -
Optimized
Hashtbl.mapi_inplace, making it up to 4 to 8 times faster. -
Implemented
Queue.of_arrayin terms ofQueue.init. -
Added
swapfunction toObj_array,Option_array, andUniform_array. -
For JavaScript, added a
constannotation to the appropriate JavaScript primitives. -
Fixed
Int.Hex.of_stringand related functions to not silently ignore a suffix of non-hexadecimal garbage. -
Optimized
Obj_array.setfunctions, removing an unnecessary check that the array is a float array. -
Changed
Option_array.value_exnto generate smaller code. -
Change
List.zip's return type from('a * 'b) list optionto('a * 'b) list List.Or_unequal_lengths.t. -
Added to
Or_error.of_exn_resultan optional?backtraceargument. -
Stopped exporting the
Popcountmodule, in favor of functions inInt*modules. -
Reimplemented
List.takeandtake_whileto avoid allocating an extra tuple. -
Reworked
String's implementation to not useSet. -
Optimized
Stack.to_arrayto not create an intermediate list. -
Extended the
Container.Makefunctor to allow one to supply a customlengthfunction that supersedes the definition in terms offold. -
Added
Base.Bigstringmodule, 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_testingbetruein.mltfiles.
Base_bigstring:
- Added the
Base_bigstringlibrary, splitting out theBigstringmodule fromBase.
Bin_prot:
-
Improved the error message for integer-deserialization overflow on 32-bit platforms.
-
Switched
bin_shape.mlto usingBaserather than reimplementing a small fragment of it.
Core:
-
Changed
Time.Zone.localto callSys.getenv "TZ"eagerly so that modifications to the environment (e.g. modifyingTZto 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.SpanandTime.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_bigstringand used it to implement a more efficient version ofMd5.digest_bin_prot. -
Changed
Command.Spec.Arg_type.comma_separatedto take a required argument,[allow_empty:bool]. -
Optimized
Time_stamp_counter.Calibrator.calibrateto not allocate. -
Moved some modules out of
Coreto their own library:Crc,Piecewise_linear,Syslog,Timing_wheel_float,Weak_hashtbl. -
Changed
Unix.symlink's argument labels from~src~dsttotargetandlink_name, matchingUnix.link. -
Moved modules
Schedule_v4_deprecatedandSchedule_v5out ofCoreand to their own libraries. -
Moved
Coretests fromsrcdirectory totestdirectory. -
Extended
Time_stamp_counter's interface to matchComparisons.S, with implementation asInt63comparisons. -
Made the
Commandmodule satisfy theApplicative.Let_syntaxinterface. -
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 formatif it encounters a stale lock file. -
Added
Unix.sysconfvalueCLK_TCK. -
Added to
Time_ns.OfdayaZonedsubmodule, 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_emptyargument to be optional, with defaultfalse. -
Moved the
Daemonmodule, to a single-module library. -
Renamed some
Iobuffunctions to clarify which ones truncate integers. -
Removed
Core.Std, which has been deprecated for over a year. -
Added
Core_stablemodulesBool,List,Option, andSexp. -
Added to
Unix.create_process_envan optional argument?argv0 : string. -
Moved the
Uuidmodule out ofCore, to a single-module library. -
Moved
Lock_fileto a single-module library,Lock_file_blocking. -
Moved the
Mac_addressmodule out ofCore, to a single-module library. -
Added
Command.Arg_typevalues forTime_nsanalogous to existingTimeones. -
Removed some code from
Bigstringthat was duplicative ofCore_kernel.Bigstring. -
Moved values out of
Command.Arg_typeand into their respective modules. E.g.Arg_type.filebecameFilename.arg_type. -
Added
Iobuffunctionprotect_window_and_bounds_1. -
Added Thread functions
getaffinity_self_exnandsetaffinity_self_exn. -
Added to
Command.runan optional argument,?verbose_on_parse_error : bool, that controls whether to print a line suggesting the user try the-helpflag when an exception is raised while parsing the arguments. -
Fixed
Commandautocompletion to work for setuid programs; executables were failing to notice that completion was being requested, and were thus reporting amissing subcommanderror. -
Fixed
Time_stamp_counter.Calibratorto work when time goes backwards. -
Added to
Unix.execandfork_execthe ability to remove environment variables for the new process. -
Optimized
Iobuf.Peek.char, by adding[@inline]annotations. -
Extended
Commandso that ahelp-for-review.orgfile 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_envan 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_countercalibration lazy. -
Added
Linux_ext.Extended_file_attributessubmodule, with wrappers for thegetxattrandsetxattrsyscalls. -
Made
Time_stamp_counterfunctions’ calibrator argument required instead of optional. -
Added
Version_util.Version.parsefunction, for parsing a singleversionline. -
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_sfunction, which was previously added toBase.Map. -
Added
Time_ns.Ofdaysubmodule, moved fromCore. -
Made
Time_ns.Spanbe stringable and sexpable, and added aStable.V2submodule, all moved fromCore. Deprecated theAlternate_sexpmodule. -
Added
Univ_map.of_alist_exnfunction. -
Optimized
Int63.Replace_polymorphic_compareto use theInt63comparisons directly, rather than defined via a functor. -
Removed from
Time.Ofday's andTime_ns.Ofday's interfaceComparable.With_zero; one shouldn’t think ofOfdayvalues as signed. -
Renamed
Time.Ofday.to_millisec_stringtoto_millisecond_string, for consistency withTime_ns. -
Renamed
Time.Ofday.of_span_since_start_of_daytoof_span_since_start_of_day_exn, for consistency withTime_ns. -
Generalized
Time.Span.randomizeso thatTime_nscan share its implementation. -
Updated
Time.Span.to_short_stringto render “24h” as “1d”, and to go down to nanosecond granularity. -
Fixed a couple of incorrect deprecations in
Substring, onof_stringandof_bigstring. -
Updated
Time_ns.Ofdayto provideOfday_intf.S. -
Made polymorphic
Hash_setsupport[@@deriving sexp_of]. -
Exported
Buffermodule, fromBase. -
Moved module
Unpack_bufferout ofCore_kerneland into its own library. -
Updated
Quickcheckgenerators and observers to have named state arguments (PRNG and hash state). -
Extended
Hashtbl,Map, andSetto support theBasestyle of[@@deriving hash], e.g.type t = float Map.M(Int).t [@@deriving hash]. -
Moved the implementation of
Quickcheckinto its own library,Base_quickcheck. -
Added function
Bigstring.memcmp. -
Fixed issues in
Bigstring.unsafe_destroy_and_resizethat could lead to segfaults. -
Made
Sequence.tandSequence.Step.tsupport[@@deriving bin_io]. -
Moved some
Time_nsfunctions 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_plainto memoize a function. -
Changed
Sexp_maybeto useError's comparison functions rather than polymorphic ones. -
Exported in
Core_kernelquickcheck bindings for built-in types. -
Moved the
Limitermodule to a single-module library. -
Moved the
Bucketmodule out to a single-module library. -
Merged
Core.Md5intoCore_kernel.Md5. -
Added submodule
Unit.Stable.V1. -
Added function
Byte_units.to_string_short. -
Split out a
Config_hlibrary for generating theconfig.hfile that many libraries (includingCore_kernel) use. -
Added function
Char.gen_uniform_inclusive : t -> t -> t Quickcheck.Generator.t. -
Added
Filenamemodule, moving in most of the code fromCore.Filename. -
Added
Hash_queuefunctionsenqueue_front,enqueue_back,lookup_and_move_to_front. -
Added
Commandmodule, moving in most ofCore.Command. -
Removed the
Pooled_hashtblmodule, moving it to a single-module library. -
Improved
Command.choose_one's error message. -
Changed module type
Hash_heap.KeyfromHashtbl.KeytoHashtbl.Key_plain. -
Deprecated
Obj_array, replacing uses withUniform_array. -
Renamed
TimesubmoduleRelative_to_unspecified_zoneasDate_and_ofday. -
Deprecated
Timing_wheel_nsfunctionalarm_upper_bound, in favor ofmax_allowed_alarm_time, which is clear about the inclusiveness of its bound. -
Deprecated the
Timing_wheel_ns.Priority_queuemodule, with no intended replacement. -
Added
Tuple.Comparable_plainfunctor. -
Added
Command.Paramfunctionsmap_anonsandmap_flag, analogs of the correspondingSpecfunctions. -
Deprecated
Command.Spec.flags_of_args_exn, which isn’t used. -
Deprecated
Command.Specfunctionsconstandpair, which haveParamcounterparts. -
Added submodule
Map.Stable.Symmetric_diff_element.V1. -
Added to
Timing_wheel_ns.createan optional argument,?capacity : int, for preallocating the underlying pool. -
Added
Bigstring.memsetfunction. -
Made
Date.thave[@@deriving typerep]. -
Changed the precision of
Time_nsstrings 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_nsfunctionsnextandprev. -
Opted in to ocamlformat.
-
Refactored
Command.Pathand renamed some of its functions. -
Changed
Command.Pathto retain the dirname of executables. -
Extended
Hash_queueto support the use of an alternate hash-table implementation. -
Added
Ropefunctionsis_prefixandto_char_sequence. -
Made
String.StablematchStable_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.V1to matchStable_containers.Hashable.V1.S. -
Added a test to help us keep
Core_kernel's exports in sync withBase's exports. -
Added to
Doubly_linkeda 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
Flagsunstablebin_io. -
Added
[@@deriving equal]for primitive types (bool,char,int, etc.). -
Added type
Filename.t = string. -
Added
Bigstring.StableandUnstablesubmodules, removing serialization fromBigstring.t. -
Exposed type equality
Flags.Unstable.t = Flags.t. -
Moved
Time_ns.nowfunctionality to a standalone library,Time_now. -
Added
Hexdump.Prettysubmodule, which renders strings directly, only using hexdump format if necessary. -
Moved the
Weak_pointermodule to a standalone library. -
Reworked the
Byte_unitsmodule. -
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
TimeandTime_nsround 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_suses to format sexps. -
Added to
Expect_test_helpers.runoptional arguments?postprocess : (string -> string),?print_stdout : bool, and?print_stderr : bool. -
Added new library
Expect_test_helpers_base, pulling out code fromExpect_test_helpers_kernelthat only needsBase. -
Extended
within_temp_dirto work when links cross devices, by copying the file.
Incremental:
-
Switched Incremental’s API from using
Timeto usingTime_ns. -
Made
Incrementalbe the library name rather thanIncremental_lib, and moved all modules fromIncremental_libto submodules ofIncremental. -
Merged the
IncrementalandIncremental_kernellibraries into a single library,Incremental. -
Moved the
Balanced_reducermodule 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_resultlibrary, for dealing with values of type('a, 'b) Result.t Incr.t. -
Deleted the
Implicit_clockmodule type andMake_with_implicit_clockfunctor, all code having been converted to the explicit clock.
Re2:
-
Fixed a segfault bug in
Re2functionsfind_all,find_all_exn,find_first,find_first_exn. -
Changed
Re2.Optionsto 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.Macroto its own librarySexp_macro. -
Removed a closure allocation from
Sexp.must_escape.
Stdio:
-
Added function
Stdio.print_s, moved in fromCore_kernel. -
Added
print_stringfunction.