make sure cabal-install is compatible with Cabal
[cabal.git] / doc / hcar / Cabal-201611.tex
blobdbf5d6d3978da64f7dd1eccb2f342bb057f84865
1 % Cabal-MC.tex
2 \begin{hcarentry}{Cabal}
3 \label{cabal}%\label{hackage}\label{hackagedb}%
4 \report{Mikhail Glushenkov}%11/16
5 \status{Stable, actively developed}
6 \makeheader
8 \subsubsection*{Background}
10 Cabal is the standard packaging system for Haskell software. It specifies a
11 standard way in which Haskell libraries and applications can be packaged so
12 that it is easy for consumers to use them, or re-package them, regardless of
13 the Haskell implementation or installation platform.
15 \texttt{cabal-install} is the command line interface for the Cabal and Hackage
16 system. It provides a command line program \texttt{cabal} which has
17 sub-commands for installing and managing Haskell packages.
19 \subsubsection*{Recent Progress}
21 We've recently produced
22 \href{https://mail.haskell.org/pipermail/cabal-devel/2016-December/010384.html}{new
23 point releases} of Cabal/\texttt{cabal-install} from the 1.24
24 branch. Among other things, Cabal 1.24.2.0 includes a
25 \href{https://gitlab.haskell.org/ghc/ghc/-/issues/12479}{fix} necessary to
26 make soon-to-be-released GHC 8.0.2 work on macOS Sierra.
28 Almost 1500 commits were made to the \texttt{master} branch by
29 \href{https://gist.github.com/23Skidoo/1a291fd56a18b51f415db5fbaff56ec6}{53
30 different contributors} since the 1.24 release. Among the highlights are:
32 \begin{compactitem}
33 \item
34 \href{http://cabal.readthedocs.io/en/latest/developing-packages.html#library}{Convenience,
35 or internal libraries} -- named libraries that are only intended
36 for use inside the package. A common use case is sharing code
37 between the test suite and the benchmark suite without exposing it
38 to the users of the package.
40 \item Support for
41 \href{http://cabal.readthedocs.io/en/latest/developing-packages.html#foreign-libraries}{foreign
42 libraries}, which are Haskell libraries intended to be used by
43 foreign languages like C. Foreign libraries only work with GHC 7.8
44 and later.
46 \item Initial support for building Backpack packages. Backpack is an
47 exciting new project adding an ML-style module system to Haskell,
48 but on the package level. See
49 \href{https://github.com/ezyang/ghc-proposals/blob/backpack/proposals/0000-backpack.rst}{here}
50 and \href{http://blog.ezyang.com/category/haskell/backpack/}{here}
51 for a more thorough introduction to Backpack.
53 \item \texttt{./Setup configure} now accepts an argument
54 \href{https://github.com/ghc-proposals/ghc-proposals/pull/4}{specifying
55 the component to be configured}. This is mainly an internal
56 change, but it means that \texttt{cabal-install} can now perform
57 component-level parallel builds (among other things).
59 \item A lot of improvements in the \texttt{new-build} feature
60 (a.k.a. nix-style local builds). Git \texttt{HEAD} version of
61 \texttt{cabal-install} is now recommended if you use
62 \texttt{new-build}. For an introduction to \texttt{new-build}, see
63 \href{http://cabal.readthedocs.io/en/latest/nix-local-build-overview.html}{this
64 chapter} of the manual.
66 \item Special support for the Nix package manager in
67 \texttt{cabal-install}. See
68 \href{http://cabal.readthedocs.io/en/latest/nix-integration.html}{here}
69 for more details.
71 \item \texttt{cabal upload} now uploads a package candidate by
72 default. Use \texttt{cabal upload -{}-publish} to upload a final
73 version. \texttt{cabal upload -{}-check} has been removed in favour
74 of package candidates.
76 \item
77 \href{http://cabal.readthedocs.io/en/latest/nix-local-build.html#cfg-field-index-state}{An
78 \texttt{-{}-index-state} flag} for requesting a specific version
79 of the package index.
81 \item \href{https://github.com/haskell/cabal/pull/3818}{New \texttt{cabal reconfigure} command}, which re-runs
82 \texttt{configure} with most recently used flags.
84 \item
85 \href{http://cabal.readthedocs.io/en/latest/developing-packages.html#autogenerated-modules}{New
86 \texttt{autogen-modules} field} for modules built automatically
87 (like \texttt{Paths\_PACKAGENAME}).
89 \item
90 \href{http://cabal.readthedocs.io/en/latest/developing-packages.html#pkg-field-build-depends}{New
91 version range operator} \texttt{\^{}>=}, which is equivalent to
92 \texttt{>=} intersected with an automatically-inferred major version
93 bound. For example, \texttt{\^{}>= 2.0.3} is equivalent to \texttt{>=
94 2.0.3 \&\& < 2.1}.
96 \item
97 \href{http://cabal.readthedocs.io/en/latest/installing-packages.html#cmdoption-setup-configure--allow-newer}{An
98 \texttt{-{}-allow-older} flag}, dual to \texttt{-{}-allow-newer}.
100 \item New Parsec-based parser for \texttt{.cabal} files
101 \href{https://github.com/haskell/cabal/pull/3602}{has been merged},
102 but not enabled by default yet.
104 \item \href{http://cabal.readthedocs.io/en/latest/}{The manual} has
105 been converted to reST/Sphinx format, improved and expanded.
107 \item
108 \href{https://www.well-typed.com/blog/2015/08/hackage-security-beta/}{Hackage
109 Security} has been enabled by default.
111 \item A lot of bug fixes and performance improvements.
113 \end{compactitem}
115 \subsubsection*{Looking Forward}
117 The next Cabal/\texttt{cabal-install} versions will be released either
118 in early 2017, or simultaneously with GHC 8.2 (April/May 2017). Our
119 main focus at this stage is getting the \texttt{new-build} feature to
120 the state where it can be enabled by default, but there are many other
121 areas of Cabal that need work.
123 We would like to encourage people considering contributing to take a
124 look at \href{https://github.com/haskell/cabal/issues/}{the bug
125 tracker on GitHub} and the
126 \href{https://github.com/haskell/cabal/wiki/Hackathon-2016}{Wiki},
127 take part in discussions on tickets and pull requests, or submit their
128 own. The bug tracker is reasonably well maintained and it should be
129 relatively clear to new contributors what is in need of attention and
130 which tasks are considered relatively easy. For more in-depth
131 discussion there is also the
132 \href{https://mail.haskell.org/mailman/listinfo/cabal-devel}{\texttt{cabal-devel}}
133 mailing list.
135 \FurtherReading
136 \begin{compactitem}
137 \item Cabal homepage:\hfill\url{https://www.haskell.org/cabal/}\\
138 \item Cabal on GitHub:\hfill\url{https://github.com/haskell/cabal}
139 \end{compactitem}
140 \end{hcarentry}