0install 2.14

Thomas Leonard <[email protected]> Sat, 23 Mar 2019 17:19:00 +0000
Newsgroups gmane.comp.file-systems.zero-install.devel
Message-ID <CAG4opy9jhej02NcCBXWbJf4==b8u4wCWcDkEGamJvt7kkUjQnA@mail.gmail.com>
0install 2.14 is now available (source and generic binaries):

  https://0install.net/install-source.html
  https://0install.net/install-linux.html#generic


Changes since 2.13:


New features

- Support `version` attribute on package-implementations. Sometimes
different versions of a distribution package need to be handled
differently. For example, selecting python-gobject version 2..!3 may
require us to select Python 2..!3 too. See
https://github.com/0install/repo.roscidus.com/pull/112 for an example
(note that the final syntax is different though - see
https://0install.net/interface-spec.html#package-implementation).


Bug fixes

- Warn about duplicate package-implementations. If two
<package-implementation> elements generate implementations with the
same ID then log a warning. The Python version of 0install used to do
this, but the OCaml version was missing the check. Reported in
https://github.com/0install/repo.roscidus.com/pull/112 by pmiess.

- Fix host Python test on macOS. On Debian (Python 3.5.3), __path__ is
a string, but on macOS (Python 3.6.5) it's a list. Error was: warning:
Failed to get details from Python: Bad JSON: ...


Code clean-ups

- Convert build system to Dune. Advantages include:
  - Reduces build time for a clean build from 35s to 12s (for make
all), and from 40s to 19s (with tests) on my laptop.
  - Reduces time for incremental builds. Doing "make" when nothing has
changed went from 5s to 0s. Changing base64.ml and rebuilding, the
time reduces from 20s to 4s.
  - The project is around 300 lines shorter with the new system.
  - If you want to make changes to a library that 0install uses, you
can just clone it as a subdirectory. Dune will automatically do fast
incremental builds across both projects.
  - The dune files should be easier to read than the myocamlbuild.ml file.

- Work around a type checker bug in OCaml 4.07
(https://github.com/ocaml/ocaml/issues/7824).

- Move 0install commands under new cli directory.

- Move all test data under tests/data. It was a bit spread out before,
with test data inherited from the Python in tests and other data in
ocaml/tests. Renamed a couple of files that differed only in case to
avoid confusion (and failing tests, on OS X).

- Don't run the unit-tests again when testing 0compile. This gets
called even when ounit isn't installed, which is now an error.

- Update to opam 2. The main opam repository has updated to a new
format, so opam 1 no longer works.

- Move Env to Support.Env. Allows removing varname from Common. Also,
tidied the code slightly.

- Move string utilities to XString.

- Move Safe_exception out of Common. Also, add an mli file and make
the payload type abstract. Some places that previously only displayed
the message now include the context if present (often it isn't, so
this makes no difference). This allows other things that use
exceptions to be moved out of Common.

- Move stdout out of system. Only the CLI code needs access to stdout.

- Remove set_mtime work-around. This was fixed in OCaml 4.03.

- Remove support for OpenSSL hash functions. Just use ocaml-sha everywhere.

- Use a map instead of a hashtable in Env. Makes it easier and more
reliable to temporarily add an item to it, makes it clearer when it
cannot be mutated, and ensures variables are always set in the same
order. Also, it now gives the location of the <command> element on
error.

- Replace Success/Problem with Ok/Error. These are built-in with OCaml >= 4.03.

- Use Format in more places.

- Tidy up tree.ml. Add an mli file and use Format for output.

- Rename fmt functions to pp. `pp` is the convention that other OCaml
programs use.

- Clean up command-building code.

- Use Filename.get_temp_dir_name in unit-tests. We no longer need to
support OCaml 3.12.

- Enable Travis tests for OCaml 4.07.

- Remove some old OCaml 4.02 support. We now require >= 4.03 anyway,
and it was causing a warning on OCaml 4.07.


-- 
talex5 (GitHub/Twitter)        http://roscidus.com/blog/
GPG: 5DD5 8D70 899C 454A 966D  6A51 7513 3C8F 94F6 E0CC