Version 3:
Breaking Changes
-
coswitch has been replaced by tools_opam.
-
opam package labels have changed. The Bazel label for any opam package has prefix
opam.(this can be changed; see thetools_opamdocumentation), and the library itself is in Bazel package//lib; for example,@opam.ounit2//lib. Subpackages are named similarly, e.g.@opam.mtime//clock/os/lib.
-
-
ocaml_archiveandocaml_ns_archivehave been removed. Useocaml_libraryinstead. -
tools_ocaml has been replaced; see New rulesets below.
-
Minimum Bazel version is 8.
Non-breaking changes
-
ocaml_nsis now a macro -
Attribute
cc_depsonocaml_modulesets compilation_mode to opt -
Much code refactoring and cleanup
-
More documentation
New rules
-
ocaml_ns_config- generated by macroocaml_ns -
ocaml_ns_module- generated by macroocaml_ns -
ocaml_runtime- support for-make-runtime,-with-runtime
New rulesets
-
ppx support has been migrated to rules_ppx
-
menhir support has been migrated to rules_menhir
-
rules_ctypes - support for ocaml-ctypes package.
-
rules_cppo - support for the cppo tool
New tools
Support added for the tools in the standard SDK (ocamldebug, ocamlobjinfo, etc.) and for a subset of the OCaml Platform tools (opam, utop, ppxlib).
Deprecations
-
ocaml_ns_libraryis deprecated and will be removed in the next version.
Version 2:
Breaking Changes
-
The tool for OPAM integration is coswitch
-
renaming
-
ocaml_moduleattributessrcandintfrenamed tostructandsig, respectively -
modulesattribute ofocaml_libraryrenamed tomanifest -
rule
ocaml_interfacerenamed toocaml_signature -
deps_adjunctrenamed toppx_codeps(i.e. co-dependencies) -
OPAM package labels have changed. See coswitch for more information. example,
ppx_deriving.eq → @ppx_deriving//eq,mtime.clock.os → @mtime//clock/os. To make these targets available the new OPAM bootstrapper tool must be run separately.
-
-
namespacing support has been thoroughly revised, see below for details
-
deletions
-
attribute
deps_opamremoved; opam deps are no longer special, and are treated like any other dep -
attribute
deps_adjunct_opamremoved
-
Non-breaking changes
-
Rule
ocaml_archiveis deprecated and will be removed in a future version. Use insteadocaml_librarywith attributearchived=True. -
Rule
ocaml_ns_archiveis deprecated and will be removed in a future version. Use insteadocaml_ns_librarywith attributearchived=True. -
Toolchain support has changed drastically, but this should not effect existing code, except insofar as OPAM dependencies must be changed as noted above. For example version 1 generated build commands that used
ocamlfind, which it assumed to be installed in OPAM. Version 2 does not useocamlfind; the commands it generates invoke the OCaml compilers directly, via the toolchain interface. This change should not affect existing build code.
New stuff
-
The new coswitch tool generates code implementing OPAM-integrated toolchains.
-
bottom-up namespacing
-
toolchain independence
-
cc deps produced by
cc_*rules (e.g.cc_library) may be added directly to thedepsattribute ofocaml_module -
new rules:
-
Rules for third-party tools (e.g. menhir) are in tools_ocaml