Ticket #274 (new enhancement)

Opened 7 months ago

Last modified 5 months ago

Add a 'build from sdist tarball' feature (aka distcheck)

Reported by: guest Assigned to:
Priority: normal Milestone:
Component: cabal-install tool Version: 1.2.3.0
Severity: normal Keywords:
Cc: gwern0@gmail.com Difficulty: normal
GHC Version: 6.8.2 Platform:

Description

I've often seen Darcs repos where the sdist tarball was incomplete, or where a person had a tarball which was incomplete.

I think this is because most people just never use the tarball; if they do ever use it, it's because it's what was downloaded from Hackage. The reason is that doing so is much more complex than 'configure; build; install': you need to configure, create an sdist tarball, cd into dist/; do a tar -xvf or whatever of the correct tarball; cd into *that* - and then you can configure/build/install. Assuming it is a working tarball.

Now, of course you can automate it. After the first dozen times, I wrote myself a shellscript to do all that for me:

function build_sdist { clean_configure && sdist &&

cd dist/ && untar *.tar.gz && cd ls -t ./ | grep "/" | head -n 1 && clean_configure && build && hinstall; haddock && hinstall; }

(This is pretty long and imperfect, but it would be even longer if all the other aliases and function definitions were included; I think they're pretty straightforwardly named though, so I haven't included them.)

It seems to me that this would be, at the very least, a useful adjunct to cabal check - if it makes sense to see whether various fields are filled out sanely, surely it makes sense to see whether needed files are included/listed?

It might be even better to make the normal 'runhaskell Setup build' do it from sdist, but this is harder to code (besides the forgoing, you'd need to copy in the configuration from the top-level, from when the user ran 'runhaskell Setup configure' and added whatever options) and possibly more confusing ("But Foo.hs *is* there, right there in src/! Why can't Cabal find it?"). So I'd be satisfied to do something like 'cabal checkdist'.

-- gwern

Change History

05/07/08 15:21:55 changed by duncan

  • priority changed from low to normal.
  • owner changed.
  • component changed from Cabal library to cabal-install tool.
  • summary changed from Add a 'build from sdist tarball' feature to Add a 'build from sdist tarball' feature (aka distcheck).

See also make distcheck from autoconf/automake http://www.gnu.org/software/libtool/manual/automake/Dist.html

06/21/08 22:59:56 changed by guest

  • cc set to gwern0@gmail.com.