Rework the API of Ocaml_plugin to use the new stdless idiom. (Keep the old one
Also, the following modules were renamed:
Ocaml_plugin.Std.Ocaml_dynloaderis now accessible at
Ocaml_plugin.Std.Ocaml_compileris now accessible at
In Ocaml_plugin, drop
t_of_sexpon an unstable type not meant to expose this.
This was most probably added either temporarily or maybe by mistake.
Allow the specification of the permissions with which to create
in_dir(the directory where ocaml_plugin does its compilation).
If a persistent compiler archive is modified, ocaml_plugin will probably fail at
compiling. Make it more robust by considering the archive invalid instead.
This can easily happen when deleting a bunch of cmi/cmx/exe recursively and inadvertently
messing up the ocaml_plugin archive.
On the way, I simplify things by passing more information from ocaml_embed_compiler (at
compile time) to ocaml_plugin (at runtime) without having to look in the archive.
Improve the check plugin command that comes with ocaml-plugin:
Improve documentation, add
readmeto include more info about what is being
Avoid the switch
-code-style _for application that have made a choice of
code style statically. Having the swtich available at runtime is just
confusing, since only 1 style is going to work anyway.
Added an ocamlbuild plugin to ease the creation of embed programs
Switch to ppx.
Allow ppx-style code to be loaded by plugin-applications build using ocaml_plugin.
Follow Core & Async evolution.
copy_source_files_to_working_dir, exclude files that start with
emacs creates temporary files that cannot be read with names like
.#foo.ml, and attempting to copy those causes this function to
Minor update: follow Async evolution.
interface mismatcherror when a plugin cache is
shared by incompatible compilers.
When a plugin cache directory is used by several executables with
incompatible cmis/compilers, and the cache config option
try_old_cache_with_new_execis set to true, this could lead to the
Plugin failed: (ocaml_dynloader.ml.Dynlink_error "interface mismatch")
This feature fixes this.
Since it modifies some record, for later changes it seems easier and
more conservative to allow field additions without breaking older
version. Thus we allow extra fields in persisted records.
let t_of_sexp = Sexp.of_sexp_allow_extra_fields t_of_sexp
New executables can read both old and new caches, but old
executables will either blow away new caches, or if the config says
the cache is read-only, fail.
Take the chance to modernize part of the code.
Switched tests to unified tests.
Fixed bugs dealing with paths with spaces in them.
Check that plugins have the expected type before running them rather
than after, which is what one would expect.
Also check that runtime and compile types match in
Stopped using the
Reader, because it doesn't work
on 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
Made it possible to compile a plugin in one process, and dynload the
cmxsfile without starting async in another process.
This was done with two new APIs in
val compile_ocaml_src_files_into_cmxs_file : dynloader -> string list -> output_file:string -> unit Deferred.Or_error.t val blocking_load_cmxs_file : string -> t Or_error.t
Allowed plugins to optionally have a shebang line.
Ocaml_dynloader.find_dependenciesalso support files with
Changed to not use
rm -rwhen it is expected to remove one file.
Fixed a bug in tests that could leave the repository in a state where
running the tests would fail.
The bug happened if the tests were interrupted after creating
read-only directories but before cleaning then up.
ignore more warnings by default
Fixed a bug in
ocaml_embed_compileron 32-bit machines.
ocaml_embed_compilertries to read the full contents of the file as
a string, but the string might be too big on 32bits:
Added a tag to exceptions coming from the toplevel execution of
plugins so that we do not confuse them with exceptions coming from
Also, added a function to check a plugin without executing it. And
captured the common pattern of checking the compilation of a plugin
Command.toffered in the library.
ocamldepto generate the dependencies of an
Added a function to find the dependencies of a module, but did not
change the existing behavior and interface of the library if one
does not choose to use this functionality.
cmi's so that plugins can use
lazy, recursive modules, and
Bump version number
Made executables link without error even if no archive is embedded
This is often the desired behavior (for inline tests of libraries
using transitively ocaml-plugin for instance).
-strict-sequence, which is set to
Changed the execution of plugin's toplevel to run in async instead
In_thread.run, unless a config parameter says otherwise.
Fixed the slow and memory-consuming compilation of > 100MB
.cfiles generated by
This was done by having them contain one big string instead of one big
Added more unused-value warnings in plugins.
M} are the modules that constitute a given plugin of
expected module type
S, then previously we generated a file like:
module Ui : sig ... end = struct ... end module M : sig ... end = struct ... end let () = ##register (M : S)
Doing that, we did not get unused variables:
for the toplevel of
Uidoes not have a
for unused values of
Mif they have an
OCaml plugin now allows one to get these warnings. Since (2) is
rather annoying for utils kind of file, this comes only if a config
flag is enabled.
Fixed OCaml Plugin on CentOS 5 -- it had problems because the generated c files did not end with a newline.
Finished the transition from
Support for Mac OSX
Removed the dependency of
Removed a test that (rarely) failed nondeterministically.