Issue with building executables using Cabal on Travis

Hi Café! Recently we added an executable section to our Transient-Universe package and now Travis cabal builds always failing. The error message is: In-place registering transient-universe-0.3.4... Preprocessing executable 'monitorService' for transient-universe-0.3.4... [1 of 1] Compiling Main ( src/server/Transient/Monitor/Services/MonitorService.hs, dist/build/monitorService/monitorService-tmp/Main.o ) Linking dist/build/monitorService/monitorService ... No errors or warnings could be found in the package. Re-configuring with test suites enabled. If this fails, please run configure manually. Resolving dependencies... Configuring transient-universe-0.3.4... Package has no buildable test suites. Building source dist for transient-universe-0.3.4... Preprocessing library transient-universe-0.3.4... Preprocessing executable 'monitorService' for transient-universe-0.3.4... cabal: src/client/Transient/Move/Services/MonitorService.hs: does not exist Installing library in /home/travis/.cabal/lib/x86_64-linux-ghc-7.10.2/transient-universe-0.3.4-2OztnD6ZM7W2H3eixltaJX Installing executable(s) in /home/travis/.cabal/bin Warning: The directory /home/travis/.cabal/bin is not in the system search path. cabal: The file does not exist 'transient-universe-0.3.4.tar.gz'. (Full log — https://travis-ci.org/agocorona/transient-universe/jobs/160441018, you can see that other Cabal builds fail with same error, however all Stack builds are fine). This is a chunk of cabal file: extra-source-files: src/client/Transient/Move/Services/MonitorService.hs src/server/Transient/Move/Services/MonitorService.hs executable monitorService build-depends: base >4 && <5 if !impl(ghcjs >=0.1) hs-source-dirs: src/server/Transient/Monitor/Services build-depends: transformers , transient >=0.4.4 , transient-universe else hs-source-dirs: src/client/Transient/Monitor/Services main-is: MonitorService.hs default-language: Haskell2010 ghc-options: -threaded -rtsopts Have anyone faced similar issue?

On Friday, September 16, 2016 at 4:13:44 PM UTC+2, Артур Файзрахманов wrote:
Hi Café!
Recently we added an executable section to our Transient-Universe package and now Travis cabal builds always failing. The error message is:
In-place registering transient-universe-0.3.4... Preprocessing executable 'monitorService' for transient-universe-0.3.4... [1 of 1] Compiling Main ( src/server/Transient/Monitor/Services/MonitorService.hs, dist/build/monitorService/monitorService-tmp/Main.o ) Linking dist/build/monitorService/monitorService ... No errors or warnings could be found in the package. Re-configuring with test suites enabled. If this fails, please run configure manually. Resolving dependencies... Configuring transient-universe-0.3.4... Package has no buildable test suites. Building source dist for transient-universe-0.3.4... Preprocessing library transient-universe-0.3.4... Preprocessing executable 'monitorService' for transient-universe-0.3.4... cabal: src/client/Transient/Move/Services/MonitorService.hs: does not exist Installing library in /home/travis/.cabal/lib/x86_64-linux-ghc-7.10.2/transient-universe-0.3.4-2OztnD6ZM7W2H3eixltaJX Installing executable(s) in /home/travis/.cabal/bin Warning: The directory /home/travis/.cabal/bin is not in the system search path. cabal: The file does not exist 'transient-universe-0.3.4.tar.gz'.
(Full log — https://travis-ci.org/agocorona/transient-universe/jobs/160441018, you can see that other Cabal builds fail with same error, however all Stack builds are fine).
Not sure if you figured (you already reverted the change in https://github.com/agocorona/transient-universe/pull/16), but the key error is cabal: src/client/Transient/Move/Services/MonitorService.hs: does not exist and the error message is correct. The tricky bit is that this only fails when you run cabal sdist, not in the normal workflow—I remember being hit by this at some point. IIUC you're using the Travis config stack suggests (which in turn comes HVR's config)—maybe that needs more docs to help troubleshooting? That's full of subtleties that you don't learn by copy-pasting it. Cheers, Paolo
This is a chunk of cabal file:
extra-source-files: src/client/Transient/Move/Services/MonitorService.hs src/server/Transient/Move/Services/MonitorService.hs
executable monitorService build-depends: base >4 && <5 if !impl(ghcjs >=0.1) hs-source-dirs: src/server/Transient/Monitor/Services build-depends: transformers , transient >=0.4.4 , transient-universe else hs-source-dirs: src/client/Transient/Monitor/Services main-is: MonitorService.hs default-language: Haskell2010 ghc-options: -threaded -rtsopts
Have anyone faced similar issue?

Hey Paolo! Thank you! Yes, after a closer look I found that executable is built indeed, and error occurs somewhere after `cabal test` command. Running `cabal sdist` (in project root) locally yields exact same error! And you're right I've followed the instructions from Stack's docs and copy-pasted entire script (though I've made some changes to have GHCJS build too). Finally, thanks to you Paolo, I've spotted typos in cabal script. As you can see I have `Transient/Move` in extra source files section, however in executable section there are `Transient/Monitor` by mistake. After fixing that now `sdist` command succeeds locally! Very appreciate! сб, 17 сент. 2016 г. в 3:48, Paolo Giarrusso
On Friday, September 16, 2016 at 4:13:44 PM UTC+2, Артур Файзрахманов wrote:
Hi Café!
Recently we added an executable section to our Transient-Universe package and now Travis cabal builds always failing. The error message is:
In-place registering transient-universe-0.3.4... Preprocessing executable 'monitorService' for transient-universe-0.3.4... [1 of 1] Compiling Main ( src/server/Transient/Monitor/Services/MonitorService.hs, dist/build/monitorService/monitorService-tmp/Main.o ) Linking dist/build/monitorService/monitorService ... No errors or warnings could be found in the package. Re-configuring with test suites enabled. If this fails, please run configure manually. Resolving dependencies... Configuring transient-universe-0.3.4... Package has no buildable test suites. Building source dist for transient-universe-0.3.4... Preprocessing library transient-universe-0.3.4... Preprocessing executable 'monitorService' for transient-universe-0.3.4... cabal: src/client/Transient/Move/Services/MonitorService.hs: does not exist Installing library in /home/travis/.cabal/lib/x86_64-linux-ghc-7.10.2/transient-universe-0.3.4-2OztnD6ZM7W2H3eixltaJX Installing executable(s) in /home/travis/.cabal/bin Warning: The directory /home/travis/.cabal/bin is not in the system search path. cabal: The file does not exist 'transient-universe-0.3.4.tar.gz'.
(Full log — https://travis-ci.org/agocorona/transient-universe/jobs/160441018, you can see that other Cabal builds fail with same error, however all Stack builds are fine).
Not sure if you figured (you already reverted the change in https://github.com/agocorona/transient-universe/pull/16), but the key error is
cabal: src/client/Transient/Move/Services/MonitorService.hs: does not exist
and the error message is correct. The tricky bit is that this only fails when you run cabal sdist, not in the normal workflow—I remember being hit by this at some point.
IIUC you're using the Travis config stack suggests (which in turn comes HVR's config)—maybe that needs more docs to help troubleshooting? That's full of subtleties that you don't learn by copy-pasting it.
Cheers, Paolo
This is a chunk of cabal file:
extra-source-files: src/client/Transient/Move/Services/MonitorService.hs src/server/Transient/Move/Services/MonitorService.hs
executable monitorService build-depends: base >4 && <5 if !impl(ghcjs >=0.1) hs-source-dirs: src/server/Transient/Monitor/Services build-depends: transformers , transient >=0.4.4 , transient-universe else hs-source-dirs: src/client/Transient/Monitor/Services main-is: MonitorService.hs default-language: Haskell2010 ghc-options: -threaded -rtsopts
Have anyone faced similar issue?
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
participants (2)
-
Geraldus
-
Paolo Giarrusso