TokTok / hs-msgpack-binary

Haskell implementation of MessagePack / msgpack.org
http://msgpack.org/
Other
16 stars 10 forks source link

data-msgpack-0.0.5 benchmark build failure #20

Closed DanBurton closed 7 years ago

DanBurton commented 7 years ago

As seen on the stackage build server:

Preprocessing executable 'msgpack-parser' for data-msgpack-0.0.5...
[1 of 1] Compiling Main             ( tools/msgpack-parser.hs, dist/build/msgpack-parser/msgpack-parser-tmp/Main.o )
Linking dist/build/msgpack-parser/msgpack-parser ...
Preprocessing benchmark 'benchmark' for data-msgpack-0.0.5...
[1 of 1] Compiling Main             ( bench/benchmark.hs, dist/build/benchmark/benchmark-tmp/Main.o )

bench/benchmark.hs:6:1: error:
    Failed to load interface for ‘Data.MessagePack.IntBench’
    Perhaps you meant
      Data.MessagePack.Instances (from data-msgpack-0.0.5)
      Data.MessagePack.Object (from data-msgpack-0.0.5)
      Data.MessagePack.Spec (needs flag -package-key messagepack-0.5.3)
    Use -v to see a list of the files searched for.

bench/benchmark.hs:7:1: error:
    Failed to load interface for ‘Data.MessagePackBench’
    Perhaps you meant
      Data.MessagePack (from data-msgpack-0.0.5)
      Data.MessagePack (needs flag -package-key messagepack-0.5.3)
      Data.MessagePack.Get (from data-msgpack-0.0.5)
    Use -v to see a list of the files searched for.

How I reproduced this locally:

$ stack unpack data-msgpack-0.0.5
$ cd data-msgpack
$ stack init --resolver nightly-2016-10-24
$ stack build --bench
iphydf commented 7 years ago

Working on it.

iphydf commented 7 years ago

Fixed in 0.0.6. Thanks for the report.

DanBurton commented 7 years ago

I still get the same error when I follow the repro steps with 0.0.6

$ stack unpack data-msgpack-0.0.6
$ cd data-msgpack
$ stack init --resolver nightly-2016-10-24
$ stack build --bench
iphydf commented 7 years ago

@DanBurton I tried again.. cabal sdist fails to add the benchmark modules. I hackishly created my own tarball and uploaded it.

DanBurton commented 7 years ago

Note that the tarball is actually missing the test suite module files

├── test
│   └── testsuite.hs

That's all there is in the test folder of the tarball. So the test suite might still pass, but only trivially so. I believe the solution is to specify other-modules listing the modules used by each build target, or other-source-files at the top level of the cabal file, which allows for some globbing expressions.

iphydf commented 7 years ago

I see. Thanks for noting that. I've fixed that in #26 now, using other-source-files.