[darcs-devel] interest in removing dependency on libcurl?

Justin Bailey jgbailey at gmail.com
Wed Jun 6 21:16:15 PDT 2007


On 6/4/07, Eric Y. Kow <eric.kow at gmail.com> wrote:
> I think Tim Chevalier was working on that.
>
> Does this sound something like what you would like to do?
> http://bugs.darcs.net/issue377

That's a bit more than I want to bite off. However, I have been
working on drop-in replacement for copyUrl in Curl.hs which does not
use libcurl. Instead, it uses the HTTP-3000 package (available from
hackage).

I'll send a patch and if it's not accepted, no big deal. However, here
are some some things I ran into while working on this:

  * Determining how to add a package the GHC command line was
non-trivial. Starting with GNUMakefile, I had to reason backwards
through automake.mk, automake.mk.in, configure and finally
configure.ac. Once I found configure.ac it was simple enough to add a
package test for the HTTP module. The --with-HTTP option to configure
didn't work, either.
  * For some reason, vanilla darcs with libcurl does not like to pull
from localhost. That took awhile to figure out so I could move forward
with testing ...
  * Once I got darcs downloading the inventory using the HTTP package,
my patch names were not matching up. I finally tracked it down when I
started printing the raw PatchInfo structures. Using openFile (on
Windows) was causing an extra CR (i.e. '\r') character to be added!
Luckily openBinaryFile avoids that problem.

After all that and about 2 days, I was able to download the darcs
repository from behind our firewall and will soon be sending in a
patch based on my changes!

Thanks for your initial help, and some of the build instructions you
put up on the wiki.

Justin


More information about the darcs-devel mailing list