Questions that new darcs hackers may have...

Procedural questions

  1. Where I can get the a copy of the darcs development repo?
    •     *  darcs get --lazy http://darcs.net

  2. How do I submit a patch for inclusion in Darcs?
  3. Do I really have to run all those tests?
    • If you're pretty sure that your modification is ok, you could do a darcs record --no-test. A useful trick if you're working on many patches is to run darcs trackdown at the very end, when you're ready to test them out. Keep in mind that you can also use the tests/tests_to_run mechanism to select which tests you want to run whenever you do a make test.

  4. I'm bored. Give me something to do.
    • Check the bug tracker. Look out for bugs marked ProbablyEasy, otherwise, bugs with a comment like "this looks like something for a new darcs hacker to work on" which is your cue that the bug is easy enough to tackle.

    • If you want something more substantial to work on, check out the project ideas in GoogleSummerOfCode

  5. Should I worry about tests unexpectedly succeeding?
    • No. These are tests written for when certain wishlist features are implemented or bugs are corrected. If they unexpectedly succeed, it could either mean that the feature in question has been implemented (and that the test suite should be modified), or that darcs has system-specific behaviour or that there is something non-deterministic going on. (FIXME: any comments?)

  6. How do I edit the documentation?
    • The .tex files for the documentation are automatically generated from comments in the code, so don't look for the manual. Just edit relevant comments in the code.
  7. How do I specify additional packages for GHC to use when building darcs?
    • There are two options:
    • Edit the file "configure.ac" to add a test for additional packages that need to be linked. Look at the existing calls to GHC_CHECK_MODULE. If GHC-CHECK-MODULE succeeds for a particular pacakge, a -package argument will be added to GHC's build flags. You may have to run "autoconf" after editing this file to regenerate the configure script, though "make" should do it too.
    • Run the configure script with the --with-PACKAGE=yes argument.

Code questions

  1. What the heck is a slurpy?
    • It's a filesystem tree kept in memory. Slurpies are populated lazily.
  2. Do DarcsArguments support optional arguments?

    • No.
      • What would it take to make it support optional arguments?
  3. How do I add a command?
    • See AddACommand. Note that we tend to try avoiding new commands if we can help it.

  4. Whats the format of a patch bundle?
    1. a blank line
    2. "New patches:"
    3. a blank line
    4. The patches (see gzipped files in _darcs/patches for format).
    5. "Context:"
    6. The context (see darcs changes --context for format).
    7. "Patch bundle hash:"
    8. Hex representation of the sha1-hash of the patches in (4) WITHOUT "New patches", "Context:" and without blank lines. (Note that Im not a developer of darcs itself. These information is kind of reverse-engineered.)

  5. How does patch selection work?
  6. What is the difference between a patch set and a patch bundle, a named patch and a composite patch, etc?
  7. What's the convention for variable names, camelCase or using_underscores? I see both!
    • camelCase is for exported functions, using_underscores is for internal functions. Some older modules use_undescores everywhere, which might be worth fixing. See this thread. Anyway, don't worry too much about this. We can always fix it if we don't like your variable naming.

  8. Darcs does not allow tabs in Haskell code, how do I disable them in my editor?
  9. Where is this mysterious Workaround module?
    • It's generated when you run configure. To edit the module, look into aclocal.m4.

See also

DarcsWiki: DeveloperFAQ (last edited 2008-04-07 20:24:27 by gwern)