Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to run test suites after sdist #1141

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

Option to run test suites after sdist #1141

snoyberg opened this issue Dec 9, 2012 · 2 comments
Labels
old-milestone: ⊥ Moved from https://github.com/haskell/cabal/milestone/5 type: enhancement
Milestone

Comments

@snoyberg
Copy link
Collaborator

snoyberg commented Dec 9, 2012

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
Copy link
Member

tibbe commented Dec 9, 2012

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
Copy link
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
old-milestone: ⊥ Moved from https://github.com/haskell/cabal/milestone/5 type: enhancement
Projects
None yet
Development

No branches or pull requests

5 participants