wiki:Repositories

Version 25 (modified by dterei, 2 years ago) (diff)

--

GHC Repositories

This page lists the active repositories relating to GHC. For instructions on actually getting a GHC source tree, see Building/GettingTheSources.

For read-only browsing, you can use the:

GHC's repos use git; see Git Working Conventions. For darcs-related stuff see Darcs To Git and Git For Darcs Users.

Overview

A GHC source tree is made of a collection of repositories. The script sync-all knows how to apply git commands to the whole collection of repositories at once, for example to pull changes from the upstream repositories.

The root of the source tree is the GHC repository itself, the other repositories live in various subdirectories. The master list of repositories is in the file packages, and this is where the sync-all script finds out about which repositories make up the complete tree.

The "tag" in the master table in packages has the following significance:

  • "-": boot libraries, necessary to build GHC
  • "testsuite": GHC's regression tests, necessary for a build, but is necessary if you're working on GHC
  • "nofib": GHC's nofib benchmark suite
  • "dph": packages for Data Parallel Haskell, which is not shipped with GHC but we test all changes to GHC against these repositories so they are usually included in a checked-out source tree.
  • "extra": extra packages you might want to include in a build (the parallel package, for example), but aren't necessary to get a working GHC.

Repository and mirrors

Many of the libraries and tools in a GHC tree are actually maintained by someone else. They therefore have a separate upstream repository, from which we need to pull. That repository may be either a darcs or a git repository; in the darcs case, we also need to convert to a git repository for use in a GHC tree. However, if the darcs repository is on another server, then we first need to mirror it for the conversion program to use. This diagram shows how changes migrate from one repo to another:

No image "repos.png" attached to Repositories

This means that when making changes needed in GHC to one of these libraries, we first need to put the changes in the upstream repository. Note that a git hook prevents you from pushing patches to the ghc repos until they are already in the git mirror repos, so that we cannot forget to send changes upstream.

The mirrors are updated automatically each night, but you can force an immediate update by running /srv/darcs/do_mirrors on darcs.haskell.org.

When the master repo is in Git

If the master (upstream) repo is in Git (eg containers), you can use the following workflow:

  1. Push the change to the upstream repo //github.com/haskell/containers.git
  2. Push the change to the validated GHC repo for containers, namely http://darcs.haskell.org/packages/containers.git

In other words, you don't need to interact with the git mirror on darcs.haskell.org. It is only there so that in step (2), the push script can check that the patch you are pushing is in the mirror, thereby ensuring that we always lag the master repo. (For some reason this is hard to do directly on the master.)

Note step 2 will fail until the mirror has been updated.

When the master repo is in Darcs

Things are a bit more complicated when the master repo is in Darcs. For example, to make a change to Cabal:

  1. First push the change as a darcs patch to the upstream Cabal repository, http://code.haskell.org/Cabal/
  2. The patch will be mirrored and converted to git by the mirror script, in the repo http://darcs.haskell.org/git-mirrors/Cabal/.git/
  3. You then need to pull from http://darcs.haskell.org/git-mirrors/Cabal/.git/ into libraries/Cabal in a regular GHC tree, validate, and push to the GHC Cabal repo, http://darcs.haskell.org/packages/Cabal.git/

Repository locations

This table shows, for each repository in a GHC tree, where the central repository is, and what mirrors there are.

darcsgit
darcs upstreamdarcs mirrorgit upstreamgit mirrorghc (validated) repoin-tree
http://darcs.haskell.org/ghc.git/.ghc
http://darcs.haskell.org/ghc-tarballs.git/ghc-tarballs
http://darcs.haskell.org/utils/hsc2hs.git/utils/hsc2hs
http://darcs.haskell.org/haddock.gitutils/haddock
http://darcs.haskell.org/packages/array.git/libraries/array
http://darcs.haskell.org/packages/base.git/libraries/base
git://github.com/kolmodin/binary.githttp://darcs.haskell.org/git-mirrors/binary/binary.git/http://darcs.haskell.org/packages/.git/libraries/binary
http://darcs.haskell.org/bytestring/http://darcs.haskell.org/git-mirrors/bytestring/.git/http://darcs.haskell.org/packages/bytestring.git/libraries/bytestring
http://darcs.haskell.org/Cabal/http://darcs.haskell.org/git-mirrors/Cabal/.git/http://darcs.haskell.org/packages/Cabal.git/libraries/Cabal
git://github.com/haskell/containers.githttp://darcs.haskell.org/git-mirrors/containers/.git/http://darcs.haskell.org/packages/containers.git/libraries/containers
http://darcs.haskell.org/packages/directory.git/libraries/directory
http://darcs.haskell.org/packages/extensible-exceptions.git/libraries/extensible-exceptions
http://darcs.haskell.org/packages/filepath.git/libraries/filepath
http://darcs.haskell.org/packages/ghc-prim.git/libraries/ghc-prim
http://code.haskell.org/haskeline/http://darcs.haskell.org/darcs-mirrors/haskeline/http://darcs.haskell.org/git-mirrors/haskeline/.git/http://darcs.haskell.org/packages/haskeline.git/libraries/haskeline
http://darcs.haskell.org/packages/haskell98.git/libraries/haskell98
http://darcs.haskell.org/packages/haskell2010.git/libraries/haskell2010
(pull) git://code.eecs.tufts.edu/hoopl/hoopl.git, (push) linux.cs.tufts.edu:/r/c--/papers/dfopt.githttp://darcs.haskell.org/git-mirrors/hoopl/http://darcs.haskell.org/packages/hoopl.git/libraries/hoopl
http://darcs.haskell.org/packages/hpc.git/libraries/hpc
http://darcs.haskell.org/packages/integer-gmp.git/libraries/integer-gmp
http://darcs.haskell.org/packages/integer-simple.git/libraries/integer-simple
http://darcs.haskell.org/packages/mtl.git/libraries/mtl
http://darcs.haskell.org/packages/old-locale.git/libraries/old-locale
http://darcs.haskell.org/packages/old-time.git/libraries/old-time
git://github.com/haskell/pretty.githttp://darcs.haskell.org/git-mirrors/pretty/http://darcs.haskell.org/packages/pretty.git/libraries/pretty
http://darcs.haskell.org/packages/process.git/libraries/process
git://github.com/haskell/random.githttp://darcs.haskell.org/git-mirrors/random/http://darcs.haskell.org/packages/random.git/libraries/random
http://darcs.haskell.org/packages/template-haskell.git/libraries/template-haskell
http://code.haskell.org/terminfo/http://darcs.haskell.org/darcs-mirrors/terminfo/http://darcs.haskell.org/git-mirrors/terminfo/.git/http://darcs.haskell.org/packages/terminfo.git/libraries/terminfo
http://darcs.haskell.org/packages/unix.git/libraries/unix
https://github.com/glguy/utf8-string.githttp://darcs.haskell.org/git-mirrors/utf8-string/http://darcs.haskell.org/packages/utf8-string.git/libraries/utf8-string
git://github.com/haskell/win32.githttp://darcs.haskell.org/git-mirrors/Win32/http://darcs.haskell.org/packages/Win32.git/libraries/Win32
git://github.com/haskell/xhtml.githttp://darcs.haskell.org/git-mirrors/xhtml/http://darcs.haskell.org/packages/xhtml.git/libraries/xhtml
http://darcs.haskell.org/testsuite.git/testsuitetestsuite
http://darcs.haskell.org/nofib.gitnofibnofib
http://code.haskell.org/primitive/http://darcs.haskell.org/darcs-mirrors/primitive/http://darcs.haskell.org/git-mirrors/primitive/.git/http://darcs.haskell.org/packages/primitive.git/libraries/primitivedph
http://code.haskell.org/vector/http://darcs.haskell.org/darcs-mirrors/vector/http://darcs.haskell.org/git-mirrors/vector/.git/http://darcs.haskell.org/packages/vector.git/libraries/vector
http://darcs.haskell.org/packages/dph.git/libraries/dph
http://darcs.haskell.org/packages/deepseq.git/libraries/deepseqextra
http://darcs.haskell.org/packages/parallel.git/libraries/parallel
http://darcs.haskell.org/packages/stm.git/libraries/stm

Mirroring new packages to GitHub

Currently, all our repositories are being mirrored to GitHub by GitHub themselves. If you wish to add/remove a repository you need to email GitHub support at support@… and ask them to do it. Currently there is no way to administer this ourselves.

Branches

The following branches are active:

7.2 Branch
To switch to this branch run:
$ git checkout -b ghc-7.2 origin/ghc-7.2
$ ./sync-all checkout ghc-7.2