AndrewRademacher / aeson-casing

Tools to change the formatting of field names in Aeson instances.
MIT License
16 stars 3 forks source link

Tests fail (on mdern aeson?) #7

Closed trofi closed 9 months ago

trofi commented 3 years ago
Configuring aeson-casing-0.2.0.0...
Dependency aeson >=0.8: using aeson-1.5.6.0
Dependency base >=4.7 && <5.0: using base-4.14.1.0
Dependency aeson -any: using aeson-1.5.6.0
Dependency aeson-casing -any: using aeson-casing-0.2.0.0
Dependency base >=4.7 && <5.0: using base-4.14.1.0
Dependency tasty -any: using tasty-1.2.3
Dependency tasty-hunit -any: using tasty-hunit-0.10.0.3
Dependency tasty-quickcheck -any: using tasty-quickcheck-0.10.1.2
Dependency tasty-th -any: using tasty-th-0.1.7
Source component graph:
    component lib
    component test:casing dependency lib
Configured component graph:
    component aeson-casing-0.2.0.0-6DpDemP6cQC5Jwo8QdNZXC
        include aeson-1.5.6.0-89mRhAl4FhxDxUb2oPr1Yf
        include base-4.14.1.0
    component aeson-casing-0.2.0.0-DxlV4BRw1Uy8Q4631i5f9T-casing
        include aeson-1.5.6.0-89mRhAl4FhxDxUb2oPr1Yf
        include aeson-casing-0.2.0.0-6DpDemP6cQC5Jwo8QdNZXC
        include base-4.14.1.0
        include tasty-1.2.3-7jQjHiJLVlG7T5lZlhi0Bc
        include tasty-hunit-0.10.0.3-5pFQPUD42om9FFVN9h9CyQ
        include tasty-quickcheck-0.10.1.2-G3SWIFemDG33gMlEXVff6g
        include tasty-th-0.1.7-8wINti36qeIfSwBP1PsQw
Linked component graph:
    unit aeson-casing-0.2.0.0-6DpDemP6cQC5Jwo8QdNZXC
        include aeson-1.5.6.0-89mRhAl4FhxDxUb2oPr1Yf
        include base-4.14.1.0
        Data.Aeson.Casing=aeson-casing-0.2.0.0-6DpDemP6cQC5Jwo8QdNZXC:Data.Aeson.Casing,Data.Aeson.Casing.Internal=aeson-casing-0.2.0.0-6DpDemP6cQC5Jwo8QdNZXC:Data.Aeson.Casing.Internal
    unit aeson-casing-0.2.0.0-DxlV4BRw1Uy8Q4631i5f9T-casing
        include aeson-1.5.6.0-89mRhAl4FhxDxUb2oPr1Yf
        include aeson-casing-0.2.0.0-6DpDemP6cQC5Jwo8QdNZXC
        include base-4.14.1.0
        include tasty-1.2.3-7jQjHiJLVlG7T5lZlhi0Bc
        include tasty-hunit-0.10.0.3-5pFQPUD42om9FFVN9h9CyQ
        include tasty-quickcheck-0.10.1.2-G3SWIFemDG33gMlEXVff6g
        include tasty-th-0.1.7-8wINti36qeIfSwBP1PsQw
Ready component graph:
    definite aeson-casing-0.2.0.0-6DpDemP6cQC5Jwo8QdNZXC
        depends aeson-1.5.6.0-89mRhAl4FhxDxUb2oPr1Yf
        depends base-4.14.1.0
    definite aeson-casing-0.2.0.0-DxlV4BRw1Uy8Q4631i5f9T-casing
        depends aeson-1.5.6.0-89mRhAl4FhxDxUb2oPr1Yf
        depends aeson-casing-0.2.0.0-6DpDemP6cQC5Jwo8QdNZXC
        depends base-4.14.1.0
        depends tasty-1.2.3-7jQjHiJLVlG7T5lZlhi0Bc
        depends tasty-hunit-0.10.0.3-5pFQPUD42om9FFVN9h9CyQ
        depends tasty-quickcheck-0.10.1.2-G3SWIFemDG33gMlEXVff6g
        depends tasty-th-0.1.7-8wINti36qeIfSwBP1PsQw
Using Cabal-3.2.1.0 compiled by ghc-8.10
Using compiler: ghc-8.10.4
Using install prefix: /usr/local
Executables installed in: /usr/local/bin
Libraries installed in:
/usr/local/lib/x86_64-linux-ghc-8.10.4/aeson-casing-0.2.0.0-6DpDemP6cQC5Jwo8QdNZXC
Dynamic Libraries installed in: /usr/local/lib/x86_64-linux-ghc-8.10.4
Private executables installed in:
/usr/local/libexec/x86_64-linux-ghc-8.10.4/aeson-casing-0.2.0.0
Data files installed in:
/usr/local/share/x86_64-linux-ghc-8.10.4/aeson-casing-0.2.0.0
Documentation installed in:
/usr/local/share/doc/x86_64-linux-ghc-8.10.4/aeson-casing-0.2.0.0
Configuration files installed in: /usr/local/etc
Using alex version 3.2.6 found on system at: /usr/bin/alex
Using ar found on system at: /usr/bin/x86_64-pc-linux-gnu-ar
Using c2hs version 0.28.7 found on system at: /usr/bin/c2hs
Using cpphs version 1.20.9 found on system at: /usr/bin/cpphs
Using doctest version 0.16.3 found on system at: /usr/bin/doctest
Using gcc version 12.0.0 found on system at:
/usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc
Using ghc version 8.10.4 found on system at: /usr/bin/ghc
Using ghc-pkg version 8.10.4 found on system at: /usr/bin/ghc-pkg
No ghcjs found
No ghcjs-pkg found
No greencard found
Using haddock version 2.24.0 found on system at: /usr/bin/haddock
Using happy version 1.20.0 found on system at: /usr/bin/happy
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.68 found on system at: /usr/bin/hpc
Using hsc2hs version 0.68.7 found on system at: /usr/bin/hsc2hs
Using hscolour version 1.24 found on system at: /usr/bin/HsColour
No jhc found
Using ld found on system at: /usr/bin/x86_64-pc-linux-gnu-ld
Using pkg-config version 1.6.3 found on system at: /usr/bin/pkg-config
Using runghc version 8.10.4 found on system at: /usr/bin/runghc
No strip found
Using tar found on system at: /bin/tar
No uhc found
Preprocessing library for aeson-casing-0.2.0.0..
Building library for aeson-casing-0.2.0.0..
[1 of 2] Compiling Data.Aeson.Casing.Internal ( src/Data/Aeson/Casing/Internal.hs, dist/build/Data/Aeson/Casing/Internal.o, dist/build/Data/Aeson/Casing/Internal.dyn_o )
[2 of 2] Compiling Data.Aeson.Casing ( src/Data/Aeson/Casing.hs, dist/build/Data/Aeson/Casing.o, dist/build/Data/Aeson/Casing.dyn_o )
Preprocessing test suite 'casing' for aeson-casing-0.2.0.0..
Building test suite 'casing' for aeson-casing-0.2.0.0..
[1 of 2] Compiling Data.Aeson.Casing.Test ( test/Data/Aeson/Casing/Test.hs, dist/build/casing/casing-tmp/Data/Aeson/Casing/Test.dyn_o )
[2 of 2] Compiling Main             ( test/Main.hs, dist/build/casing/casing-tmp/Main.dyn_o )
Linking dist/build/casing/casing ...
Running 1 test suites...
Test suite casing: RUNNING...
Tests
  Data.Aeson.Casing.Test
    snake:        OK
    camel:        OK
    pascal:       OK
    train:        OK
    prefix:       OK
    encode snake: FAIL
      test/Data/Aeson/Casing/Test.hs:71:
      expected: "{\"last_name\":\"Doe\",\"first_name\":\"John\"}"
       but got: "{\"first_name\":\"John\",\"last_name\":\"Doe\"}"
    decode snake: OK
    encode train: OK
    decode train: OK

1 out of 9 tests failed (0.00s)
Test suite casing: FAIL
Test suite logged to: dist/test/aeson-casing-0.2.0.0-casing.log
0 of 1 test suites (0 of 1 test cases) passed.
danwdart commented 2 years ago

Yes, I also got that, compiling 0.2.0.0 on ghc 9.2.1. I'm not sure why, but maybe it's to do with the new maps that aeson provide, which now newly sort alphabetically.

danwdart commented 9 months ago

Okay - I can certainly alter the only package I maintain to not use this library if it's no longer maintained?