Releases: capnproto/capnp-ocaml
3.6.0
CHANGES:
-
Update README to talk about stdint, not uint (reported by @liyishuai).
Also, remove out-of-date list of runtime packages needed. The build system can sort that out. -
Remove all
inlined
attributes (@talex5 #87 #88).
These cause confusing compiler warnings for users, which can't be disabled automatically,
and the inlining isn't being used anyway since #83. -
Fix "Unknown interface" error (@talex5 #85).
It reported the UUID of the actual object, not the UUID that was requested.
Also, addRegistry.pp_interface
for better error messages. -
Minor opam fixes (@talex5 #84).
Depend on dune >= 2.3 and don't try to build benchmarks; that only works on some platforms. -
Bump minimum OCaml version to 4.08.
4.07 doesn't work due to janestreet/base#94.
3.5.0
CHANGES:
New features:
Documentation:
-
Add example of how to use the library (@rottened23, #62).
-
Extract LICENSE and identify as BSD-2-Clause (@tmcgilchrist, #80).
Build system:
-
Remove compiler flags for flambda (@talex5, #83).
This was very slow to compile on OCaml 4.14, and the performance benefit is minimal. -
Replace
Uint32.of_int
in unit-tests withof_string
(@talex5, #73).
Fixed tests on 32-bit systems. -
Benchmarks: remove incorrect test for 64-bit on Windows (@dra27, #72).
v3.4.0
CHANGES:
-
Upgrade from uint to stdint (@talex5, #64). From uint 2.0.1, these are
compatible. Projects using the schema compiler should either upgrade to
stdint themselves, or add a lower bound ofuint >= 2.0.1
. Otherwise,
the build may fail, complaining about incompatible types. -
Fix generated files when one interface imports another (@talex5, #65,
reported by TealG).
v3.3.0
CHANGES:
This release is mostly about reducing the number of dependencies.
The only API change is that write_message_to_file_robust
has gone.
-
Remove
extunix
dependency (#57).
write_message_to_file_robust
was its only user, and wasn't used by anything.
Usingfsync
to ensure a file is written to disk is a general function that
should be handled by the user of capnp where needed.
Removingextunix
also removes the indirect dependency oncamlp4
,
which in turn allowscapnp
to build with OCaml 4.08 (and to build faster on all versions). -
Remove
Pervasives
qualifier (#57).
This is needed to support OCaml 4.08 without warnings. -
Remove dependency on
Core
from benchmarks (#55).
This was the only remaining use of the library. -
Replace uses of
Core_kernel
with plainBase
andStdio
in the compiler (#56)
and tests (#59).
This greatly reduces the number of libraries you need to install to install capnp. -
Update tests for the current quickcheck API (#54).
-
Switch from jbuilder to dune (#54).
-
Require OCaml >= 4.03 (#54).
This allows us to drop some complexity from the jbuilder files,
allowing them to be upgraded automatically by dune. -
Upgrade to opam 2 format (#54).
-
Convert the changelog to markdown (#58).
This allows it to be used with dune-release.
With these changes, the following 49 libraries that were needed to install
capnp-ocaml 3.2.1 are no longer required: base_bigstring
, base_quickcheck
,
bin_prot
, camlp4
, core_kernel
, extunix
, fieldslib
,
jane-street-headers
, jst-config
, num
, ocaml-compiler-libs
,
ocaml-migrate-parsetree
, octavius
, parsexp
, ppx_assert
, ppx_base
,
ppx_bench
, ppx_bin_prot
, ppx_compare
, ppx_custom_printf
,
ppx_derivers
, ppx_enumerate
, ppx_expect
, ppx_fail
, ppx_fields_conv
,
ppx_hash
, ppx_here
, ppx_inline_test
, ppx_jane
, ppx_js_style
,
ppx_let
, ppxlib
, ppx_module_timer
, ppx_optcomp
, ppx_optional
,
ppx_pipebang
, ppx_sexp_conv
, ppx_sexp_message
, ppx_sexp_value
,
ppx_stable
, ppx_typerep_conv
, ppx_variants_conv
, re
, seq
, sexplib
,
splittable_random
, time_now
, typerep
and variantslib
.
v3.2.1
v3.2.0
Backwards-incompatible changes
- The
capnp
opam package no longer depends on the C++ compiler (#47).
If your project compiles schema files, you should add
"conf-capnproto" {build}
to your opam dependencies.
Other changes
v3.1.0
Backwards-incompatible changes
- The Unix-specific
IO
module has been moved fromCapnp.IO
toCapnp_unix.IO
, and is now part of the newcapnp.unix
ocamlfind library. Bothcapnp
andcapnp.unix
ocamlfind libraries are provided by thecapnp
opam package.
New features
- The core
capnp
library no longer depends onCore_kernel
orUnix
. This makes binaries using the library several MB smaller and allows capnp to be used in Mirage unikernels.
v3.0.0
Backwards-incompatible changes
-
The
Builder.X.reader_t
andReader.X.builder_t
types have gone (to avoid confusion with the genericreader_t
andbuilder_t
types). UseX.struct_t reader_t
andX.struct_t builder_t
instead.
Builder.X.t
is still defined (as an alias forstruct_t builder_t
), and similarly forReader.X.t
. -
StructStorage.t
now takes an extra type parameter. This is a phantom type, used to indicate what kind of struct it represents. This extra parameter has also been added toObject.t
. -
In the generated files, the unique types names (e.g.
reader_t_Foo_14133145859926553711
) have gone. If you need to refer to these directly for some reason, use the replacement polymorphic type instead (e.g.Foo_c42305476bb4746f reader_t
).
New features
-
RPC support (#35 and #36).
The compiler now generates readers and builders for parameters and results, interface and method IDs, and a dispatch method for services. There is a newMakeRPC
functor in the generated files that takes an extended version ofMessageSig
. The originalMake
is still provided - it is now a convenience wrapper aroundMakeRPC
that passes some dummy functions.
An RPC provider is available at https://github.com/mirage/capnp-rpc. -
Capability references can now be attached to messages.
The getters and setters that previously tookUint32.t
indexes can now take capabilities, as defined by an RPC provider library. The defaultRPC.None
provider exposes the raw descriptor index, as before. -
Better AnyPointer support (#11). The new
of_pointer
andinit_pointer
functions can be used to read and add structs of any type to AnyPointer fields. The newpointer_set_reader
can be used to set a pointer by copying from a reader. -
Replace camlp4 includes with flambda inlining (#23).
The-inc.ml
files that were previously copied into each generated file are now regular modules in the library, making them available to other code too. This makes the generated files much smaller. There is no performance penalty (when using flambda). -
Port to jbuilder (#24).
Also, the required schema files are now included in the repository rather than being downloaded by the build scripts, which was fragile. -
Add support for cycles (#29).
Before, the compiler would abort if a schema file contained cycles, but this is very common (especially with interfaces). It now generates forward references where needed. -
Add parameterised
reader_t
andbuilder_t
types (#32 and #33).
Instead of providingReader.Foo.t
andBuilder.Foo.t
as abstract types, provide a singleFoo.struct_t
and usestruct_t reader_t
andstruct_t builder_t
for its reader and builder.
This makes it possible to define generic functions that work on all readers or builders, without having to generate a separate function for each one. The types are shared between files, so you can write generic code to work with schema files you haven't seen (needed for the RPC system). -
Use polymorphic variants for phantom types (#34).
Instead of declaring a load of unique type names at the start of the file, use polymorphic variants. These don't need to be declared before use. The node ID is now formatted as hex, to make it shorter and to match the format used in the schema files. There are new genericreader_of_builder
andmessage_of_builder
functions inStructStorage
.
Other changes
-
All uses of
Obj.magic
have been removed from the generated code. -
Update to latest core_kernel (#26).
Avoids conflict with newer sexplib. -
Fix some compiler warnings (#28). Jbuilder turns on more warnings by default.
-
Add missing test dependency on ounit (#30).
-
Fix code generation bug in 2.1.1 (#10).
A missing space prevented the generated files from compiling.
Added Travis CI tests to detect this kind of thing automatically.