diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,5 +1,10 @@
 # ChangeLog for yaml-streamly
 
+## 0.12.3
+
+* fix build with aeson >= 2.2.0.0
+* pin streamly to < 0.9.0
+
 ## 0.12.2
 
 * fix build with aeson >= 2.1.2.0
diff --git a/src/Data/Yaml/Internal.hs b/src/Data/Yaml/Internal.hs
--- a/src/Data/Yaml/Internal.hs
+++ b/src/Data/Yaml/Internal.hs
@@ -44,7 +44,6 @@
 import Control.Applicative ((<|>))
 import Control.Monad.State.Strict
 import Control.Monad.Reader
-import Data.Aeson hiding (AesonException)
 #if MIN_VERSION_aeson(2,0,0)
 import qualified Data.Aeson.Key as K
 import qualified Data.Aeson.KeyMap as M
@@ -52,8 +51,13 @@
 #else
 import qualified Data.HashMap.Strict as M
 #endif
+#if MIN_VERSION_aeson(2,2,0)
+import Data.Aeson.Types hiding (parse, Parser, AesonException)
+#else
 import Data.Aeson.Internal (formatError)
+import Data.Aeson hiding (AesonException)
 import Data.Aeson.Types hiding (parse, Parser)
+#endif
 import qualified Data.Attoparsec.Text as Atto
 import Data.Bits (shiftL, (.|.))
 import Data.ByteString (ByteString)
diff --git a/yaml-streamly.cabal b/yaml-streamly.cabal
--- a/yaml-streamly.cabal
+++ b/yaml-streamly.cabal
@@ -1,6 +1,6 @@
-cabal-version:      1.12
+cabal-version:      2.2
 name:               yaml-streamly
-version:            0.12.2
+version:            0.12.3
 synopsis:           Support for parsing and rendering YAML documents.
 description:        Rewrite of yaml in streamly
 category:           Data
@@ -11,7 +11,7 @@
   Michael Snoyman <michael@snoyman.com>, Anton Ageev <antage@gmail.com>,Kirill Simonov, Julian Ospald <hasufell@posteo.de>
 
 maintainer:         Julian Ospald <hasufell@posteo.de>
-license:            BSD3
+license:            BSD-3-Clause
 license-file:       LICENSE
 build-type:         Simple
 extra-source-files:
@@ -57,6 +57,7 @@
     Data.Yaml.TH
 
   other-modules:    Paths_yaml_streamly
+  autogen-modules:  Paths_yaml_streamly
   hs-source-dirs:   src
   other-extensions: LambdaCase
   ghc-options:
@@ -76,7 +77,7 @@
     , mtl
     , safe-exceptions
     , scientific            >=0.3
-    , streamly              >=0.8.0
+    , streamly              ^>=0.8.0
     , template-haskell
     , text
     , transformers          >=0.1
