Skip to content

2.2 migration guide

Mikhail Glushenkov edited this page Feb 14, 2018 · 4 revisions

This page documents the backwards-incompatible changes in Cabal 2.2 affecting the authors of packages that use custom Setup scripts. See also the Cabal 2.0 migration guide page.

  • Distribution.Types.PackageDescription.allBuildInfo now returns all build infos, not only the ones for buildable components (#5087).
  • The UnknownBuildType constructor BuildType was removed (#5003).
  • FlagAssignment is now an opaque newtype.
  • The rawSystemStdInOut function now uses a proper type to represent binary and textual data (#4666).
  • The obsolete 'startsWithBOM', 'fileHasBOM', 'fromUTF8', and 'toUTF8' functions were removed (#4666).
  • compilerExtensions and ghcOptExtensionMap were changed to containMaybe Flags, since a supported extention can lack a flag (#4443).
  • Distribution.Simple.defaultHookedPackageDesc has been deprecated in favour of Distribution.Simple.findHookedPackageDesc (#4874).
  • Distribution.Simple.getHookedBuildInfo now takes an additional parameter specifying the build directory path (#4874).

The following change is not backwards-incompatible, but worth knowing about:

  • Added '.Lens' modules, with optics for package description data types (#4701).