Option to run test suites after `sdist` #1141

Open
snoyberg opened this Issue Dec 9, 2012 · 2 comments

Projects

None yet

4 participants

@snoyberg

Just floating an idea here. A very common test suite failure is that some source file is included in source control, but not included in the sdist. Usually the fix is simple: add the extra file to extra-source-files. But it would be nice to have this kind of check built into cabal-install. Perhaps something along the lines of exposing cabal sdist --check which:

  • Runs a cabal check
  • Create a tarball
  • Unpacks the tarball into a temporary folder
  • Runs cabal configure --enable-tests && cabal build && cabal test from that folder.
@tibbe
Haskell member

I would like to go one step further and make sure that building and running tests doesn't happen in the source directory but in some other directory, such that any files not listed in the .cabal file simply won't be found by the compiler and thus causes a compilation error in cabal build.

One way to achieve this (that probably won't work on Windows) is to symlink all the files listed in the .cabal file to another directory and run the build there.

@23Skidoo
Haskell member

Perhaps something along the lines of exposing cabal sdist --check

Alternatively, we can call this cabal check --sdist or just make check work like this by default.

@ttuegel ttuegel added the enhancement label Apr 23, 2015
@ttuegel ttuegel added this to the _|_ milestone Apr 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment