[Hackage] #887: "cabal sdist" fails if a test suite has "other-modules: Paths_pkg"

Hackage cvs-ghc at haskell.org
Wed Sep 21 04:28:59 CEST 2011

#887: "cabal sdist" fails if a test suite has "other-modules: Paths_pkg"
  Reporter:  guest          |        Owner:          
      Type:  defect         |       Status:  new     
  Priority:  normal         |    Milestone:          
 Component:  Cabal library  |      Version:
  Severity:  normal         |     Keywords:          
Difficulty:  unknown        |   Ghcversion:          
  Platform:                 |  
 For example, for the skein package I can't specify

 Test-suite runtests
     Type: exitcode-stdio-1.0
     Other-modules: Paths_skein

 I want to do so because there is a file used as test data for the tests.
 The file is specified inside {{{Data-files}}}.  But, if I do so, I get:

 $ cabal sdist
 Building source dist for skein-0.1...
 cabal: Error: Could not find module: Paths_skein with any suffix:

 Note that the resulting executable {{{runtests}}} works, and {{{cabal
 test}}} works as well.  Note also that {{{Other-modules: Paths_skein}}}
 works on the {{{Library}}}, it fails only on the {{{Test-suite}}}.

 I've include a (hopefully) minimal test case.

 $ cabal configure --enable-tests
 Resolving dependencies...
 Configuring test-case-0.1...

 $ cabal build
 Preprocessing library test-case-0.1...
 Preprocessing test suites for test-case-0.1...
 Building test-case-0.1...
 Registering test-case-0.1...
 [1 of 2] Compiling Paths_test_case  (
 dist/build/autogen/Paths_test_case.hs, dist/build/runtests/runtests-
 tmp/Paths_test_case.o )
 [2 of 2] Compiling Main             ( test.hs, dist/build/runtests
 /runtests-tmp/Main.o )
 Linking dist/build/runtests/runtests ...

 $ cabal test
 Running 1 test suites...
 Test suite runtests: RUNNING...
 Test suite runtests: PASS
 Test suite logged to: dist/test/test-case-0.1-runtests.log
 1 of 1 test suites (1 of 1 test cases) passed.

 $ cabal sdist
 Distribution quality errors:
 No 'synopsis' or 'description' field.
 Distribution quality warnings:
 When distributing packages it is encouraged to specify source control
 information in the .cabal file using one or more 'source-repository'
 See the Cabal user guide for details.
 Note: the public hackage server would reject this package.
 Building source dist for test-case-0.1...
 cabal: Error: Could not find module: Paths_test_case with any suffix:

Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/887>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects

More information about the cabal-devel mailing list