fmthoma/vgrep

Compile error with aeson-1.0.2.1

Closed this issue · 5 comments

--  While building package vgrep-0.2.0.0 using:
      /home/simon/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_1.24.0.0_ghc-8.0.1 --builddir=.stack-work/dist/x86_64-linux/Cabal-1.24.0.0 build --ghc-options " -ddump-hi -ddump-to-file"
    Process exited with code: ExitFailure 1
    Logs have been written to: /home/simon/.stack/global-project/.stack-work/logs/vgrep-0.2.0.0.log

    Configuring vgrep-0.2.0.0...
    Building vgrep-0.2.0.0...
    Preprocessing library vgrep-0.2.0.0...
    [ 1 of 32] Compiling Vgrep.Key        ( src/Vgrep/Key.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/Vgrep/Key.o )
    [ 2 of 32] Compiling Vgrep.Command    ( src/Vgrep/Command.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/Vgrep/Command.o )
    [ 3 of 32] Compiling Vgrep.Environment.Config.Monoid ( src/Vgrep/Environment/Config/Monoid.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/Vgrep/Environment/Config/Monoid.o )
    [ 4 of 32] Compiling Vgrep.Environment.Config.Sources.Env ( src/Vgrep/Environment/Config/Sources/Env.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/Vgrep/Environment/Config/Sources/Env.o )
    [ 5 of 32] Compiling Vgrep.Environment.Config.Sources.File ( src/Vgrep/Environment/Config/Sources/File.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/Vgrep/Environment/Config/Sources/File.o )
    
    /tmp/stack17904/vgrep-0.2.0.0/src/Vgrep/Environment/Config/Sources/File.hs:309:17: error:
        • Overlapping instances for FromJSON (Map Key.Chord Command)
            arising from a use of ‘genericParseJSON’
          Matching instances:
            instance (aeson-1.0.2.1:Data.Aeson.Types.FromJSON.FromJSONKey k,
                      Ord k, FromJSON v) =>
                     FromJSON (Map k v)
              -- Defined in ‘aeson-1.0.2.1:Data.Aeson.Types.FromJSON’
            instance FromJSON (Map Key.Chord Command)
              -- Defined at src/Vgrep/Environment/Config/Sources/File.hs:314:10
        • In the expression: genericParseJSON jsonOptions
          In an equation for ‘parseJSON’:
              parseJSON = genericParseJSON jsonOptions
          In the instance declaration for ‘FromJSON KeybindingsMonoid’

Similar compile failure with aeson-1.1.0.0: http://hackage.haskell.org/package/vgrep-0.2.0.0/reports/1

…and with aeson-1.0.0.0:

/home/simon/src/vgrep/src/Vgrep/Environment/Config/Sources/File.hs:309:17: error:
    • Overlapping instances for FromJSON (Map Key.Chord Command)
        arising from a use of ‘genericParseJSON’
      Matching instances:
        instance (aeson-1.0.0.0:Data.Aeson.Types.FromJSON.FromJSONKey k,
                  Ord k, FromJSON v) =>
                 FromJSON (Map k v)
          -- Defined in ‘aeson-1.0.0.0:Data.Aeson.Types.FromJSON’
        instance FromJSON (Map Key.Chord Command)
          -- Defined at src/Vgrep/Environment/Config/Sources/File.hs:314:10
    • In the expression: genericParseJSON jsonOptions
      In an equation for ‘parseJSON’:
          parseJSON = genericParseJSON jsonOptions
      In the instance declaration for ‘FromJSON KeybindingsMonoid’

I'd recommend that you make a Hackage revision of vgrep-0.2.0.0 with a bound of aeson < 1.

I'm working on a fix for aeson >= 1.

I'm working on a fix for aeson >= 1.

See #37.

Right, the upper bound is actually missing. Fixed it on master and updated hackage.

Thanks!