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

Build of container-test fails with cabal #940

Closed
AliceRixte opened this issue Mar 13, 2023 · 8 comments
Closed

Build of container-test fails with cabal #940

AliceRixte opened this issue Mar 13, 2023 · 8 comments

Comments

@AliceRixte
Copy link
Contributor

AliceRixte commented Mar 13, 2023

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 : **

  1. Uncomment the last two lines of cabal.project :
package containers-tests
   ghc-options: -Werror
  1. Run cabal test containers-tests

As with stacks, compiling containers, with the two lines above commented, works fine though.

Cheers !

@treeowl
Copy link
Contributor

treeowl commented Mar 13, 2023

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.

@treeowl
Copy link
Contributor

treeowl commented Mar 13, 2023

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.

@AliceRixte
Copy link
Contributor Author

Yes, that was it ! I have managed to compile and run the tests, thanks a lot for your help !

@AliceRixte
Copy link
Contributor Author

I closed the issue because this would be a duplicate of #630 (comment)

@treeowl
Copy link
Contributor

treeowl commented Mar 13, 2023

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.

@AliceRixte
Copy link
Contributor Author

Sure, I'll do that tomorrow, I need some sleep first :)

@treeowl
Copy link
Contributor

treeowl commented Mar 13, 2023

That'd be great. Good night!

@AliceRixte
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants