creswick/cabal-dev

add-source tarball

Opened this issue · 3 comments

If I understand correctly, cabal-dev add-source uses sdist to copy dependencies to a sandbox. For various reasons, however, some packages cannot be effectively packaged using sdist. Perhaps it would make sense if add-source could accept a tarball in addition to the usual directory?

Oh, this doesn't seem to be documented. add-source does accept a tarball, but it does need to be an sdisted tarball.

However, it sounds like you have tarballs of source dirs that aren't created via sdist -- is there an easy way to tell these apart? We could probably untar to a temp dir and install to the sandbox from that.

Hmm, come to think of it, I don't have any examples that I couldn't address by actually fixing something in the relevant Cabal files. I'll have to dig one up later if I come to that. Sorry! I certainly understand if you feel it's best to close this in the interim

I've definitely run into this sort of issue before -- packages that won't sdist are more difficult to handle; but I haven't run into a case where a tarball was sitting around (I've only had this happen with bleeding-edge packages from source control).

Let's leave this open a while longer so anyone else can chime in with use cases.