haskell-github-trust/thyme

Test suite failures

Closed this issue · 17 comments

peti commented

I got the following test suite failures on Linux/x86_64 running GHC 7.6.3:

Running 2 test suites...
Test suite rewrite: RUNNING...
Test suite rewrite: FAIL
Test suite logged to: dist/test/thyme-0.3.0.0-rewrite.log
Test suite sanity: RUNNING...
Test suite sanity: PASS
Test suite logged to: dist/test/thyme-0.3.0.0-sanity.log
1 of 2 test suites (1 of 2 test cases) passed.

Unfortunately, that is all the output I have. :-( The log files contain the same thing, no extra information.

The "rewrite" test may be a bit flaky (because it tries to recompile itself) and are supposed to fail if optimisation is off (with -O0; perhaps I should add an exception for that… but I really don't think it 's a good idea to compile with -O0.) Could you run cabal test --show-details=always and see if you can extract any more information?

peti commented

Adding the --show-details=always flag makes almost no difference, I'm afraid:

Running 2 test suites...
Test suite rewrite: RUNNING...
Test suite rewrite: FAIL
Test suite logged to: dist/test/thyme-0.3.0.0-rewrite.log
Test suite sanity: RUNNING...
+++ OK, passed 100 tests.
+++ OK, passed 100 tests.
+++ OK, passed 100 tests.
+++ OK, passed 100 tests.
+++ OK, passed 100 tests.
+++ OK, passed 100 tests.
Test suite sanity: PASS
Test suite logged to: dist/test/thyme-0.3.0.0-sanity.log
1 of 2 test suites (1 of 2 test cases) passed.

I'm confused when you say that dist/test/thyme-0.3.0.0-rewrite.log has no extra information in it. What happens when you run dist/build/rewrite/rewrite directly?

If you're on IRC, I'm in #haskell.

peti commented

When I run rewrite manually, it says:

$ ./dist/build/rewrite/rewrite
rewrite: dist/build/rewrite/rewrite-tmp/Main.hi: does not exist

What version of cabal are you running? cabal --version

What options are you passing to cabal configure?

Could you paste the output of find dist/build/rewrite? (Or the next directory up if that doesn't exist. I don't know anything about NixOS.)

The first few lines of hook in tests/rewrite.hs tries to delete the intermediate files such that the following call of cabal build will actually rebuild rewrite. I don't know of a better way to do that, but perhaps I haven't looked hard enough.

@peti I'd appreciate any updates on this. I'm happy to do IRC or Google Hangouts.

peti commented

What version of cabal are you running?

The Setup binary is compiled with Cabal 1.16.0. The build does not involve cabal-install.

What options are you passing to cabal configure?

The relevant flags are --disable-library-profiling --enable-split-objs --enable-tests.

Could you paste the output of find dist/build/rewrite?

$ find . -name '*rewrite*'
./dist/build/rewrite
./dist/build/rewrite/rewrite
./dist/build/rewrite/rewrite-tmp
./tests/rewrite.hs

$ tree -a dist/build/rewrite/
dist/build/rewrite/
├── rewrite
└── rewrite-tmp
    ├── Main.hi
    ├── Main.o
    └── Main_o_split
        ├── Main__100.o
        ├── Main__101.o
        ├── Main__102.o
        ├── Main__103.o
        ├── Main__10.o
        ├── Main__11.o
        ├── Main__12.o
        ├── Main__13.o
        ├── Main__14.o
        ├── Main__15.o
        ├── Main__16.o
        ├── Main__17.o
        ├── Main__18.o
        ├── Main__19.o
        ├── Main__1.o
        ├── Main__20.o
        ├── Main__21.o
        ├── Main__22.o
        ├── Main__23.o
        ├── Main__24.o
        ├── Main__25.o
        ├── Main__26.o
        ├── Main__27.o
        ├── Main__28.o
        ├── Main__29.o
        ├── Main__2.o
        ├── Main__30.o
        ├── Main__31.o
        ├── Main__32.o
        ├── Main__33.o
        ├── Main__34.o
        ├── Main__35.o
        ├── Main__36.o
        ├── Main__37.o
        ├── Main__38.o
        ├── Main__39.o
        ├── Main__3.o
        ├── Main__40.o
        ├── Main__41.o
        ├── Main__42.o
        ├── Main__43.o
        ├── Main__44.o
        ├── Main__45.o
        ├── Main__46.o
        ├── Main__47.o
        ├── Main__48.o
        ├── Main__49.o
        ├── Main__4.o
        ├── Main__50.o
        ├── Main__51.o
        ├── Main__52.o
        ├── Main__53.o
        ├── Main__54.o
        ├── Main__55.o
        ├── Main__56.o
        ├── Main__57.o
        ├── Main__58.o
        ├── Main__59.o
        ├── Main__5.o
        ├── Main__60.o
        ├── Main__61.o
        ├── Main__62.o
        ├── Main__63.o
        ├── Main__64.o
        ├── Main__65.o
        ├── Main__66.o
        ├── Main__67.o
        ├── Main__68.o
        ├── Main__69.o
        ├── Main__6.o
        ├── Main__70.o
        ├── Main__71.o
        ├── Main__72.o
        ├── Main__73.o
        ├── Main__74.o
        ├── Main__75.o
        ├── Main__76.o
        ├── Main__77.o
        ├── Main__78.o
        ├── Main__79.o
        ├── Main__7.o
        ├── Main__80.o
        ├── Main__81.o
        ├── Main__82.o
        ├── Main__83.o
        ├── Main__84.o
        ├── Main__85.o
        ├── Main__86.o
        ├── Main__87.o
        ├── Main__88.o
        ├── Main__89.o
        ├── Main__8.o
        ├── Main__90.o
        ├── Main__91.o
        ├── Main__92.o
        ├── Main__93.o
        ├── Main__94.o
        ├── Main__95.o
        ├── Main__96.o
        ├── Main__97.o
        ├── Main__98.o
        ├── Main__99.o
        └── Main__9.o

2 directories, 106 files

The first few lines of hook in tests/rewrite.hs tries to delete the intermediate files such that the following call of cabal build will actually rebuild rewrite.

I'm slightly baffled by the highly intrusive nature of the rewrite test. It seems rather unusual for a regression test to delete intermediate object files from the build directory when run! Why is this even necessary?

Anyway, the complete build log looks like this:

$ nix-build -o /tmp/thyme ~/.nix-defexpr -A haskellPackages.thyme
these derivations will be built:
  /nix/store/cjjhra92s998a1bbjyp9yj2plvxr5dfh-haskell-thyme-ghc7.6.3-0.3.0.0.drv
building path(s) `/nix/store/9r9nn0svc74wfpysxfxdn2g1jxaknr0x-haskell-thyme-ghc7.6.3-0.3.0.0'
>>> building /nix/store/9r9nn0svc74wfpysxfxdn2g1jxaknr0x-haskell-thyme-ghc7.6.3-0.3.0.0
>>> unpacking sources
>>> unpacking source archive /nix/store/3446wrv85jrvbvimymvwwnhangfk1yqc-thyme-0.3.0.0.tar.gz
>>> source root is thyme-0.3.0.0
>>> patching sources
>>> configuring
[1 of 1] Compiling Main             ( Setup.hs, Setup.o )
Linking Setup ...
configure flags: --disable-library-profiling --enable-split-objs --enable-tests --extra-lib-dir=/nix/store/8zj3lrxq48wbnm35807337g1y2n22pgb-haskell-attoparsec-ghc7.6.3-0.10.4.0/lib --extra-lib-dir=/nix/store/vggivdqss1y4g11zv1rf7finh8g8n857-haskell-lens-ghc7.6.3-3.9.1/lib --extra-lib-dir=/nix/store/vby9anl3hiayh1mfh1qdn3gxlk2a9jgi-haskell-QuickCheck-ghc7.6.3-2.6/lib --extra-lib-dir=/nix/store/1q56liwawd5jpgwc97a7a7rd9611vv0x-haskell-random-ghc7.6.3-1.0.1.1/lib --extra-lib-dir=/nix/store/xyp7bh5gzmrb71jxr09hz3ycb78my7w8-haskell-system-posix-redirect-ghc7.6.3-1.1/lib --extra-lib-dir=/nix/store/i0k3sjx7dhbc605r6p9dkdxs6qrabhy6-haskell-text-ghc7.6.3-0.11.3.1/lib --extra-lib-dir=/nix/store/whhz2m9bnk4p1yjwpwncd25s5dxsa1pq-haskell-vector-space-ghc7.6.3-0.8.6/lib --extra-lib-dir=/nix/store/8zj3lrxq48wbnm35807337g1y2n22pgb-haskell-attoparsec-ghc7.6.3-0.10.4.0/lib --extra-lib-dir=/nix/store/vggivdqss1y4g11zv1rf7finh8g8n857-haskell-lens-ghc7.6.3-3.9.1/lib --extra-lib-dir=/nix/store/vby9anl3hiayh1mfh1qdn3gxlk2a9jgi-haskell-QuickCheck-ghc7.6.3-2.6/lib --extra-lib-dir=/nix/store/1q56liwawd5jpgwc97a7a7rd9611vv0x-haskell-random-ghc7.6.3-1.0.1.1/lib --extra-lib-dir=/nix/store/i0k3sjx7dhbc605r6p9dkdxs6qrabhy6-haskell-text-ghc7.6.3-0.11.3.1/lib --extra-lib-dir=/nix/store/q8163w6ds0ig17m0j8l3lbqg41yv7h49-haskell-transformers-ghc7.6.3-0.3.0.0/lib --extra-lib-dir=/nix/store/a7znhja0150sn5bf628n6lqqc7nyacfg-haskell-vector-ghc7.6.3-0.10.0.1/lib --extra-lib-dir=/nix/store/whhz2m9bnk4p1yjwpwncd25s5dxsa1pq-haskell-vector-space-ghc7.6.3-0.8.6/lib 
Configuring thyme-0.3.0.0...
Flags chosen: werror=False, show-internal=False, bug-for-bug=True
Dependency Cabal -any: using Cabal-1.16.0
Dependency QuickCheck >=2.4: using QuickCheck-2.6
Dependency attoparsec >=0.10: using attoparsec-0.10.4.0
Dependency base >=4.5 && <5: using base-4.6.0.1
Dependency bytestring >=0.9: using bytestring-0.10.0.2
Dependency containers -any: using containers-0.5.0.0
Dependency deepseq >=1.2: using deepseq-1.3.0.1
Dependency directory -any: using directory-1.2.0.1
Dependency filepath -any: using filepath-1.3.0.1
Dependency lens >=3.9: using lens-3.9.1
Dependency old-locale >=1.0: using old-locale-1.0.0.5
Dependency random -any: using random-1.0.1.1
Dependency system-posix-redirect >=1.1: using system-posix-redirect-1.1
Dependency template-haskell >=2.6: using template-haskell-2.8.0.0
Dependency text >=0.11: using text-0.11.3.1
Dependency thyme -any: using thyme-0.3.0.0
Dependency time >=1.4: using time-1.4.0.1
Dependency transformers -any: using transformers-0.3.0.0
Dependency vector >=0.9: using vector-0.10.0.1
Dependency vector-space >=0.8: using vector-space-0.8.6
Using Cabal-1.16.0 compiled by ghc-7.6
Using compiler: ghc-7.6.3
Using install prefix:
/nix/store/9r9nn0svc74wfpysxfxdn2g1jxaknr0x-haskell-thyme-ghc7.6.3-0.3.0.0
Binaries installed in:
/nix/store/9r9nn0svc74wfpysxfxdn2g1jxaknr0x-haskell-thyme-ghc7.6.3-0.3.0.0/bin
Libraries installed in:
/nix/store/9r9nn0svc74wfpysxfxdn2g1jxaknr0x-haskell-thyme-ghc7.6.3-0.3.0.0/lib/thyme-0.3.0.0/ghc-7.6.3
Private binaries installed in:
/nix/store/9r9nn0svc74wfpysxfxdn2g1jxaknr0x-haskell-thyme-ghc7.6.3-0.3.0.0/libexec
Data files installed in:
/nix/store/9r9nn0svc74wfpysxfxdn2g1jxaknr0x-haskell-thyme-ghc7.6.3-0.3.0.0/share/thyme-0.3.0.0
Documentation installed in:
/nix/store/9r9nn0svc74wfpysxfxdn2g1jxaknr0x-haskell-thyme-ghc7.6.3-0.3.0.0/share/doc/thyme-0.3.0.0
No alex found
Using ar found on system at:
/nix/store/46595bx2k3yjznihv898592qnzirbvgm-binutils-2.23.1/bin/ar
No c2hs found
No cpphs found
No ffihugs found
Using gcc version 4.6.3 found on system at:
/nix/store/imgyva7wqc81w91q1agfrqk77b827hqv-gcc-wrapper-4.6.3/bin/gcc
Using ghc version 7.6.3 found on system at:
/nix/store/5brgfcsds7la03yy2l8g3jwjyasmalqj-ghc-7.6.3-wrapper/bin/ghc
Using ghc-pkg version 7.6.3 found on system at:
/nix/store/5brgfcsds7la03yy2l8g3jwjyasmalqj-ghc-7.6.3-wrapper/bin/ghc-pkg
No greencard found
Using haddock version 2.13.2 found on system at:
/nix/store/xq36g6s6gy2ww14pqaspvm6ma98n6dc3-ghc-7.6.3/bin/haddock
No happy found
No hmake found
Using hpc version 0.6 found on system at:
/nix/store/5brgfcsds7la03yy2l8g3jwjyasmalqj-ghc-7.6.3-wrapper/bin/hpc
Using hsc2hs version 0.67 found on system at:
/nix/store/5brgfcsds7la03yy2l8g3jwjyasmalqj-ghc-7.6.3-wrapper/bin/hsc2hs
No hscolour found
No hugs found
No jhc found
Using ld found on system at:
/nix/store/imgyva7wqc81w91q1agfrqk77b827hqv-gcc-wrapper-4.6.3/bin/ld
No lhc found
No lhc-pkg found
No nhc98 found
No pkg-config found
Using ranlib found on system at:
/nix/store/46595bx2k3yjznihv898592qnzirbvgm-binutils-2.23.1/bin/ranlib
Using strip found on system at:
/nix/store/46595bx2k3yjznihv898592qnzirbvgm-binutils-2.23.1/bin/strip
Using tar found on system at:
/nix/store/db7c4cg09100f927jw73qrg5nnvqpvc9-gnutar-1.26/bin/tar
No uhc found
>>> building
Building thyme-0.3.0.0...
Preprocessing library thyme-0.3.0.0...
[ 1 of 21] Compiling Data.Thyme.Format.Internal ( src/Data/Thyme/Format/Internal.hs, dist/build/Data/Thyme/Format/Internal.o )
[ 2 of 21] Compiling Data.Micro       ( src/Data/Micro.hs, dist/build/Data/Micro.o )
[ 3 of 21] Compiling Data.Thyme.TH    ( src/Data/Thyme/TH.hs, dist/build/Data/Thyme/TH.o )
[ 4 of 21] Compiling Data.Thyme.Calendar.Internal ( src/Data/Thyme/Calendar/Internal.hs, dist/build/Data/Thyme/Calendar/Internal.o )
[ 5 of 21] Compiling Data.Thyme.Clock.Internal ( src/Data/Thyme/Clock/Internal.hs, dist/build/Data/Thyme/Clock/Internal.o )
[ 6 of 21] Compiling Data.Thyme.Clock.POSIX ( src/Data/Thyme/Clock/POSIX.hs, dist/build/Data/Thyme/Clock/POSIX.o )
[ 7 of 21] Compiling Data.Thyme.Format.Human ( src/Data/Thyme/Format/Human.hs, dist/build/Data/Thyme/Format/Human.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package Boolean-0.2 ... linking ... done.
Loading package array-0.4.0.1 ... linking ... done.
Loading package deepseq-1.3.0.1 ... linking ... done.
Loading package bytestring-0.10.0.2 ... linking ... done.
Loading package text-0.11.3.1 ... linking ... done.
Loading package hashable-1.1.2.5 ... linking ... done.
Loading package containers-0.5.0.0 ... linking ... done.
Loading package nats-0.1 ... linking ... done.
Loading package semigroups-0.9.2 ... linking ... done.
Loading package void-0.6.1 ... linking ... done.
Loading package MemoTrie-0.6.1 ... linking ... done.
Loading package NumInstances-1.3 ... linking ... done.
Loading package vector-space-0.8.6 ... linking ... done.
Loading package extensible-exceptions-0.1.1.4 ... linking ... done.
Loading package transformers-0.3.0.0 ... linking ... done.
Loading package MonadCatchIO-transformers-0.3.0.0 ... linking ... done.
Loading package tagged-0.7 ... linking ... done.
Loading package comonad-3.1 ... linking ... done.
Loading package transformers-compat-0.1.1.1 ... linking ... done.
Loading package contravariant-0.4.4 ... linking ... done.
Loading package semigroupoids-3.1 ... linking ... done.
Loading package bifunctors-3.2.0.1 ... linking ... done.
Loading package distributive-0.3.1 ... linking ... done.
Loading package comonad-transformers-3.1 ... linking ... done.
Loading package mtl-2.1.2 ... linking ... done.
Loading package comonads-fd-3.0.3 ... linking ... done.
Loading package filepath-1.3.0.1 ... linking ... done.
Loading package pretty-1.1.1.0 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package generic-deriving-1.6.1 ... linking ... done.
Loading package parallel-3.2.0.3 ... linking ... done.
Loading package profunctors-3.3.0.1 ... linking ... done.
Loading package groupoids-3.0.1.1 ... linking ... done.
Loading package semigroupoid-extras-3.0.1 ... linking ... done.
Loading package profunctor-extras-3.3.3.1 ... linking ... done.
Loading package reflection-1.3.2 ... linking ... done.
Loading package split-0.2.2 ... linking ... done.
Loading package unordered-containers-0.2.3.0 ... linking ... done.
Loading package primitive-0.5.0.1 ... linking ... done.
Loading package vector-0.10.0.1 ... linking ... done.
Loading package lens-3.9.1 ... linking ... done.
Loading package attoparsec-0.10.4.0 ... linking ... done.
Loading package old-locale-1.0.0.5 ... linking ... done.
Loading package time-1.4.0.1 ... linking ... done.
Loading package random-1.0.1.1 ... linking ... done.
Loading package QuickCheck-2.6 ... linking ... done.
[ 8 of 21] Compiling Data.Thyme.Calendar.MonthDay ( src/Data/Thyme/Calendar/MonthDay.hs, dist/build/Data/Thyme/Calendar/MonthDay.o )
[ 9 of 21] Compiling Data.Thyme.Clock ( src/Data/Thyme/Clock.hs, dist/build/Data/Thyme/Clock.o )
[10 of 21] Compiling Data.Thyme.Calendar ( src/Data/Thyme/Calendar.hs, dist/build/Data/Thyme/Calendar.o )
[11 of 21] Compiling Data.Thyme.Calendar.OrdinalDate ( src/Data/Thyme/Calendar/OrdinalDate.hs, dist/build/Data/Thyme/Calendar/OrdinalDate.o )
[12 of 21] Compiling Data.Thyme.Calendar.WeekDate ( src/Data/Thyme/Calendar/WeekDate.hs, dist/build/Data/Thyme/Calendar/WeekDate.o )
[13 of 21] Compiling Data.Thyme.Calendar.WeekdayOfMonth ( src/Data/Thyme/Calendar/WeekdayOfMonth.hs, dist/build/Data/Thyme/Calendar/WeekdayOfMonth.o )
[14 of 21] Compiling Data.Thyme.LocalTime.TimeZone ( src/Data/Thyme/LocalTime/TimeZone.hs, dist/build/Data/Thyme/LocalTime/TimeZone.o )
[15 of 21] Compiling Data.Thyme.LocalTime.Internal ( src/Data/Thyme/LocalTime/Internal.hs, dist/build/Data/Thyme/LocalTime/Internal.o )
[16 of 21] Compiling Data.Thyme.LocalTime ( src/Data/Thyme/LocalTime.hs, dist/build/Data/Thyme/LocalTime.o )
[17 of 21] Compiling Data.Thyme.Clock.TAI ( src/Data/Thyme/Clock/TAI.hs, dist/build/Data/Thyme/Clock/TAI.o )
[18 of 21] Compiling Data.Thyme.Format ( src/Data/Thyme/Format.hs, dist/build/Data/Thyme/Format.o )
[19 of 21] Compiling Data.Thyme       ( src/Data/Thyme.hs, dist/build/Data/Thyme.o )
[20 of 21] Compiling Data.Thyme.Time.Core ( src/Data/Thyme/Time/Core.hs, dist/build/Data/Thyme/Time/Core.o )
[21 of 21] Compiling Data.Thyme.Time  ( src/Data/Thyme/Time.hs, dist/build/Data/Thyme/Time.o )
In-place registering thyme-0.3.0.0...
Preprocessing test suite 'rewrite' for thyme-0.3.0.0...
[1 of 1] Compiling Main             ( tests/rewrite.hs, dist/build/rewrite/rewrite-tmp/Main.o )
Linking dist/build/rewrite/rewrite ...
Preprocessing test suite 'sanity' for thyme-0.3.0.0...
[1 of 2] Compiling Common           ( tests/Common.hs, dist/build/sanity/sanity-tmp/Common.o )
[2 of 2] Compiling Main             ( tests/sanity.hs, dist/build/sanity/sanity-tmp/Main.o )
Linking dist/build/sanity/sanity ...
Running Haddock for thyme-0.3.0.0...
Preprocessing library thyme-0.3.0.0...
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: rts-1.0
Haddock coverage:
  28% (  5 / 18) in 'Data.Thyme.Format.Internal'
Warning: Data.Micro: We do not support associated types in instances yet. These instances are affected:
Data.VectorSpace.VectorSpace Data.Micro.Micro, Data.Basis.HasBasis Data.Micro.Micro
   0% (  0 /  5) in 'Data.Micro'
   0% (  0 /  2) in 'Data.Thyme.TH'
Warning: Data.Thyme.Calendar.Internal: We do not support associated types in instances yet. These instances are affected:
Data.AffineSpace.AffineSpace Data.Thyme.Calendar.Internal.Day
  16% (  7 / 44) in 'Data.Thyme.Calendar.Internal'
Warning: Data.Thyme.Clock.Internal: We do not support associated types in instances yet. These instances are affected:
Data.VectorSpace.VectorSpace Data.Thyme.Clock.Internal.DiffTime, Data.Basis.HasBasis Data.Thyme.Clock.Internal.DiffTime, Data.VectorSpace.VectorSpace Data.Thyme.Clock.Internal.NominalDiffTime, Data.Basis.HasBasis Data.Thyme.Clock.Internal.NominalDiffTime, Data.AffineSpace.AffineSpace Data.Thyme.Clock.Internal.UTCTime
  28% (  5 / 18) in 'Data.Thyme.Clock.Internal'
   0% (  0 /  5) in 'Data.Thyme.Clock.POSIX'
  80% (  4 /  5) in 'Data.Thyme.Format.Human'
  30% (  3 / 10) in 'Data.Thyme.Calendar.MonthDay'
  52% ( 11 / 21) in 'Data.Thyme.Clock'
  23% (  6 / 26) in 'Data.Thyme.Calendar'
  30% (  3 / 10) in 'Data.Thyme.Calendar.OrdinalDate'
  30% (  8 / 27) in 'Data.Thyme.Calendar.WeekDate'
  11% (  1 /  9) in 'Data.Thyme.Calendar.WeekdayOfMonth'
  70% (  7 / 10) in 'Data.Thyme.LocalTime.TimeZone'
  30% (  6 / 20) in 'Data.Thyme.LocalTime.Internal'
  33% ( 14 / 42) in 'Data.Thyme.LocalTime'
Warning: Data.Thyme.Clock.TAI: We do not support associated types in instances yet. These instances are affected:
Data.AffineSpace.AffineSpace Data.Thyme.Clock.TAI.AbsoluteTime
  29% (  2 /  7) in 'Data.Thyme.Clock.TAI'
  11% (  1 /  9) in 'Data.Thyme.Format'
 100% (  5 /  5) in 'Data.Thyme'
  19% ( 12 / 64) in 'Data.Thyme.Time.Core'
 100% (  2 /  2) in 'Data.Thyme.Time'
Documentation created: dist/doc/html/thyme/index.html
Preprocessing test suite 'rewrite' for thyme-0.3.0.0...
Preprocessing test suite 'sanity' for thyme-0.3.0.0...
>>> running tests
Running 2 test suites...
Test suite rewrite: RUNNING...
Test suite rewrite: FAIL
Test suite logged to: dist/test/thyme-0.3.0.0-rewrite.log
Test suite sanity: RUNNING...
Test suite sanity: PASS
Test suite logged to: dist/test/thyme-0.3.0.0-sanity.log
1 of 2 test suites (1 of 2 test cases) passed.
builder for `/nix/store/cjjhra92s998a1bbjyp9yj2plvxr5dfh-haskell-thyme-ghc7.6.3-0.3.0.0.drv' failed with exit code 1
error: build of `/nix/store/cjjhra92s998a1bbjyp9yj2plvxr5dfh-haskell-thyme-ghc7.6.3-0.3.0.0.drv' failed

Right, I hadn't anticipated the output of --enable-split-objs. I'll just delete everything under rewrite-tmp then. Let me know if 1665a06 works for you.

I'm slightly baffled by the highly intrusive nature of the rewrite test.

I'm not aware of a better way to do this that's not overly complicated. (Patches accepted.) I need to force GHC to compile something against the library part of thyme with -ddump-rule-firings and check that the rewrite rules actually fire. They're kind of important for thyme's claim of being a faster time library. In earlier versions I had to work around GHC not matching on certain rewrite rules (using the TimeDiff class, although that's 'official' now), so I'm concerned that they might break further down the line.

peti commented

OK, I see. That is a tricky problem, indeed.

I applied the patch you've mentioned. Unfortunately, it doesn't seem to fix the issue. When I run the build manually, it works okay:

$ dist/build/rewrite/rewrite ; echo $?
("fromSeconds\8759Double",1)
("fromSeconds\8759Float",2)
("fromSeconds\8759Int",1)
("fromSeconds\8759Int64",1)
("fromSeconds\8759Integer",2)
("realToFrac\8759DiffTime\8594Fractional",1)
("realToFrac\8759DiffTime\8594NominalDiffTime",1)
("realToFrac\8759NominalDiffTime\8594DiffTime",1)
("realToFrac\8759NominalDiffTime\8594Fractional",1)
("realToFrac\8759Real\8594DiffTime",1)
("realToFrac\8759Real\8594NominalDiffTime",1)
0.62894s
0.762942s
-2435215922440.448832s
1116540855875.148736s
-185110516278.488512s
4647691079636.15648s
-2655348670595.155493s
-6.999485849869807e12
6.006907523297506e12
0.521436s
3055321768692.16672s
0

Within the Nix build environment, however, the test still fails: http://hydra.cryp.to/build/13052.

I know why it's failing. Try 4f4c6c6.

peti commented

Very good. :-) Why is it failing?

Char is (and hence String are) supposed to be the representation of a Unicode character. Unfortunately GHC barfs when it has to print out any non-ASCII characters (such as when I do -ddump-rule-firings) when LANG is not set to a suitable locale. (I wish it would just spit out some UTF-8...) Your (and I guess many other Anglo-centric users') build environment probably has LANG=C or something (which is the default behaviour if LANG is not set), though most distros explicitly set something like LANG=en_GB.UTF-8 nowadays, but only for logged-in users.

Note to self: GHC has a -fforce-recomp flag but passing that to cabal build forces the whole library to be rebuilt again during the rewrite test. Alternatively, touch tests/rewrite.hs... but I'm inclined not to touch the actual source files.

peti commented

Interesting. The choice of "LANG=C" for the build environment causes a lot
of trouble for Haskell programs. We've had so many test suites fail because
of that setting that we've decided to switch to LANG="en_US.UTF-8" by
default in the next version of NixOS. Usually, we avoid setting those kinds
of environment variables during builds unless it's absolutely necessary ...
but it seams that LANG is, like, absolutely necessary.

Maybe it's the C (with implicit .ASCII) locale that's the problem. I was going to propose en_GB.UTF-8 to avoid issues of US-centrism (and replace it with another) but it actually looks like that LANG=C.UTF-8 might work.

Do you need me to do a release before nix picks it up?

peti commented

I would prefer to have a new release. It's going to be a while until the
stdenv change in NixOS becomes available to our users. Right now, we
still build everything with LANG=C.