Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ghc-8.8.1 to CI #41

Merged
merged 1 commit into from
Oct 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,21 @@ workflows:
name: GHC 8.4.4
executor: haskell/ghc-8_4_4

- haskell/build-with-cci-cache:
- haskell/build:
name: GHC 8.6.5
executor: haskell/ghc-8_6_5

- haskell/build:
name: GHC 8.8.1
executor: haskell/ghc-8_8_1

- github/release-cabal:
name: GitHub Release
requires:
- GHC 8.2.2
- GHC 8.4.4
- GHC 8.6.5
- GHC 8.8.1
- Darwin
checkout: true
attach-workspace: true
Expand Down
332 changes: 199 additions & 133 deletions asif.cabal
Original file line number Diff line number Diff line change
@@ -1,145 +1,211 @@
cabal-version: 2.2
name: asif
version: 6.0.3
description: Library for creating and querying segmented feeds. Please see <https://github.com/arbor/asif#readme>
synopsis: Library for creating and querying segmented feeds
category: Services
homepage: https://github.com/arbor/asif#readme
bug-reports: https://github.com/arbor/asif/issues
author: Arbor Networks
maintainer: mayhem@arbor.net
copyright: Arbor Networks
license: MIT
license-file: LICENSE
build-type: Simple
extra-source-files:
ChangeLog.md
README.md
cabal-version: 2.2

name: asif
version: 6.0.3
description: Library for creating and querying segmented feeds. Please see <https://github.com/arbor/asif#readme>
synopsis: Library for creating and querying segmented feeds
category: Services
homepage: https://github.com/arbor/asif#readme
bug-reports: https://github.com/arbor/asif/issues
author: Arbor Networks
maintainer: mayhem@arbor.net
copyright: Arbor Networks
license: MIT
license-file: LICENSE
tested-with: GHC == 8.8.1, GHC == 8.6.5, GHC == 8.4.4, GHC == 8.2.2
build-type: Simple
extra-source-files: ChangeLog.md
README.md

source-repository head
type: git
location: https://github.com/arbor/asif

common common-deps
default-language: Haskell2010
ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -msse4.2
build-depends:
attoparsec
, base >=4.7 && <5
, binary
, bytestring
, conduit
, conduit-combinators
, conduit-extra
, containers
, cpu
, either
, exceptions
, foldl
, generic-lens
, hw-bits
, hw-ip >= 2.3.2.0
, lens
, network
, old-locale
, profunctors
, resourcet
, temporary-resourcet
, text
, thyme
, transformers
, vector
common base { build-depends: base >= 4.7 && < 5 }

common attoparsec { build-depends: attoparsec }
common binary { build-depends: binary }
common bytestring { build-depends: bytestring }
common conduit { build-depends: conduit }
common conduit-combinators { build-depends: conduit-combinators }
common conduit-extra { build-depends: conduit-extra }
common containers { build-depends: containers }
common cpu { build-depends: cpu }
common directory { build-depends: directory }
common either { build-depends: either }
common exceptions { build-depends: exceptions }
common foldl { build-depends: foldl }
common generic-lens { build-depends: generic-lens >= 1.2.0.1 }
common hedgehog { build-depends: hedgehog }
common hspec { build-depends: hspec }
common hw-bits { build-depends: hw-bits }
common hw-hspec-hedgehog { build-depends: hw-hspec-hedgehog }
common hw-ip { build-depends: hw-ip >= 2.3.4.2 }
common lens { build-depends: lens }
common network { build-depends: network }
common old-locale { build-depends: old-locale }
common optparse-applicative { build-depends: optparse-applicative }
common profunctors { build-depends: profunctors }
common resourcet { build-depends: resourcet }
common temporary-resourcet { build-depends: temporary-resourcet }
common text { build-depends: text }
common thyme { build-depends: thyme }
common transformers { build-depends: transformers }
common vector { build-depends: vector }

common config
ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -msse4.2
default-language: Haskell2010

common asif
build-depends: asif

library
import: common-deps
exposed-modules:
Arbor.File.Format.Asif
Arbor.File.Format.Asif.ByIndex
Arbor.File.Format.Asif.ByteString
Arbor.File.Format.Asif.ByteString.Builder
Arbor.File.Format.Asif.ByteString.Lazy
Arbor.File.Format.Asif.Data.Ip
Arbor.File.Format.Asif.Data.Read
Arbor.File.Format.Asif.Extract
Arbor.File.Format.Asif.Format
Arbor.File.Format.Asif.Format.Text
Arbor.File.Format.Asif.Get
Arbor.File.Format.Asif.IO
Arbor.File.Format.Asif.Lookup
Arbor.File.Format.Asif.Segment
Arbor.File.Format.Asif.Type
Arbor.File.Format.Asif.Whatever
Arbor.File.Format.Asif.Write
other-modules:
Arbor.File.Format.Asif.Format.SegmentValue
Arbor.File.Format.Asif.Format.Type
Arbor.File.Format.Asif.List
Arbor.File.Format.Asif.Maybe
Arbor.File.Format.Asif.Text
Paths_asif
autogen-modules:
Paths_asif
hs-source-dirs:
src
default-extensions: BangPatterns FlexibleContexts FlexibleInstances GeneralizedNewtypeDeriving MultiParamTypeClasses OverloadedStrings TupleSections
ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints
default-language: Haskell2010
import: base, config
, attoparsec
, binary
, bytestring
, conduit
, conduit-combinators
, conduit-extra
, containers
, cpu
, either
, exceptions
, foldl
, generic-lens
, hw-bits
, hw-ip
, lens
, network
, old-locale
, profunctors
, resourcet
, temporary-resourcet
, text
, thyme
, transformers
, vector
exposed-modules: Arbor.File.Format.Asif
Arbor.File.Format.Asif.ByIndex
Arbor.File.Format.Asif.ByteString
Arbor.File.Format.Asif.ByteString.Builder
Arbor.File.Format.Asif.ByteString.Lazy
Arbor.File.Format.Asif.Data.Ip
Arbor.File.Format.Asif.Data.Read
Arbor.File.Format.Asif.Extract
Arbor.File.Format.Asif.Format
Arbor.File.Format.Asif.Format.Text
Arbor.File.Format.Asif.Get
Arbor.File.Format.Asif.IO
Arbor.File.Format.Asif.Lookup
Arbor.File.Format.Asif.Segment
Arbor.File.Format.Asif.Type
Arbor.File.Format.Asif.Whatever
Arbor.File.Format.Asif.Write
other-modules: Arbor.File.Format.Asif.Format.SegmentValue
Arbor.File.Format.Asif.Format.Type
Arbor.File.Format.Asif.List
Arbor.File.Format.Asif.Maybe
Arbor.File.Format.Asif.Text
Paths_asif
autogen-modules: Paths_asif
hs-source-dirs: src
default-extensions: BangPatterns FlexibleContexts FlexibleInstances GeneralizedNewtypeDeriving MultiParamTypeClasses OverloadedStrings TupleSections
ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints

executable asif
import: common-deps
main-is: Main.hs
other-modules:
App.Commands
App.Commands.Dump
App.Commands.DumpBitmap
App.Commands.DumpOnly
App.Commands.EncodeFiles
App.Commands.ExtractFiles
App.Commands.ExtractSegments
App.Commands.Ls
App.Commands.Options.Type
App.Dump
App.IO
Paths_asif
autogen-modules:
Paths_asif
hs-source-dirs:
app
default-extensions: BangPatterns FlexibleContexts FlexibleInstances GeneralizedNewtypeDeriving MultiParamTypeClasses OverloadedStrings TupleSections
ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -threaded -rtsopts -O2 -msse4.2
build-depends:
asif
, directory
, optparse-applicative
default-language: Haskell2010
import: base, config
, asif
, attoparsec
, binary
, bytestring
, conduit
, conduit-combinators
, conduit-extra
, containers
, cpu
, directory
, either
, exceptions
, foldl
, generic-lens
, hw-bits
, hw-ip
, lens
, network
, old-locale
, optparse-applicative
, profunctors
, resourcet
, temporary-resourcet
, text
, thyme
, transformers
, vector
main-is: Main.hs
other-modules: App.Commands
App.Commands.Dump
App.Commands.DumpBitmap
App.Commands.DumpOnly
App.Commands.EncodeFiles
App.Commands.ExtractFiles
App.Commands.ExtractSegments
App.Commands.Ls
App.Commands.Options.Type
App.Dump
App.IO
Paths_asif
autogen-modules: Paths_asif
hs-source-dirs: app
default-extensions: BangPatterns FlexibleContexts FlexibleInstances GeneralizedNewtypeDeriving MultiParamTypeClasses OverloadedStrings TupleSections
ghc-options: -threaded -rtsopts -O2

test-suite asif-test
import: common-deps
type: exitcode-stdio-1.0
main-is: Spec.hs
build-tool-depends: hspec-discover:hspec-discover
other-modules:
Arbor.File.Format.Asif.ByteString.BuilderSpec
Arbor.File.Format.Asif.Data.IpSpec
Arbor.File.Format.Asif.ExtractSpec
Arbor.File.Format.Asif.Format.SegmentValueSpec
Arbor.File.Format.Asif.Format.TextSpec
Arbor.File.Format.Asif.WriteSpec
Arbor.File.Format.AsifSpec
Arbor.TestUtils
Gen.Feed
TestApp
Paths_asif
autogen-modules:
Paths_asif
hs-source-dirs:
test
default-extensions: BangPatterns FlexibleContexts FlexibleInstances GeneralizedNewtypeDeriving MultiParamTypeClasses OverloadedStrings TupleSections
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
asif
, hedgehog
, hspec
, hw-hspec-hedgehog
default-language: Haskell2010
import: base, config
, asif
, attoparsec
, binary
, bytestring
, conduit
, conduit-combinators
, conduit-extra
, containers
, cpu
, either
, exceptions
, foldl
, generic-lens
, hedgehog
, hspec
, hw-bits
, hw-hspec-hedgehog
, hw-ip
, lens
, network
, old-locale
, profunctors
, resourcet
, temporary-resourcet
, text
, thyme
, transformers
, vector
type: exitcode-stdio-1.0
main-is: Spec.hs
build-tool-depends: hspec-discover:hspec-discover
other-modules: Arbor.File.Format.Asif.ByteString.BuilderSpec
Arbor.File.Format.Asif.Data.IpSpec
Arbor.File.Format.Asif.ExtractSpec
Arbor.File.Format.Asif.Format.SegmentValueSpec
Arbor.File.Format.Asif.Format.TextSpec
Arbor.File.Format.Asif.WriteSpec
Arbor.File.Format.AsifSpec
Arbor.TestUtils
Gen.Feed
TestApp
Paths_asif
autogen-modules: Paths_asif
hs-source-dirs: test
default-extensions: BangPatterns FlexibleContexts FlexibleInstances GeneralizedNewtypeDeriving MultiParamTypeClasses OverloadedStrings TupleSections
ghc-options: -threaded -rtsopts -with-rtsopts=-N
2 changes: 1 addition & 1 deletion src/Arbor/File/Format/Asif/Segment.hs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ extractSegmentByteStringsWithHeader bs header = do
let segs = fmap (\(o, l) -> LBS.take (fromIntegral l) $ LBS.drop (fromIntegral o) bs) header
forM_ (zip segs header) $ \(seg, (_, len)) ->
when (LC8.length seg /= fromIntegral len) $
fail "XXX segments not read correctly"
Left "XXX segments not read correctly"
return segs

segmentNamed :: String -> M.Map Text (Z.Segment LC8.ByteString) -> Either String LC8.ByteString
Expand Down