OASIS is a tool to integrate a configure, build and install system in your OCaml project. It helps to create standard entry points in your build system and allows external tools to analyse your project easily. It is the building brick of OASIS-DB, a CPAN for OCaml.
This release takes almost 6 months to complete. This is a very long time, but the changelog matches the length. It closes 25 bugs and grants 31 feature requests.
A big part of the project was to match the need of the project OASIS-DB. The most visible part of this refactoring is the fully documented API and the new library oasis. This library is used to parse _oasis files and to manipulate its data. We use it in OASIS-DB but one can also use it to extract data and process it.
The other visible change for the user, is the command-line interface. We decided to use a lowercase name for the executable and a Subversion-like subcommand system. So the former command "OASIS -setup" is now "oasis setup". We manage now existing subcommand as plugins. We implemented also a set of new subcommands.
Among these subcommands, one is of a particular interest: "query". It parses an _oasis file and can return the value of any fields. For example: "oasis query Version" will return the version contained in the _oasis file located in the current working directory. It can be very useful to build shell scripts using OASIS. To have a complete listing of available fields, run "oasis query ListFields" on a particular files.
Most of the feature requests and bugs closed by this release are the result of the OCaml Hacking day demonstration and further work by other people. I would like to thank everyone that has submitted a bug or a feature request. The best way to make the OASIS project a great tool is to try it and tell us what is wrong with it — or what should be improved.
This release, as the one before, has been tested on Windows and Linux. The installers are now built on Centos 5.5, to allow wider compatibility.
- Split the project into 3 libraries and one executable:
- oasis: the core library
- oasis.base: the runtime library
- oasis.builtin-plugins: various plugins (ocamlbuild, internal, none, custom)
- the executable ‘oasis’ in lowercase which was ‘OASIS’ before
- Publish .mli and improve ocamldoc generated documentation
- oasis library:
- Ignore plugins even when parsing field
- Allow to redirect messages through a function and use a context to avoid global variables. This is an OASIS-DB website requirement, but we fallback to a global variable in oasis.base
- Use the same policy as Debian for version comparison (copied from dpkg)
- Add MIT, CeCILL licenses and make unknown license less fatal
- Allow https, ftp, mailto, svn, svn+ssh for URL
- Replace Str by Pcre
- Don’t modify package data structure through plugins, we just issue warnings and error when something is missing. This is compensated by a better ‘quickstart’ that can automatically complete required fields (e.g. it adds ‘ocamlbuild’ as a BuildDependency for ‘ocamlbuild’ plugin).
- Set default for test type to ‘custom’ plugin
- Use a more simple lexer for _oasis
- Warn if the use of ‘\t’ to indent lines is inconsistent in an _oasis file (e.g. mix of ‘ ‘ and ‘\t’)
- Allow to use ‘flag’ as environment variables in _oasis (e.g. flag test can be used as Command: echo $test
- oasis.base library:
- Exit with an error code when tests fail
- Don’t account skipped test
- Delegate the "setup-dev" actions to the executable ‘oasis’ rather than embedding it into setup.ml
- Add a ‘-version’ to setup.ml to know what version has generated the file
- Add a ‘-all’ target that does "-configure", "-build", "-doc" and "-test" in one run
- Add a ‘-reinstall’ target that ‘uninstall’ and ‘install’
- Use the right command to delete file on Windows
- executable ‘oasis’:
- Use a subcommand scheme, like subversion. For example, it replaces the former "OASIS -setup" by "oasis setup". Each subcommand can be a small plugin
- Add a "query" subcommand to extract data of _oasis from command line
- Add a "setup-clean" subcommand that removes generated files and helps cleaning OASIS_START/STOP section of their content
- Add a "check" subcommend that checks _oasis files
- Greatly improve the "quickstart" subcommand:
- Take into account plugins in quickstart
- Allow to have multiple choices for field Plugins in quickstart mode
- Don’t display help text at each question
- Allow to create a doc
- Allow to run a pager, editor or "oasis setup-dev" at the end
- Don’t accept ‘?’ as an answer in quickstart
- Add examples and all available licenses in the help of License field
- Keep generated files when ‘oasis setup-dev’ is called
- Plugin "ocamlbuild":
- Handle "Path: ." in generated _tags correctly
- Quick fix to handle .h files directly in CSources field
- Include .mli in _tags
- Pass -cclib and -dllpath options to ocamlmklib
- Don’t pass -dlllib and -dllpath options to ocamlopt
- Plugin "internal":
- Create parent directories when installing with InternalInstall
- Don’t install data when section is not built
- Plugin "META":
- Add an exists_if field to generated META file