haskell / containers

Assorted concrete container types
https://hackage.haskell.org/package/containers
315 stars 178 forks source link

intset-benchmarks no longer build on windows. #885

Open AndreasPK opened 1 year ago

AndreasPK commented 1 year ago

On commit 468aa9df067d3bd7413d0b383a106f609749eabe I get this after a checkout and running cabal run intset-benchmarks I get this error:

cabal run intset-benchmarks
Build profile: -w ghc-9.4.2 -O1
In order, the following will be built (use -v for more details):
 - containers-tests-0 (lib) (first run)
 - containers-tests-0 (bench:intset-benchmarks) (first run)
Preprocessing library for containers-tests-0..
Error: cabal.exe: can't find source for Data\Containers\ListUtils in src,
tests,
C:\ghc\msys64\home\andi\repos\containers\dist-newstyle\build\x86_64-windows\ghc-9.4.2\containers-tests-0\build\autogen,
C:\ghc\msys64\home\andi\repos\containers\dist-newstyle\build\x86_64-windows\ghc-9.4.2\containers-tests-0\build\global-autogen

Error: cabal.exe: Failed to build containers-tests-0 (which is required by
bench:intset-benchmarks from containers-tests-0).

Maybe some symbolic link use that breaks on windows?

treeowl commented 1 year ago

Hmmm... Yeah, I think we use symbolic links to share files between containers and containers-tests. Do you know a better way?

AndreasPK commented 1 year ago

Indeed

andi@Ryzen MINGW64 ~/repos/containers
$ cat containers-tests/src
../containers/src

But this should be a symbolic link.

Seems more compatible to me to use

  hs-source-dirs:   ../containers/src, tests

Inside containers-tests.cabal instead of using a symbolic link. As they are notoriously difficult to get to work by default on windows.

treeowl commented 1 year ago

Can you try it and open a PR?

AndreasPK commented 1 year ago

I opened https://github.com/haskell/containers/pull/886