OCaml Forge

File Release Notes and Changelog

Release Name: 0.4.7

Change Log

  * Version 0.4.7

  * Drop support for OASISFormat 0.2 and 0.1.

    As per the version policy in HACKING.md, this change syncs with OASIS
    version in Debian. Debian Jessie has OASIS v0.4.4, so it is possible to
    drop support for older version.

  * Provide stable API in setup.ml using BaseCompat.

    This change introduces BaseCompat and opens by default the version
    matching OASISFormat in setup.ml. This allows to make changes to OASIS
    and still provides a stable API in setup.ml. The only side effect is that
    it requires to update the setup.ml of DynRun at every major version updates.

    Unfortunately, providing compatibility for ALL changes is an hard task.
    Users are welcome to file bugs whenever their customized setup.ml breaks
    because of an incompatible change.

  * Plugin "omake":

    This new plugin provides build, doc and install capabilities using
    OMake. Some features are not supported, like Object sections.
    It requires 'OCamlVersion: >= 4.01'.

    Example:
      OASISFormat:  0.4
      OCamlVersion: >= 4.01
      [...]
      BuildTools:   omake
      BuildType:    omake (0.4)

      Library simplelib
        [...]

      Document simplelib
        BuildTools+:     ocamldoc
        [...]

    Thanks to Gerd Stolpmann for this huge contribution.

  * Create OASIFileSystem and use it in OASISContext.t.srcfs.

    The new module OASISFileSystem is a filesystem abstraction layer that
    allows to better represents (through types) where the files are (e.g.
    source or build directory).

    The very first use of it is to add in OASISContext.t as srcfs. The
    filesystem object is itself limited to only use
    OASISContext.source_filename, which allows to use types to enforce
    location of files.

    The various default_filename across the code are now typed according to
    their location (e.g. "setup.log" and "setup.data" are
    OASISContext.source_filename). The only way to actually open, read and
    write the corresponding file is to apply methods provided in OASISFileSystem
    object.

    This change also delays enough the evaluation of the location of
    "setup.log" and "setup.data", which solves the bug 1473.
    (Closes: #1473)

  * Improve automatic tests:
    * Use OPAM to install dependencies.
    * Use Travis to test and compile with all major OCaml version since 3.12.1
      on Linux.
    * Use AppVeyor to compile on Cygwin.
    * Test for dynamic mode mode compilation on Cygwin with AppVeyor.
    * Rename test files to reflect what files they are testing.
    * Split test/data/TestFull/* tests to reflect what plugins/files they are
      testing.
    * Add some badges for build status on Travis and AppVeyor in README.md.
    * Test the parsing of examples/oasis/*.oasis files.
    * Check all examples are tested, add examples/ocamlbuild tests.
    * Check that all examples use the latest version of OASIS.
    * Disable test 'external source rebuild' which tends to be flaky.
    * Refactor TestFull to remove boilerplates and make it more readable.
    * Create a test function to check all subdirectories are listed and tested,
      add tests for the missing ones.
    * Reduce the number of skipped tests.
    * Refine constraint to produce .cmt to >=4.01.

  * Trim down the dependencies:
    * Stop depending on ocaml-data-notation and type_conv.
    * Create a trim down, internval version of ocaml-data-notation. The
      conversion functions  need to be manually written -- not perfect
      but a good way to drop the dependency and still be compatible with OCaml
      3.12.1.
    * Stop depending on ocaml-gettext, this was never really used.
    * Get rid of camlp4:
      * Replace most genlex parser, by standard yacc/lex parsers.
      * Replace OASISRecDescParser by OASISAst_parser using ocamlyacc.
        (Closes: #298)
      * The "flag(...)" in expression is now case sensitive, to avoid conflict
        with the "Flag ..." section.
      * Some parts still use Genlex, but don't need camlp4 anymore.
    * Trimming down the dependencies allows to make it easier to port OASIS on
      other platforms (like Windows) where some former dependencies were tricky
      to compile (like camlp4).

  * Stop using -install-lib-dir on Windows.

    This change prevents the use of -install-lib-dir on Windows, for OCaml
    version greater than 3.11.1. The bug in ocamlbuild has been fixed in OCaml
    3.11.1 [1]. This is a bit a shot in the dark, since testing on Windows is
    not setup.

    [1]: https://github.com/ocaml/ocamlbuild/commit/79cf4029b

  * Minor changes:
    * Consistently use choices type in OASISExpr module.
    * Make OCamlbuild plugin not assume that dynamic linking is supported.
      (Patch: #1536) (Closes: #1251)
    * Improve setup.log parsing, by using Genlex.
    * Enforce using a published version of OASIS to generate its own setup.ml,
      provide explanations in HACKING.md.
    * Fix problem reading files on Cygwin (esp. setup.log), reported size after
      an append doesn't reflect the real size of the file in some cases.
    * Always compile src/tools/* and move dist.ml there.
    * Refactor string version comparison into its own sub-module.
    * Fix missing rules for headache.
    * Remove unused userconf library.
    * Pass -thread to C files as well.
    * Don't use $< in explicit DevFiles build rule (BSD make compatibility).
    * Example to override cc when compiling C source files.
    * Remove the need for Bytes altogether.
    * Add fields "Tags" and "BugReports" to export them to OPAM.
    * Big documentation cleanup (`\_oasis` synopsis, doc/*).
    * Reformat source files using ocp-indent and start to use merlin.
    * Allow to use a string when testing values in `\_oasis`, for example it is
      now possible to use expression like 'ocaml_version("4.02.1")'
    * Improve OASISVersion.comparator_reduce. Now, it transforms the given
      comparator into its disjunctive form and order the version number.
    * Rename all executables so that their names match OCaml policy for module.
    * Move all executables into their own directories to prevent dependencies
      leak.
    * Transform tools into executables.
    * Always compile executables to check they still work.


  * Features:

    * no_automatic_syntax (alpha): don't disable the -package injection logic.

    * compiled_setup_ml (alpha):
      * Fix the configure file when using the compiled_setup_ml feature and
        improve the Makefile.
      * Recompile when needed while executing the configure script.

    * findlib_directory (beta, new):

      Findlib allows to specify a "directory" in a META file. This can be used
      to store some files of the library in sub-directories. This change
      allows to set and use this "directory" field.

      The InternalInstall plugin now handles installing files in
      sub-directories.  However there is no flag to specify this when using
      `ocamlfind install`, so we use a standard file installation, with a
      best-guess computation of the target directory.

      The META plugin can now set the "directory" field according to what has
      been set in the `_oasis` file. Note that, for nested package the install
      directory is relative to the install directory of the parent package.

      Example:
        BetaFeatures: findlib_directory
        Plugins: META(0.4)

        Library library
          [...]
          FindlibDirectory: lib

      Thanks to Gabriel Radanne for this contribution. (Closes: #1305)

    * findlib_extra_files (beta, new):

      This change allows to use a new `_oasis` field 'FindlibExtraFiles' to
      install extra files along the matching library/object in findlib.

      Example:
        BetaFeatures: findlib_extra_files

        Library library
          [...]
          FindlibName: foobar
          FindlibExtraFiles: myfile.txt

      In this case `myfile.txt` will be installed in the same directory as the
      'foobar' package.

      Thanks to Evgenii Lepikhin for the contribution. (Closes: #802)

    * source_patterns (alpha, new):

      This change allows to override the built-in source files search. It uses
      user-provided 'InterfacePatterns' and 'ImplementationPatterns' fields and
      a small DSL to define how to find a file matching a given module. The
      fields can be defined at the top level or in the Library section.

      The DSL is based on Genlex and Buffer.add_substitute. It has two
      functions `capitalize_file` and `uncapitalize_file` and one variable
      `module`.

      Example:
        AlphaFeatures: source_patterns

        Library library
          [...]
          Modules: FooBar
          InterfacePatterns+: ${module}.eliomi
          ImplementationPatterns+:  ${module}.eliom

      It is particularly useful to get rid of the warnings like:
      W: Cannot find source file matching module [...]

      Thanks to Petter Urkedal for this contribution.

Thanks to Spiros Eliopoulos, Paul Snively, Jeremie Dimino, Christopher
Zimmermann, Christophe Troestler, Max Mouratov, Jacques-Pascal Deplaix, Geoff
Shannon, Simon Cruanes, Vladimir Brankov, Gabriel Radanne, Evgenii Lepikhin,
Petter Urkedal, Gerd Stolpmann and Anton Bachin for their contributions.