Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This one was delayed a while, so it's a big one:
async_extended
Mailbox
where one invocation ofreceive
would put aside items, preventing other invocations from noticing
them.
Delimited.Row.nth_conv_exn
, as a counterpart toget_conv_exn
.File_updates
handling of identical mtimes.async_extra
In
Log
, exposed the raw message.Changed
Rpc
creators'connection_state
to be a function that takesthe connection and returns the state.
This makes it possible for the connection state to actually get
a handle on the connection itself, which simplifies a number of
idioms for using RPC. In particular, it makes it easier to respond
with an RPC back to a client over client's own connection.
Fixed some nondeterministically failing tests.
In
Log
, made logs discard messages when their output list is empty.Also, removed redundant tracking of current level.
Moved
Udp.bind_to_interface_exn
toUnix
module inasync_unix
.Added
Versioned_typed_tcp.Repeater
.Repeater is used in the cases where we want to inspect and possibly
alter the flow between a client and a server without having to
change either the client or the server or the protocol between them.
async_kernel
Deferred.Sequence
module, analogous toDeferred.List
but forCore_kernel.Std.Sequence
.async_unix
Added
Writer.behave_nicely_in_pipeline
, which makes a program behavenicely when used in a shell pipeline where the consumer goes away.
Modernized code style.
Removed spurious overrides in
Signal
:set
andsignal
.These overrides are no longer necessary because the functions moved
from
Core.Signal
toCore.Signal.Expert
.Moved
async_extra
'sUdp.bind_to_interface_exn
toUnix
.bignum
Bignum.t
toBigint.t
, and to convertBigint.t
intoBignum.t
.bin_prot
Sped up
float
andfloat array
operations.Removed a use of
Obj.magic
in code generated bypa_bin_prot
forpolymorphic variants that led to memory unsafety.
Previously,
pa_bin_prot
generated this kind of code forpolymorphic variants:
and this caused the compiler to assume the result is an immediate
value. To fix this we removed the
as x -> x
and used the computedinteger hash.
core
Renamed
Linux_ext.gettid
asUnix.gettid
, and added OpenBSD support.SYS_gettid
is not available on OpenBSD, but is used inCore_extended
. See the mailing list discussion about this here:https://groups.google.com/forum/#!topic/ocaml-core/51knlnuJ8MM
Seems like the OpenBSD alternative is:
although it's not defined in any header file, which is a bit unfortunate.
Added
Piecewise_linear.precache
, which computes a lookup table thatspeeds up subsequent calls to
Piecewise_linear.get
.Added
Time_ns
module, representing times as 63-bit integers ofnanoseconds since the epoch.
Fixed build of
unix_stubs.c
on OpenBSD.In
Daemon
, fixed an error message regardingWSTOPPED
(fixes Add Thomas' rpc-light #47).Added
Time.Span.Stable.V2
, with sexps that use new suffixes formicroseconds (
us
) and nanoseconds (ns
).Time.Span.of_string
supports the new format, butTime.Span.to_string
doesn't yet produce it -- we plan to changethat later, after the new
of_string
has made it out more widely.Added
Time.Span.to_string_hum
, which gives more options forrendering time spans.
Merged the
recvmmsg
stubs inBigstring
andIobuf
.Factored out a shared underlying
recvmmsg
call that bothstubs use.
Restored
-pedantic
by avoiding a C99 feature (variable-lengthstack arrays).
Made
Date.t
abstract, and changed its representation from a 4-wordrecord to an immediate int (packing year, month, day).
In
Daemon
, changed the permissions of thestd{err,out}
filesgenerated during daemonization from
0o777
to0o644
.Moved
Thread_safe_queue
fromcore
tocore_kernel
.This was done so that
Async_kernel
can use it, eliminating one ofAsync_kernel
's dependencies onCore
.Thread_safe_queue_unit_tests
remainsCore
, at least for now,because it has some dependencies on other stuff in
Core
.core_bench
making them meaningless.
core_extended
Sped up
String.is_substring
by replacing the OCaml implementationwith a call to libc
memmem
.memmem
runs in 20% of the time, incurs minimal GC pressure, isportable among UNIXen that we target, AND it's clearer than the ML
version.
Made
Float_ref
supportbin_io
andsexp
.Removed
gettid
, which is now available inCore.Unix
.Added
Fast_int_div
module, which speeds up integer division bya fixed divisor.
Moved
Sexp.of_sexp_allow_extra_fields
to core_kernel.core_kernel
Made
String_id
haveStable_containers.Comparable
.Changed
Gc.disable_compaction
to require anallocation_policy
.Made
Option
matchInvariant.S1
.Added
Sequence.filter
,compare
, andsexp_of_t
.Added
With_return.with_return_option
, abstracting a common patternof
with_return
.Install a handler for uncaught exceptions, using
Printexc.set_uncaught_exception_handler
, new in OCaml 4.02.Changed
Day_of_week
representation to a normal variant.Changed
Exn.handle_uncaught
so that if it is unable to print, itstill does
exit 1
.Added
Sexp.of_sexp_allow_extra_fields
, previously inCore_extended.Sexp
.Changed the implementation of
Exn.raise_without_backtrace
to useraise_notrace
, new in OCaml 4.02.Added
Float
functions for converting to and from IEEEsign/exponent/mantissa.
Added
String.Caseless
module, which compares and hashes stringsignoring case.
Reimplemented
Type_equal.Id
using extensible types (new in OCaml4.02), removing a use of
Obj.magic
.Changed
Type_equal.Id.same_witness
to returnoption
rather thanOr_error
, which allows it to be implemented without allocation.Removed a reference to the
Unix
module. Applications usingcore_kernel
should be able to link withoutunix.cma
again.Made
Char.is_whitespace
accept\f
and\v
as whitespace,matching C.
jenga
Support for user control of stale-artifact deletion, by allowing
specification of an artifact-determination policy.
Expose jenga's internal (and better - only quotes when necessary)
definition of
Shell.escape
inApi
Removed
Action.shell
from the API, superseded byAction.process
.Changed RPC interface as needed for build manager to switch from
scraping error messages to RPCs.
Fixed jenga's per-rule memo table, which mistakenly kept stale values.
Show what target is being demanded, useful for debugging rules.
Run user action when persistent format changes.
When filtering buildable targets by globs, pay attention to the kinds
allowed by the glob.
Specifically, if the kinds don't include
File` (i.e. only include
Directory) then we should not see any
buildable_targets` in the filtered list.ocaml_plugin
Stopped using the
~exclusive
withReader
, because it doesn't workon read-only file systems.
It's not even needed because these files are written atomically.
Used a generative functor in the generated code, so the user code can
apply generative functors at toplevel, or unpack first class modules
that contain type components.
Fixed bug when mli file references something defined only in
another ml.
Made it possible to compile a plugin in one process, and dynload the
compiled
cmxs
file without starting async in another process.This was done with two new APIs in
Ocaml_dynloader.S
:Allowed plugins to optionally have a shebang line.
Made
Ocaml_dynloader.find_dependencies
also support files withshebang lines.
pa_bench
Made the code generated by
pa_bench
forBENCH
not useignore
,because OCaml 4.02 will remove dead code in some cases, meaning the
benchmarks are no longer measuring what they should. Instead the ignore
is deep inside
Core_bench
, which is likely out of reach of thecompiler.
The result of the user functions given to
BENCH_FUN
andBENCH_INDEXED
are changed so they don't have to return unit andpeople are encouraged not to use
ignore
when these functions don'treturn
unit
(you will get the same warning though, i.e. a warningif the result of your function is a function too, thus preventing
unintended partial applications).
For example, here are a few benchmarks and their output before the
fix:
Many of the the numbers above are much lower than they should be
because of the implicit ignores inserted by the benchmark caused the
division to to eliminated by the compiler. After the fix, the same
benchmarks produced more meaningful numbers:
sexplib
Improved the implementation of
Exn.sexp_of_t
, using the unique id inexceptions in OCaml 4.02.
We use the identifier to map exception constructors to converters.