| 28 | | A source tree consists of the GHC repository, with a set of packages in the libraries directory. If you only want to download the latest sources and aren't interested in working on GHC, then you can get ''partial'' repositories: |
| | 28 | A source tree consists of the GHC repository, |
| | 29 | with a set of library packages in the `libraries` directory. Each of these |
| | 30 | libraries has its own repository: see DarcsRepositories. |
| | 31 | |
| | 32 | If you plan to modify GHC, then you '''must''' get repositories with full history rather than just partial repositories. (Why? Because darcs has some bugs that sometimes cause problems when using partial repositories for anything more than just pulling the latest patches.) |
| | 33 | However, you cannot use `darcs get` to get a full GHC repository, for two reasons: |
| | 34 | * GHC has more than 16,000 patches and the get will take forever. |
| | 35 | * Darcs has a bug concerning the interaction of case-sensitivity and Windows, which makes Darcs crash if you do `darcs get` on the full GHC repository on Windows. |
| | 36 | |
| | 37 | Instead, follow the following steps: |
| | 38 | 0. Download a complete bundle of the required repositories first, using your browser rather than darcs. These bundles are on [http://darcs.haskell.org/] in files of the form `ghc-HEAD-`''date''`-ghc-corelibs-testsuite.tar.bz2`, e.g. `ghc-HEAD-2007-08-29-ghc-corelibs-testsuite.tar.bz2`.[[BR]][[BR]] |
| | 39 | 0. Unpack the bundle, which will create a directory called `ghc`. You can rename this directory freely.[[BR]][[BR]] |
| | 40 | 0. Change into the new directory, and pull patches from the main GHC repository: |
| | 41 | {{{ |
| | 42 | $ cd ghc |
| | 43 | $ darcs pull -a |
| | 44 | }}} |
| | 45 | 0. Now use the `darcs-all` script to pull patches from all the library repositories, and the testsuite repository: |
| | 46 | {{{ |
| | 47 | $ ./darcs-all pull -a |
| | 48 | }}} |
| | 49 | The command `darcs-all` automates the fetching of the repositories for the libraries. |
| | 50 | |
| | 51 | If you omit step (3), `darcs-all` will pull patches into the GHC repository too, and if that pulls a patch that modifies the `darcs-all` script itself, then bizarre things can (or at least could in the past) happen. The safe thing to do is to get your main `ghc` repo up to date (step 3) and then run the script. |
| | 52 | |
| | 53 | If you only want to download the latest sources and aren't interested in working on GHC, then you can get ''partial'' repositories: |
| 39 | | If you plan to modify GHC, then you really want to get repositories with full history rather than just partial repositories, the reason being that darcs has some bugs that sometimes cause problems when using partial repositories for anything more than just pulling the latest patches. However, don't just omit the `--partial` flag: GHC has more than 16,000 patches and the get will take forever. Instead, download a complete bundle of the required repositories first, these are on [http://darcs.haskell.org/] in files of the form `ghc-HEAD-`''date''`-ghc-corelibs-testsuite.tar.bz2`, e.g. `ghc-HEAD-2007-08-29-ghc-corelibs-testsuite.tar.bz2`. After unpacking the bundle, update your repositories like this: |
| 40 | | |
| 41 | | {{{ |
| 42 | | $ ..untar tarball.. |
| 43 | | $ cd ghc |
| 44 | | $ darcs pull -a |
| 45 | | $ ./darcs-all pull -a |
| 46 | | }}} |
| 47 | | If you do `darcs-all`, and that pulls in a patch that modifies the `darcs-all` script itself, then bizarre things can (or at least could in the past) happen. The safe thing to do is to get your main `ghc` repo up to date (the `darcs pull` line) and then run the script. |
| 48 | | |
| 49 | | The above will grab the "core" set of packages. This is the minimal set of packages required to bootstrap GHC. If you want to get a more comprehensive set of packages and include them in your GHC build, then you can say: |
| | 65 | The above will grab the "core" set of packages and the testsuite. This is the minimal set of packages required to bootstrap GHC. If you want to get a more comprehensive set of packages and include them in your GHC build, then you can say: |