Skip to content

Commit

Permalink
Fix compatibility issue with avro-0.5 🚀 (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
Flavio Corpa authored Mar 26, 2020
1 parent 586fdac commit 331ae75
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ghc: ["8.8.2"]
ghc: ["8.8.3"]
cabal: ["3.0"]
steps:
- uses: actions/checkout@v1
Expand Down
80 changes: 41 additions & 39 deletions language-avro.cabal
Original file line number Diff line number Diff line change
@@ -1,48 +1,50 @@
name: language-avro
version: 0.1.2.0
synopsis: Language definition and parser for AVRO files.
description: Parser for the AVRO language specification, see README.md for more details.
homepage: https://github.com/kutyel/avro-parser-haskell#readme
license: Apache-2.0
license-file: LICENSE
author: Flavio Corpa
maintainer: [email protected]
copyright: Copyright © 2019-2020 <http://47deg.com 47 Degrees>
category: Network
build-type: Simple
cabal-version: >=1.10
extra-source-files: README.md
name: language-avro
version: 0.1.3.0
synopsis: Language definition and parser for AVRO files.
description:
Parser for the AVRO language specification, see README.md for more details.

homepage: https://github.com/kutyel/avro-parser-haskell#readme
license: Apache-2.0
license-file: LICENSE
author: Flavio Corpa
maintainer: [email protected]
copyright: Copyright © 2019-2020 <http://47deg.com 47 Degrees>
category: Network
build-type: Simple
cabal-version: >=1.10
extra-source-files: README.md

library
exposed-modules: Language.Avro.Types,
Language.Avro.Parser
build-depends: base >=4.12 && <5
, avro >=0.4.7
, containers
, directory
, filepath
, megaparsec
, text
, vector
hs-source-dirs: src
default-language: Haskell2010
exposed-modules:
Language.Avro.Parser
Language.Avro.Types

test-suite avro-parser-haskell-test
type: exitcode-stdio-1.0
main-is: Spec.hs
default-language: Haskell2010
hs-source-dirs:
test
ghc-options:
-threaded
-rtsopts
-with-rtsopts=-N
build-depends:
base >=4.12 && <5
, avro >=0.4.7
, language-avro
avro >=0.5
, base >=4.12 && <5
, containers
, directory
, filepath
, megaparsec
, text
, vector

hs-source-dirs: src
default-language: Haskell2010

test-suite avro-parser-haskell-test
type: exitcode-stdio-1.0
main-is: Spec.hs
default-language: Haskell2010
hs-source-dirs: test
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
avro >=0.5
, base >=4.12 && <5
, hspec
, hspec-megaparsec
, language-avro
, megaparsec
, text
, vector
1 change: 0 additions & 1 deletion src/Language/Avro/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ where

import Control.Monad (filterM)
import Data.Avro
import Data.Avro.Schema
import Data.Either (partitionEithers)
import qualified Data.Set as S
import qualified Data.Text as T
Expand Down
3 changes: 1 addition & 2 deletions src/Language/Avro/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ module Language.Avro.Types
)
where

import Data.Avro.Schema
import Data.Avro.Types.Value
import Data.Avro
import Data.Set
import qualified Data.Text as T

Expand Down
5 changes: 2 additions & 3 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
resolver: lts-15.0
resolver: lts-15.5
packages:
- .
extra-deps:
- HasBigDecimal-0.1.1
- avro-0.4.7.0
- avro-0.5.0.0
4 changes: 2 additions & 2 deletions test/Spec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Main
)
where

import Data.Avro.Schema
import Data.Avro
import qualified Data.Text as T
import Data.Vector (fromList)
import Language.Avro.Parser
Expand Down Expand Up @@ -162,7 +162,7 @@ main = hspec $ do
Nothing -- order is ignored for now...
[ Field "name" [] Nothing Nothing String' Nothing,
Field "age" [] Nothing Nothing Int' Nothing,
Field "birthday" [] Nothing Nothing (Int (Just Date)) Nothing
Field "birthday" [] Nothing Nothing (Int (Just Date)) Nothing
]
it "should parse complex records" $
parse parseSchema "" complexRecord
Expand Down

0 comments on commit 331ae75

Please sign in to comment.