Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into fix-pure-error
Browse files Browse the repository at this point in the history
  • Loading branch information
kokobd committed Dec 18, 2023
2 parents 7ec0fa8 + ef3d96b commit 9aad4cb
Show file tree
Hide file tree
Showing 18 changed files with 65 additions and 68 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ The format is based on [Keep a Changelog][chg] and this project adheres to
- `pureRuntime`, `pureRuntimeWithContext`, `fallibleRuntime` and `fallibleRuntimeWithContext`
no longer crash the Lambda runtime if input can't be parsed from JSON.

## `1.0.1` - 2023-12-15

- Add support for aeson 2.2. Users can opt in by setting the `use-aeson-2-2` flag to `true`, which for many users will be set automatically. In a future breaking change release, this flag will default to `true`.

## `1.0.0.1` - 2022-09-10

- Support GHC 9.4 by eliminating compiler errors
Expand Down
20 changes: 15 additions & 5 deletions hal.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ cabal-version: 1.12
--
-- see: https://github.com/sol/hpack
--
-- hash: 69b9493ccccd06a12d2fb93eb5595886de8807c16244084959ecfe90b73eab13
-- hash: 135f92bc103710363cac34b23a95869b5a3cdf72e04a2e41652864d0d7559ff7

name: hal
version: 1.0.0.1
version: 1.0.1
synopsis: A runtime environment for Haskell applications running on AWS Lambda.
description: This library uniquely supports different types of AWS Lambda Handlers for your
needs/comfort with advanced Haskell. Instead of exposing a single function
Expand All @@ -29,6 +29,11 @@ source-repository head
type: git
location: https://github.com/Nike-inc/hal

flag use-aeson-2-2
description: Required parsers are split out into a different package
manual: False
default: False

library
exposed-modules:
AWS.Lambda.Combinators
Expand Down Expand Up @@ -71,9 +76,7 @@ library
ScopedTypeVariables
ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -fno-warn-partial-type-signatures -fno-warn-name-shadowing -fwarn-tabs -fwarn-unused-imports -fwarn-missing-signatures -fwarn-incomplete-patterns
build-depends:
aeson >=1.2.0.0 && <1.6 || >=2.0.0.0 && <2.3.0.0
, attoparsec-aeson
, base >=4.7 && <5
base >=4.7 && <5
, base64-bytestring
, bytestring
, case-insensitive
Expand All @@ -90,6 +93,13 @@ library
, time
, unordered-containers
default-language: Haskell2010
if flag(use-aeson-2-2)
build-depends:
aeson >=2.2.0.0 && <2.3.0.0
, attoparsec-aeson
else
build-depends:
aeson >=1.2.0.0 && <1.6 || >=2.0.0.0 && <2.2.0.0

test-suite hal-test
type: exitcode-stdio-1.0
Expand Down
19 changes: 16 additions & 3 deletions package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: |
This library uniquely supports different types of AWS Lambda Handlers for your
needs/comfort with advanced Haskell. Instead of exposing a single function
that constructs a Lambda, this library exposes many.
version: 1.0.0.1
version: 1.0.1
github: Nike-inc/hal
license: BSD3
author: Nike, Inc.
Expand Down Expand Up @@ -52,11 +52,15 @@ ghc-options:
- -fwarn-missing-signatures
- -fwarn-incomplete-patterns

flags:
use-aeson-2-2:
description: Required parsers are split out into a different package
default: false
manual: false

library:
source-dirs: src
dependencies:
- aeson >=1.2.0.0 && <1.6 || >=2.0.0.0 && <2.3.0.0
- attoparsec-aeson
- base64-bytestring
- bytestring
- case-insensitive
Expand All @@ -72,6 +76,15 @@ library:
- text
- time
- unordered-containers
when:
- condition: flag(use-aeson-2-2)
then:
dependencies:
- aeson >=2.2.0.0 && <2.3.0.0
- attoparsec-aeson
else:
dependencies:
- aeson >=1.2.0.0 && <1.6 || >=2.0.0.0 && <2.2.0.0

tests:
hal-test:
Expand Down
4 changes: 3 additions & 1 deletion stack-lts-13.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
resolver: lts-13.30
packages:
- .
flags:
hal:
use-aeson-2-2: false
extra-deps:
- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
- hedgehog-1.0.5@sha256:85a2d8df595c91b815e9d2ef7734189d7028ce16212e83f35b2221807d87770b,4368
- hspec-2.7.1@sha256:0aa48928ce80a34f8ff8c5ef114bb6807edfb8d884bcd7211eceed710e7fb7a8,1769
- hspec-core-2.7.1@sha256:ead64b6d552e477549624fc9de3658657faac0dabf7109f889d595be05547bbf,4594
Expand Down
7 changes: 0 additions & 7 deletions stack-lts-13.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@
# https://docs.haskellstack.org/en/stable/lock_files

packages:
- completed:
hackage: attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
pantry-tree:
sha256: 294c3a8a19a7ddad58097e18c624c6b34894b3c4a4cc490759cb31d842db242a
size: 114
original:
hackage: attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
- completed:
hackage: hedgehog-1.0.5@sha256:85a2d8df595c91b815e9d2ef7734189d7028ce16212e83f35b2221807d87770b,4368
pantry-tree:
Expand Down
4 changes: 3 additions & 1 deletion stack-lts-14.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
resolver: lts-14.27
packages:
- .
flags:
hal:
use-aeson-2-2: false
extra-deps:
- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
- hedgehog-1.0.5@sha256:85a2d8df595c91b815e9d2ef7734189d7028ce16212e83f35b2221807d87770b,4368
- hspec-hedgehog-0.0.1.2@sha256:4d09c7be34cdc941b78e4e964f71013ffeeb099ea32d8ede17ad9c03ae7a62e3,1470
7 changes: 0 additions & 7 deletions stack-lts-14.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@
# https://docs.haskellstack.org/en/stable/lock_files

packages:
- completed:
hackage: attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
pantry-tree:
sha256: 294c3a8a19a7ddad58097e18c624c6b34894b3c4a4cc490759cb31d842db242a
size: 114
original:
hackage: attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
- completed:
hackage: hedgehog-1.0.5@sha256:85a2d8df595c91b815e9d2ef7734189d7028ce16212e83f35b2221807d87770b,4368
pantry-tree:
Expand Down
4 changes: 3 additions & 1 deletion stack-lts-15.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
resolver: lts-15.16
packages:
- .
flags:
hal:
use-aeson-2-2: false
extra-deps:
- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
- hedgehog-1.0.5@sha256:85a2d8df595c91b815e9d2ef7734189d7028ce16212e83f35b2221807d87770b,4368
- hspec-hedgehog-0.0.1.2@sha256:4d09c7be34cdc941b78e4e964f71013ffeeb099ea32d8ede17ad9c03ae7a62e3,1470
7 changes: 0 additions & 7 deletions stack-lts-15.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@
# https://docs.haskellstack.org/en/stable/lock_files

packages:
- completed:
hackage: attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
pantry-tree:
sha256: 294c3a8a19a7ddad58097e18c624c6b34894b3c4a4cc490759cb31d842db242a
size: 114
original:
hackage: attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
- completed:
hackage: hedgehog-1.0.5@sha256:85a2d8df595c91b815e9d2ef7734189d7028ce16212e83f35b2221807d87770b,4368
pantry-tree:
Expand Down
5 changes: 3 additions & 2 deletions stack-lts-16.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
resolver: lts-16.31
packages:
- .
extra-deps:
- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
flags:
hal:
use-aeson-2-2: false
9 changes: 1 addition & 8 deletions stack-lts-16.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files

packages:
- completed:
hackage: attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
pantry-tree:
sha256: 294c3a8a19a7ddad58097e18c624c6b34894b3c4a4cc490759cb31d842db242a
size: 114
original:
hackage: attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
packages: []
snapshots:
- completed:
size: 534126
Expand Down
5 changes: 3 additions & 2 deletions stack-lts-17.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
resolver: lts-17.10
packages:
- .
extra-deps:
- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
flags:
hal:
use-aeson-2-2: false
9 changes: 1 addition & 8 deletions stack-lts-17.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files

packages:
- completed:
hackage: attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
pantry-tree:
sha256: 294c3a8a19a7ddad58097e18c624c6b34894b3c4a4cc490759cb31d842db242a
size: 114
original:
hackage: attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
packages: []
snapshots:
- completed:
size: 567241
Expand Down
5 changes: 3 additions & 2 deletions stack-lts-18.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
resolver: lts-18.28
packages:
- .
extra-deps:
- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
flags:
hal:
use-aeson-2-2: false
5 changes: 3 additions & 2 deletions stack-lts-19.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
resolver: lts-19.32
packages:
- .
extra-deps:
- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
flags:
hal:
use-aeson-2-2: false
5 changes: 3 additions & 2 deletions stack-lts-20.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
resolver: lts-20.26
packages:
- .
extra-deps:
- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
flags:
hal:
use-aeson-2-2: false
5 changes: 3 additions & 2 deletions stack-lts-21.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
resolver: lts-21.14
packages:
- .
extra-deps:
- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
flags:
hal:
use-aeson-2-2: false
9 changes: 1 addition & 8 deletions stack-lts-21.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files

packages:
- completed:
hackage: attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
pantry-tree:
sha256: 294c3a8a19a7ddad58097e18c624c6b34894b3c4a4cc490759cb31d842db242a
size: 114
original:
hackage: attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
packages: []
snapshots:
- completed:
sha256: 60e54c1ba3c1e7163acf6dafa9d56b2d3b23f88a31ad53a1c9d888f32561f8da
Expand Down

0 comments on commit 9aad4cb

Please sign in to comment.