-
Notifications
You must be signed in to change notification settings - Fork 697
Hackathon 2016
This is a page to collect ideas for Cabal/Hackage hacking tasks/mini-projects for the Haskell eXchange Hackathon 2016. It is an updated version of a similar page for the 2015 infrastructure hackathon.
Please use the #hackage
IRC channel on freenode for online discussions.
Feel free to expand individual bullet points into full (linked) pages or tickets/issues.
See https://github.com/haskell/cabal/issues?q=is%3Aopen+is%3Aissue+label%3A%22meta%3A+easy%22 for a list of issues tagged "easy". New contributors to cabal-install
/Cabal code base should be able to find something to cut their teeth on in that list.
Mostly Cabal 2.0/3.0 and related. 2.0 is the next release due sometime later this year that will have hackage-security
enabled by default and an updated preview version of new-build
feature (see below). 3.0 is the more distant future version in which new-build
will replace old build commands and sandboxes.
-
Package collections in
cabal-install
andhackage-server
The idea here is to support package collections directly in our infrastructure. Currently package collections like Stackage are implemented indirectly by specially crafted
cabal.config
/cabal.project.freeze
files. Collections are also to be distributed via hackage, allowing anyone to define and distribute collections.A specification was posted to the libraries list recently. There is also some prototype code available for cabal-install. The cabal-install code adds solver support and allows for set-like operations on collections. Nothing has been started yet for
hackage-server
.This is an important feature since package collections are one of the two big solutions to cabal hell. This is not a huge project. There's probably enough for two people to work on the client side and two on the server side.
-
Improve
cabal new-build
new-build
is a major reworking of how Cabal/cabal-install works internally that unifies old build commands and sandboxes and is the main focus of our efforts right now. See Edward's blog post: http://blog.ezyang.com/2016/05/announcing-cabal-new-build-nix-style-local-builds/ for an intro tonew-build
and a more detailed explanation.There is a lot of work still to be done on
new-build
, and most of it can be done in parallel and in groups. We compiled the following list of tasks (roughly sorted by difficulty) that we feel are offering the most pay off right now and are suitable in scope for the hackathon:- Test Duncan's ghc-environments PR (use GHC 8.0.2 snapshot). PR link: https://github.com/haskell/cabal/pull/3936
- 'cabal new-install' for binaries. No relevant ticket, but should basically work just like
cabal install foo
does today for binaries modulo using the store for library dependencies. Should be easy to implement (new-build foo
+Setup.hs copy
). - Integration tests for new-build (e.g.: new-build everything on Stackage) https://github.com/haskell/cabal/issues/3322
- Replace new-build's call to
sdist --list-sources
with new command which lists sources of things that will be built, https://github.com/haskell/cabal/issues/3401 (deprecatesdist
hooks, use Stack code as reference, but use Cabal's file globs). - Fix this annoying bug:
ghc-options
applies to all dependencies, not just local packages, https://github.com/haskell/cabal/issues/3883 - UX design for user-wide environments (
cabal new-install
), relevant ticket: https://github.com/haskell/cabal/issues/3737 - UX design for
cabal new-update
(index freezing by default, interaction withcabal.project.freeze
). Talk with @ezyang and/or @hvr if they're online. Relevant ticket: https://github.com/haskell/cabal/issues/3832 - Go through the remaining issues in https://github.com/haskell/cabal/issues/3104 (difficulty: moderate)
- Get the new-clean PR into shape.
- Allow "sandbox without project file" functionality in new Cabal. https://github.com/haskell/cabal/issues/3730 (related to GHC environments, see
extra-packages
feature). - Go through the issues in the Galois meta tracking ticket: https://github.com/haskell/cabal/issues/3577
- Build on top of the
cabal new-build
code to supportcabal {run,test,bench}
etc. Relevant ticket: https://github.com/haskell/cabal/issues/3638 - Implement
cabal new-haddock
. - Design and implementation of locking the store for concurrent builds: https://github.com/haskell/cabal/issues/3741
- Add support for
git
/darcs
/... dependencies, https://github.com/haskell/cabal/issues/2189 (makes sense to start with tarball dependencies before tackling SCM ones -- tarballs are easier to test)
If the above is not enough, you can pick a task from the list of all open new-build
issues (https://github.com/haskell/cabal/issues?q=is%3Aissue+is%3Aopen+label%3A%22cabal-install%3A+nix-local-build%22).
-
Cabal documentation.
Cabal's user guide got quite a bit better recently, but there's still a lot of room for improvement. In particular, we want to put more emphasis on the
cabal-install
tool at the expense of theSetup.hs
interface and add a tutorial section. The new user guide TOC should look like roughly this:- Intro
- Tutorial, p.1 - how to use cabal-install to build and install existing packages
- Tutorial, p.2 - how to develop programs using cabal-install and write .cabal files -- basically, an updated version of https://wiki.haskell.org/How_to_write_a_Haskell_program.
-
.cabal
format reference -
cabal-install
command reference -
cabal new-build
chapter - Appendix: Cabal spec (i.e., the
Setup.hs
interface)
Anyone considering this should feel empowered to make decisions. You could decide to start from scratch with a new structure and just pinch material from the existing docs. You might want to fully split into tutorial and reference.
-
A new website for cabal-install/Cabal.
Our website hasn't been updated in ages, so a facelift is long due. It doesn't have to be super advanced, a simple Hakyll-based static page with a blog/news feed would suffice. Start by looking at the https://github.com/haskell/cabal-website repo.
-
Improvements in the release process.
This is mainly about automating the process of producing binaries for various platforms (Linux i386/x86-64, OS X, Windows x32/x64). We can either use Travis and AppVeyor or the haskell.org infrastructure. The latter requires extending the code of GHC Builder to support arbitrary Haskell projects besides just GHC, because that's what they (haskell.org) want to use for their build farm. Talk with Gershom (@gbaz/@sclv) if he's online about haskell.org integration.
-
Rewrite of the
.cabal
file parser.#2865
@phadej (Oleg Grenrus) is the person to talk to about this issue. This is in a good shape already, and we want to merge the code into mainline soon (but not enable it by default!) to ease the transition. Help Oleg with merging, experiment with using the new parser instead of the old one, write tests.
-
New AST for .cabal files (not an easy one!).
Builds on the new parser work. This should make it possible to programmatically edit
.cabal
files while preserving comments and formatting.
-
Include-able Common Stanzas
#2832
Builds on the new parser+AST. Allow to reduce duplication by moving common definitions to include-able
common
stanzas which can then be included from other stanzas.