Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
119 lines (86 sloc) 4.93 KB
title description tags
What's new in Cabal 1.18 - sandboxes, REPL, cross-compilation and more!
Changelog for the 1.18 release of Cabal.
haskell

The 1.18 release of Cabal is almost ready. This post describes what's new and improved in this version.

User-visible features

  • Sandboxes - isolated environments for building packages, similar to (and inspired by) what the popular cabal-dev tool provides. See this article for a more detailed introduction.

  • cabal repl - New command that opens an interpreter session for the given target (executable or library). Code based on patches developed during GSoC 2011 by Sam Anklesaria.

  • cabal get - New command that replaces cabal unpack. When given the --source-repository argument (short form: -s) cabal get checks out a working copy of a given package's source code using the appropriate revision control system.

  • cabal run - New command that compiles and runs the given executable. Instead of cabal build && ./dist/build/prog/prog --args, you can now use cabal run prog -- --args.

  • Better support for cross-compilation: target platform is now inferred by parsing compiler's output (i.e., ghc --info). Packages are now installed to $arch-$os-$compiler/$pkgid instead of $pkgid/$compiler by default. (#1214)

  • It's now possible to specify a target for the build and repl commands. For example, if your package includes executables foo and bar, you can run cabal build foo to build only foo (and its dependencies). If there's also a library or test-suite named foo, cabal build exe:foo can be used for disambiguation.

  • New cabal configure and config file option: extra-prog-path. Allows to specify a list of directories to be searched for required programs. In newly-created config files it is initialised to ~/.cabal/bin, which should solve the common problem when cabal couldn't find programs that the user have just installed (usually alex/happy/c2hs) because they were in a location not on $PATH (#1415).

  • Two new config file sections: program-locations and program-default-options. This allows to specify custom paths and options for the required programs (#1328).

  • extra-doc-files: new package property for installing extra files referenced from the Haddock documentation, e.g. images (the lens package is a good example). (#1182).

  • Support for executables with C/C++/Obj-C main functions (#1080).

  • c-sources can now depend on headers generated for Haskell FFI exports (*_stub.h) (#1080).

  • Support for test and benchmark documentation with Haddock (#1374).

  • Support for GNU AGPLv3 license (#1361).

  • cabal test and cabal bench now imply cabal build.

  • The jobs field in the config file is now initialised with $ncpus.

  • install --dependencies-only is now a synonym for install --only-dependencies.

Bug fixes and minor improvements

  • GHC 7.8 support (#1252, #1384).

  • cabal update now downloads package metadata only if the server has a newer version (#799, #1341).

  • cabal init now generates less restrictive version bounds (#1329).

  • cabal init now can guess common types of extra-source-files (#1157).

  • Absoulute paths are now passed to Haddock as proper URLs (#1064, #1406).

  • dist/build/autogen dir is now included in the -I search list for c-sources (#1351).

  • When building libraries, c-sources are now built separately for profiling (#1286).

  • The --package-db flag now correctly handles relative paths (234417c2).

  • Annoying missing haddock warning for the rts package is now suppressed (#1231).

  • Improved warning for old versions of HPC (#1155).

  • Miscellaneous minor and/or internal bug fixes and improvements.

Acknowledgements

Thanks to everyone who contributed code to this release and to Johan Tibell for being the release manager.