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

#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: 1.10.1.0 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: ["gc","chs","hsc","x","y","ly","cpphs","hs","lhs"] }}} 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' sections. 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: ["gc","chs","hsc","x","y","ly","cpphs","hs","lhs"] }}} -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/887 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#887: "cabal sdist" fails if a test suite has "other-modules: Paths_pkg" ----------------------------+----------------------------------------------- Reporter: guest | Owner: ttuegel Type: defect | Status: assigned Priority: normal | Milestone: Component: Cabal library | Version: 1.10.1.0 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Changes (by ttuegel): * owner: => ttuegel * status: new => assigned Comment: Thanks for the test case! I'll have a look. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/887#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#887: "cabal sdist" fails if a test suite has "other-modules: Paths_pkg" ----------------------------+----------------------------------------------- Reporter: guest | Owner: ttuegel Type: defect | Status: assigned Priority: normal | Milestone: Component: Cabal library | Version: 1.10.1.0 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Comment(by ttuegel): The patch I just attached fixes the issue. Cabal filters autogenerated modules from the build info for libraries and executables when doing sdist; the patch extends this behavior to test suites. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/887#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#887: "cabal sdist" fails if a test suite has "other-modules: Paths_pkg"
----------------------------+-----------------------------------------------
Reporter: guest | Owner: ttuegel
Type: defect | Status: closed
Priority: normal | Milestone:
Component: Cabal library | Version: 1.10.1.0
Severity: normal | Resolution: fixed
Keywords: | Difficulty: unknown
Ghcversion: | Platform:
----------------------------+-----------------------------------------------
Changes (by duncan):
* status: assigned => closed
* resolution: => fixed
Comment:
Thanks for the report!
Thanks for the patch!
Applied!
{{{
Fri Sep 23 21:18:06 BST 2011 Thomas Tuegel

#887: "cabal sdist" fails if a test suite has "other-modules: Paths_pkg" ----------------------------+----------------------------------------------- Reporter: guest | Owner: ttuegel Type: defect | Status: closed Priority: normal | Milestone: Component: Cabal library | Version: 1.10.1.0 Severity: normal | Resolution: fixed Keywords: | Difficulty: unknown Ghcversion: | Platform: ----------------------------+----------------------------------------------- Comment(by elga): * [http://www.releve-identite-operateur.fr/rio-simyo.html simyo] -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/887#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#887: "cabal sdist" fails if a test suite has "other-modules: Paths_pkg" ----------------------------+----------------------------------------------- Reporter: guest | Owner: ttuegel Type: defect | Status: closed Priority: normal | Milestone: Component: Cabal library | Version: 1.10.1.0 Severity: normal | Resolution: fixed Keywords: | Difficulty: unknown Ghcversion: | Platform: ----------------------------+----------------------------------------------- Comment(by edouard): Termine un parcours du combattant ! les procedures, aujourd'hui tres simplifiees, sont accessibles en quelques clics seulement. [http://www .releve-identite-operateur.fr/rio-bouygues.html rio bouygues] -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/887#comment:5 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage