Build of container-test fails with cabal
AliceRixte opened this issue · comments
Hello again !
So I just tried to compile containers-test
via cabal and I ran into some other issue.
Compilation starts (which is an improvement compared with my previous attempt with stack) and eventually fails with
cabal-3.6.2.0.exe: can't find source for Data\Containers\ListUtils in src,
tests,
E:\Documents\...\containers\dist-newstyle\build\x86_64-windows\ghc-9.2.5\containers-tests-0\build\autogen,
E:\Documents\....\containers\dist-newstyle\build\x86_64-windows\ghc-9.2.5\containers-tests-0\build\global-autogen
** Steps to reproduce : **
- Uncomment the last two lines of
cabal.project
:
package containers-tests
ghc-options: -Werror
- Run
cabal test containers-tests
As with stacks, compiling containers
, with the two lines above commented, works fine though.
Cheers !
My semi-educated guess is that you're running into #630, which is a mess I don't really know how to help with. Could you try copying the src
and include
trees from the containers
subdirectory into the containers-tests
one after each round of modifications and before running tests/benchmarks? That might at least get you unstuck, though it will be annoying.
Alternatively (better?) you could copy that once, do whatever you need to do within the containers-tests
directory, then copy it back before you commit. We use symbolic links to replicate the source of containers
in containers-tests
. That lets us uncomment the containers
package from cabal.project
to avoid recompiling all the test and benchmark framework stuff while iterating on changes. There may be a better way, but I'm not good at this sort of devops stuff and that's what @phadej was able to figure out.
Yes, that was it ! I have managed to compile and run the tests, thanks a lot for your help !
I closed the issue because this would be a duplicate of #630 (comment)
You're welcome. Do you think you could write something up about what you did to add to CONTRIBUTING.md
? I don't have a Windows development environment, so I can't experiment with that sort of thing.
Sure, I'll do that tomorrow, I need some sleep first :)
That'd be great. Good night!
I added a pull request with some instructions. Actually it is possible on windows to use symlinks, so there's no need for the workaround you suggested before except for Windows 8 or earlier. This should also close #630