diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a860e5fe..2477ff75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,6 @@ jobs: - os: ubuntu-22.04 # linux x86_64; 4 vcpu, 16 GB memory base-nixpkgs-channel: nixos-23.11 ghc: - - ghc-8-10 - ghc-9-2 - ghc-9-4 runs-on: ${{ matrix.runner.os }} diff --git a/nix/mk-shell.nix b/nix/mk-shell.nix index 4fd8bbec..61dfe68c 100644 --- a/nix/mk-shell.nix +++ b/nix/mk-shell.nix @@ -2,6 +2,8 @@ # Fix from https://github.com/srid/haskell-template let + sources = import ./sources.nix { }; + pkgs-unstable = import sources.nixpkgs-unstable { }; workaround140774 = hpkg: with pkgs.haskell.lib; overrideCabal hpkg (drv: { enableSeparateBinOutput = false; }); @@ -80,6 +82,6 @@ in pkgs.mkShell { pkgs.postgresql # for nri-postgres pkgs.redis # for nri-redis pkgs.zlib - pkgs.zookeeper # for nri-kafka + pkgs-unstable.zookeeper # for nri-kafka ]; } diff --git a/nix/sources.json b/nix/sources.json index a5245435..2654d946 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -12,15 +12,15 @@ "url_template": "https://github.com///archive/.tar.gz" }, "nixpkgs": { - "branch": "release-23.05", + "branch": "release-23.11", "description": "Nix Packages collection", "homepage": "", "owner": "NixOS", "repo": "nixpkgs", - "rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421", - "sha256": "05cbl1k193c9la9xhlz4y6y8ijpb2mkaqrab30zij6z4kqgclsrd", + "rev": "a149706fa833be1b3906eaae60230e0fbfdd067d", + "sha256": "1b3nywv7idiyq3j2vz5gr3vbfh3q4v4gw2qf7vpd5sb652f36g8x", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/70bdadeb94ffc8806c0570eb5c2695ad29f0e421.tar.gz", + "url": "https://github.com/NixOS/nixpkgs/archive/a149706fa833be1b3906eaae60230e0fbfdd067d.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "nixpkgs-unstable": { diff --git a/nri-env-parser/CHANGELOG.md b/nri-env-parser/CHANGELOG.md index ba4c1ca9..9e5a060c 100644 --- a/nri-env-parser/CHANGELOG.md +++ b/nri-env-parser/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.2.0.0 + +- Drop support for GHC 8.10.7 + # 0.1.0.9 - Support GHC 9.4.7 diff --git a/nri-env-parser/nri-env-parser.cabal b/nri-env-parser/nri-env-parser.cabal index fd38e7bf..49bc1e48 100644 --- a/nri-env-parser/nri-env-parser.cabal +++ b/nri-env-parser/nri-env-parser.cabal @@ -5,7 +5,7 @@ cabal-version: 1.18 -- see: https://github.com/sol/hpack name: nri-env-parser -version: 0.1.0.9 +version: 0.2.0.0 synopsis: Read environment variables as settings to build 12-factor apps. description: Please see the README at . category: Web @@ -50,7 +50,7 @@ library TypeOperators ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wpartial-fields -Wredundant-constraints -Wincomplete-uni-patterns -fplugin=NriPrelude.Plugin build-depends: - base >=4.12.0.0 && <4.18 + base >=4.16.4.0 && <4.18 , modern-uri >=0.3.1.0 && <0.4 , network-uri >=2.6.2.0 && <2.8 , nri-prelude >=0.1.0.0 && <0.7 @@ -83,7 +83,7 @@ test-suite tests ExtendedDefaultRules ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wpartial-fields -Wredundant-constraints -Wincomplete-uni-patterns -fplugin=NriPrelude.Plugin -threaded -rtsopts "-with-rtsopts=-N -T" -fno-warn-type-defaults build-depends: - base >=4.12.0.0 && <4.18 + base >=4.16.4.0 && <4.18 , modern-uri >=0.3.1.0 && <0.4 , network-uri >=2.6.2.0 && <2.8 , nri-prelude >=0.1.0.0 && <0.7 diff --git a/nri-env-parser/package.yaml b/nri-env-parser/package.yaml index cbd75365..9a2cac26 100644 --- a/nri-env-parser/package.yaml +++ b/nri-env-parser/package.yaml @@ -3,7 +3,7 @@ synopsis: Read environment variables as settings to build 12-factor apps. description: Please see the README at . homepage: https://github.com/NoRedInk/haskell-libraries/tree/trunk/nri-env-parser#readme author: NoRedInk -version: 0.1.0.9 +version: 0.2.0.0 maintainer: haskell-open-source@noredink.com copyright: 2023 NoRedInk Corp. github: NoRedInk/haskell-libraries/env-parser @@ -15,7 +15,7 @@ extra-doc-files: - CHANGELOG.md library: dependencies: &dependencies - - base >= 4.12.0.0 && < 4.18 + - base >= 4.16.4.0 && < 4.18 - nri-prelude >= 0.1.0.0 && < 0.7 - modern-uri >= 0.3.1.0 && < 0.4 - network-uri >= 2.6.2.0 && < 2.8 diff --git a/nri-http/CHANGELOG.md b/nri-http/CHANGELOG.md index 0e844c97..f1f4e498 100644 --- a/nri-http/CHANGELOG.md +++ b/nri-http/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.5.0.0 + +- Drop support for GHC 8.10.7 + # 0.4.0.1 - Regen golden results for GHC 9.2.6 / 8.10.7 diff --git a/nri-http/nri-http.cabal b/nri-http/nri-http.cabal index 2604ebe3..f159e6fc 100644 --- a/nri-http/nri-http.cabal +++ b/nri-http/nri-http.cabal @@ -5,7 +5,7 @@ cabal-version: 1.12 -- see: https://github.com/sol/hpack name: nri-http -version: 0.4.0.1 +version: 0.5.0.0 synopsis: Make Elm style HTTP requests description: Please see the README at . category: Web @@ -20,6 +20,7 @@ build-type: Simple extra-source-files: README.md LICENSE + test/golden-results-9.2/expected-http-span source-repository head type: git @@ -54,7 +55,7 @@ library ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wpartial-fields -Wredundant-constraints -Wincomplete-uni-patterns -fplugin=NriPrelude.Plugin build-depends: aeson >=1.4.6.0 && <2.2 - , base >=4.12.0.0 && <4.18 + , base >=4.16.4.0 && <4.18 , bytestring >=0.10.8.2 && <0.12 , case-insensitive >=1.1 && <2.0 , conduit >=1.3.0 && <1.4 @@ -63,7 +64,7 @@ library , http-types ==0.12.* , mime-types >=0.1.0.0 && <0.2 , network-uri >=2.6.0.0 && <2.8 - , nri-observability >=0.1.0.0 && <0.2 + , nri-observability >=0.1.0.0 && <0.3 , nri-prelude >=0.1.0.0 && <0.7 , safe-exceptions >=0.1.7.0 && <1.3 , text >=1.2.3.1 && <2.1 diff --git a/nri-http/package.yaml b/nri-http/package.yaml index e3f886ab..bc28b838 100644 --- a/nri-http/package.yaml +++ b/nri-http/package.yaml @@ -2,7 +2,7 @@ name: nri-http synopsis: Make Elm style HTTP requests description: Please see the README at . author: NoRedInk -version: 0.4.0.1 +version: 0.5.0.0 maintainer: haskell-open-source@noredink.com copyright: 2023 NoRedInk Corp. github: NoRedInk/haskell-libraries/nri-http @@ -11,14 +11,14 @@ category: Web extra-source-files: - README.md - LICENSE - - "test/golden-results/*" + - "test/golden-results-*/*" library: dependencies: - aeson >= 1.4.6.0 && < 2.2 - - base >= 4.12.0.0 && < 4.18 + - base >= 4.16.4.0 && < 4.18 - bytestring >= 0.10.8.2 && < 0.12 - nri-prelude >= 0.1.0.0 && < 0.7 - - nri-observability >= 0.1.0.0 && < 0.2 + - nri-observability >= 0.1.0.0 && < 0.3 - conduit >= 1.3.0 && < 1.4 - case-insensitive >= 1.1 && < 2.0 - http-client >= 0.6.0 && < 0.8 diff --git a/nri-http/test/GoldenHelpers.hs b/nri-http/test/GoldenHelpers.hs index 722bd406..cb0c0a4e 100644 --- a/nri-http/test/GoldenHelpers.hs +++ b/nri-http/test/GoldenHelpers.hs @@ -1,9 +1,9 @@ -{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} module GoldenHelpers (goldenResultsDir) where --- | Golden results are slightly different between GHC 9.2.x and 8.10.x due +-- | Historical context: +-- Golden results are slightly different between GHC 9.2.x and 8.10.x due -- to apparent differences in internal handling of stack frame source locations. -- In particular, the end of a function call now does not extend to the end of -- the line but instead to the end of the function name. E.g. for the following: @@ -15,10 +15,9 @@ module GoldenHelpers (goldenResultsDir) where -- In GHC 8.10.x (and possibly GHC 9.0.x?) `srcLocEndLine` and `srcLocEndCol` -- would correspond to the `z` at the end of `baz`. Unfortunately, in GHC 9.2.x -- it corresponds to the second `o` at the end of `foo`. +-- +-- We keep this helper around so that if this happens again for future GHC versions +-- we can have different golden results for different GHC versions as necessary. goldenResultsDir :: Text -#if __GLASGOW_HASKELL__ >= 902 goldenResultsDir = "test/golden-results-9.2" -#else -goldenResultsDir = "test/golden-results-8.10" -#endif diff --git a/nri-http/test/golden-results-8.10/expected-http-span b/nri-http/test/golden-results-8.10/expected-http-span deleted file mode 100644 index ab383abd..00000000 --- a/nri-http/test/golden-results-8.10/expected-http-span +++ /dev/null @@ -1,51 +0,0 @@ -TracingSpan - { name = "test-root" - , started = MonotonicTime { inMicroseconds = 0 } - , finished = MonotonicTime { inMicroseconds = 0 } - , frame = - Just - ( "rootTracingSpanIO" - , SrcLoc - { srcLocPackage = "main" - , srcLocModule = "Main" - , srcLocFile = "test/Main.hs" - , srcLocStartLine = 234 - , srcLocStartCol = 7 - , srcLocEndLine = 238 - , srcLocEndCol = 40 - } - ) - , details = Nothing - , summary = Just "mock-uri" - , succeeded = Succeeded - , containsFailures = False - , allocated = 0 - , children = - [ TracingSpan - { name = "Outgoing HTTP Request" - , started = MonotonicTime { inMicroseconds = 0 } - , finished = MonotonicTime { inMicroseconds = 0 } - , frame = - Just - ( "tracingSpanIO" - , SrcLoc - { srcLocPackage = "main" - , srcLocModule = "Http" - , srcLocFile = "src/Http.hs" - , srcLocStartLine = 434 - , srcLocStartCol = 11 - , srcLocEndLine = 446 - , srcLocEndCol = 14 - } - ) - , details = - Just - "{\"method\":\"GET\",\"host\":\"mock-uri\",\"path\":\"/\",\"query string\":\"\",\"headers\":{}}" - , summary = Just "mock-uri" - , succeeded = Succeeded - , containsFailures = False - , allocated = 0 - , children = [] - } - ] - } \ No newline at end of file diff --git a/nri-kafka/CHANGELOG.md b/nri-kafka/CHANGELOG.md index c5b4c6c6..1e03f4c6 100644 --- a/nri-kafka/CHANGELOG.md +++ b/nri-kafka/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.2.0.0 + +- Drop support for GHC 8.10.7 + # 0.1.0.5 - Support GHC 9.4.7, `aeson-2.1.x` diff --git a/nri-kafka/nri-kafka.cabal b/nri-kafka/nri-kafka.cabal index c77a136d..295cc198 100644 --- a/nri-kafka/nri-kafka.cabal +++ b/nri-kafka/nri-kafka.cabal @@ -5,7 +5,7 @@ cabal-version: 1.12 -- see: https://github.com/sol/hpack name: nri-kafka -version: 0.1.0.5 +version: 0.2.0.0 synopsis: Functions for working with Kafka description: Please see the README at . category: Web @@ -69,13 +69,13 @@ library build-depends: aeson >=1.4.6.0 && <2.2 , async >=2.2.2 && <2.3 - , base >=4.12.0.0 && <4.18 + , base >=4.16.4.0 && <4.18 , bytestring >=0.10.8.2 && <0.12 , conduit >=1.3.0 && <1.4 , containers >=0.6.0.1 && <0.7 , hw-kafka-client >=4.0.3 && <5.0 - , nri-env-parser >=0.1.0.0 && <0.2 - , nri-observability >=0.1.1.1 && <0.2 + , nri-env-parser >=0.1.0.0 && <0.3 + , nri-observability >=0.1.1.1 && <0.3 , nri-prelude >=0.1.0.0 && <0.7 , safe-exceptions >=0.1.7.0 && <1.3 , stm >=2.4 && <2.6 @@ -113,14 +113,14 @@ executable pause-resume-bug-consumer build-depends: aeson >=1.4.6.0 && <2.2 , async >=2.2.2 && <2.3 - , base >=4.12.0.0 && <4.18 + , base >=4.16.4.0 && <4.18 , bytestring >=0.10.8.2 && <0.12 , conduit >=1.3.0 && <1.4 , containers >=0.6.0.1 && <0.7 , hw-kafka-client >=4.0.3 && <5.0 - , nri-env-parser >=0.1.0.0 && <0.2 + , nri-env-parser >=0.1.0.0 && <0.3 , nri-kafka - , nri-observability >=0.1.1.1 && <0.2 + , nri-observability >=0.1.1.1 && <0.3 , nri-prelude >=0.1.0.0 && <0.7 , safe-exceptions >=0.1.7.0 && <1.3 , stm >=2.4 && <2.6 @@ -162,14 +162,14 @@ executable pause-resume-bug-producer build-depends: aeson >=1.4.6.0 && <2.2 , async >=2.2.2 && <2.3 - , base >=4.12.0.0 && <4.18 + , base >=4.16.4.0 && <4.18 , bytestring >=0.10.8.2 && <0.12 , conduit >=1.3.0 && <1.4 , containers >=0.6.0.1 && <0.7 , hw-kafka-client >=4.0.3 && <5.0 - , nri-env-parser >=0.1.0.0 && <0.2 + , nri-env-parser >=0.1.0.0 && <0.3 , nri-kafka - , nri-observability >=0.1.1.1 && <0.2 + , nri-observability >=0.1.1.1 && <0.3 , nri-prelude >=0.1.0.0 && <0.7 , safe-exceptions >=0.1.7.0 && <1.3 , stm >=2.4 && <2.6 @@ -226,13 +226,13 @@ test-suite tests build-depends: aeson >=1.4.6.0 && <2.2 , async >=2.2.2 && <2.3 - , base >=4.12.0.0 && <4.18 + , base >=4.16.4.0 && <4.18 , bytestring >=0.10.8.2 && <0.12 , conduit >=1.3.0 && <1.4 , containers >=0.6.0.1 && <0.7 , hw-kafka-client >=4.0.3 && <5.0 - , nri-env-parser >=0.1.0.0 && <0.2 - , nri-observability >=0.1.1.1 && <0.2 + , nri-env-parser >=0.1.0.0 && <0.3 + , nri-observability >=0.1.1.1 && <0.3 , nri-prelude >=0.1.0.0 && <0.7 , safe-exceptions >=0.1.7.0 && <1.3 , stm >=2.4 && <2.6 diff --git a/nri-kafka/package.yaml b/nri-kafka/package.yaml index 0352fd8c..12f702e0 100644 --- a/nri-kafka/package.yaml +++ b/nri-kafka/package.yaml @@ -3,7 +3,7 @@ synopsis: Functions for working with Kafka description: Please see the README at . homepage: https://github.com/NoRedInk/haskell-libraries/tree/trunk/nri-kafka#readme author: NoRedInk -version: 0.1.0.5 +version: 0.2.0.0 maintainer: haskell-open-source@noredink.com copyright: 2023 NoRedInk Corp. github: NoRedInk/haskell-libraries/nri-kafka @@ -16,13 +16,13 @@ extra-source-files: dependencies: - aeson >= 1.4.6.0 && < 2.2 - async >=2.2.2 && <2.3 - - base >= 4.12.0.0 && < 4.18 + - base >= 4.16.4.0 && < 4.18 - bytestring >= 0.10.8.2 && < 0.12 - conduit >= 1.3.0 && < 1.4 - containers >= 0.6.0.1 && < 0.7 - hw-kafka-client >=4.0.3 && < 5.0 - - nri-env-parser >= 0.1.0.0 && < 0.2 - - nri-observability >= 0.1.1.1 && < 0.2 + - nri-env-parser >= 0.1.0.0 && < 0.3 + - nri-observability >= 0.1.1.1 && < 0.3 - nri-prelude >= 0.1.0.0 && < 0.7 - safe-exceptions >= 0.1.7.0 && < 1.3 - stm >= 2.4 && < 2.6 diff --git a/nri-log-explorer/CHANGELOG.md b/nri-log-explorer/CHANGELOG.md index 781d59a2..4140af96 100644 --- a/nri-log-explorer/CHANGELOG.md +++ b/nri-log-explorer/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.2.0.0 + +- Drop support for GHC 8.10.7 + # 0.1.1.4 - Support GHC 9.4.7, `aeson-2.1.x`, `text-zipper-0.13.x`, `vector-0.13.x` diff --git a/nri-log-explorer/nri-log-explorer.cabal b/nri-log-explorer/nri-log-explorer.cabal index 7c9f41d3..21f8df1e 100644 --- a/nri-log-explorer/nri-log-explorer.cabal +++ b/nri-log-explorer/nri-log-explorer.cabal @@ -5,7 +5,7 @@ cabal-version: 1.18 -- see: https://github.com/sol/hpack name: nri-log-explorer -version: 0.1.1.4 +version: 0.2.0.0 synopsis: Explore logs produced by nri-prelude tests. description: Please see the README at . category: Web @@ -53,7 +53,7 @@ executable log-explorer aeson >=1.4.6.0 && <2.2 , aeson-pretty >=0.8.0 && <0.9 , async >=2.2.2 && <2.3 - , base >=4.12.0.0 && <4.18 + , base >=4.16.4.0 && <4.18 , brick >=0.51 && <0.72 , bytestring >=0.10.8.2 && <0.12 , directory >=1.3.3.0 && <1.4 diff --git a/nri-log-explorer/package.yaml b/nri-log-explorer/package.yaml index e4e24cca..efbc03f2 100644 --- a/nri-log-explorer/package.yaml +++ b/nri-log-explorer/package.yaml @@ -3,7 +3,7 @@ synopsis: Explore logs produced by nri-prelude tests. description: Please see the README at . homepage: https://github.com/NoRedInk/haskell-libraries/tree/trunk/nri-log-explorer#readme author: NoRedInk -version: 0.1.1.4 +version: 0.2.0.0 maintainer: haskell-open-source@noredink.com copyright: 2023 NoRedInk Corp. github: NoRedInk/haskell-libraries @@ -19,7 +19,7 @@ executables: - aeson >= 1.4.6.0 && < 2.2 - aeson-pretty >= 0.8.0 && < 0.9 - async >= 2.2.2 && < 2.3 - - base >= 4.12.0.0 && < 4.18 + - base >= 4.16.4.0 && < 4.18 - brick >= 0.51 && < 0.72 - bytestring >= 0.10.8.2 && < 0.12 - directory >= 1.3.3.0 && < 1.4 diff --git a/nri-observability/CHANGELOG.md b/nri-observability/CHANGELOG.md index 7b73821f..20421a39 100644 --- a/nri-observability/CHANGELOG.md +++ b/nri-observability/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.2.0.0 + +- Drop support for GHC 8.10.7 + # 0.1.1.5 - Support GHC 9.4.7, `aeson-2.1.x` diff --git a/nri-observability/nri-observability.cabal b/nri-observability/nri-observability.cabal index 99a09338..9aaba90e 100644 --- a/nri-observability/nri-observability.cabal +++ b/nri-observability/nri-observability.cabal @@ -5,7 +5,7 @@ cabal-version: 1.18 -- see: https://github.com/sol/hpack name: nri-observability -version: 0.1.1.5 +version: 0.2.0.0 synopsis: Report log spans collected by nri-prelude. description: Please see the README at . category: Web @@ -68,7 +68,7 @@ library aeson >=1.4.6.0 && <2.2 , aeson-pretty >=0.8.0 && <0.9 , async >=2.2.2 && <2.3 - , base >=4.12.0.0 && <4.18 + , base >=4.16.4.0 && <4.18 , bugsnag-hs >=0.1.0.0 && <0.3 , bytestring >=0.10.8.2 && <0.12 , conduit >=1.3.0 && <1.4 @@ -76,7 +76,7 @@ library , hostname ==1.0.* , http-client >=0.6.0 && <0.8 , http-client-tls >=0.3.0 && <0.4 - , nri-env-parser >=0.1.0.0 && <0.2 + , nri-env-parser >=0.1.0.0 && <0.3 , nri-prelude >=0.1.0.0 && <0.7 , random >=1.1 && <1.3 , safe-exceptions >=0.1.7.0 && <1.3 @@ -137,7 +137,7 @@ test-suite tests aeson >=1.4.6.0 && <2.2 , aeson-pretty >=0.8.0 && <0.9 , async >=2.2.2 && <2.3 - , base >=4.12.0.0 && <4.18 + , base >=4.16.4.0 && <4.18 , bugsnag-hs >=0.1.0.0 && <0.3 , bytestring >=0.10.8.2 && <0.12 , conduit >=1.3.0 && <1.4 @@ -145,7 +145,7 @@ test-suite tests , hostname ==1.0.* , http-client >=0.6.0 && <0.8 , http-client-tls >=0.3.0 && <0.4 - , nri-env-parser >=0.1.0.0 && <0.2 + , nri-env-parser >=0.1.0.0 && <0.3 , nri-prelude >=0.1.0.0 && <0.7 , random >=1.1 && <1.3 , safe-exceptions >=0.1.7.0 && <1.3 diff --git a/nri-observability/package.yaml b/nri-observability/package.yaml index 3e9fd6df..6b856a90 100644 --- a/nri-observability/package.yaml +++ b/nri-observability/package.yaml @@ -3,7 +3,7 @@ synopsis: Report log spans collected by nri-prelude. description: Please see the README at . homepage: https://github.com/NoRedInk/haskell-libraries/tree/trunk/nri-observability#readme author: NoRedInk -version: 0.1.1.5 +version: 0.2.0.0 maintainer: haskell-open-source@noredink.com copyright: 2023 NoRedInk Corp. github: NoRedInk/haskell-libraries/observability @@ -17,7 +17,7 @@ dependencies: - aeson >= 1.4.6.0 && < 2.2 - aeson-pretty >= 0.8.0 && < 0.9 - async >= 2.2.2 && < 2.3 - - base >= 4.12.0.0 && < 4.18 + - base >= 4.16.4.0 && < 4.18 - bugsnag-hs >= 0.1.0.0 && < 0.3 - bytestring >= 0.10.8.2 && < 0.12 - conduit >= 1.3.0 && < 1.4 @@ -25,7 +25,7 @@ dependencies: - http-client >= 0.6.0 && < 0.8 - http-client-tls >= 0.3.0 && < 0.4 - hostname >= 1.0 && < 1.1 - - nri-env-parser >= 0.1.0.0 && < 0.2 + - nri-env-parser >= 0.1.0.0 && < 0.3 - nri-prelude >= 0.1.0.0 && < 0.7 - random >= 1.1 && < 1.3 - unordered-containers >= 0.2.0.0 && < 0.3 diff --git a/nri-postgresql/CHANGELOG.md b/nri-postgresql/CHANGELOG.md index f2a99e1b..2941a36a 100644 --- a/nri-postgresql/CHANGELOG.md +++ b/nri-postgresql/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.2.0.0 + +- Drop support for GHC 8.10.7 + # 0.1.0.6 - Support GHC 9.4.7, `resource-pool-0.4.x` diff --git a/nri-postgresql/nri-postgresql.cabal b/nri-postgresql/nri-postgresql.cabal index 695f1bb6..545c4680 100644 --- a/nri-postgresql/nri-postgresql.cabal +++ b/nri-postgresql/nri-postgresql.cabal @@ -5,7 +5,7 @@ cabal-version: 1.18 -- see: https://github.com/sol/hpack name: nri-postgresql -version: 0.1.0.6 +version: 0.2.0.0 synopsis: Make queries against Postgresql. description: Please see the README at . category: Web @@ -17,6 +17,8 @@ copyright: 2023 NoRedInk Corp. license: BSD3 license-file: LICENSE build-type: Simple +extra-source-files: + test/golden-results/observability-spec-postgres-reporting extra-doc-files: README.md LICENSE @@ -60,12 +62,12 @@ library ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wpartial-fields -Wredundant-constraints -Wincomplete-uni-patterns -fplugin=NriPrelude.Plugin build-depends: attoparsec >=0.13.0.0 && <0.15 - , base >=4.12.0.0 && <4.18 + , base >=4.16.4.0 && <4.18 , bytestring >=0.10.8.2 && <0.12 , filepath >=1.4.2.1 && <1.5 , network >=3.1.0.0 && <3.2 - , nri-env-parser >=0.1.0.0 && <0.2 - , nri-observability >=0.1.0.0 && <0.2 + , nri-env-parser >=0.1.0.0 && <0.3 + , nri-observability >=0.1.0.0 && <0.3 , nri-prelude >=0.1.0.0 && <0.7 , postgresql-typed ==0.6.* , resource-pool >=0.2.0.0 && <0.5 @@ -118,12 +120,12 @@ test-suite tests ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wpartial-fields -Wredundant-constraints -Wincomplete-uni-patterns -fplugin=NriPrelude.Plugin -threaded -rtsopts "-with-rtsopts=-N -T" -fno-warn-type-defaults build-depends: attoparsec >=0.13.0.0 && <0.15 - , base >=4.12.0.0 && <4.18 + , base >=4.16.4.0 && <4.18 , bytestring >=0.10.8.2 && <0.12 , filepath >=1.4.2.1 && <1.5 , network >=3.1.0.0 && <3.2 - , nri-env-parser >=0.1.0.0 && <0.2 - , nri-observability >=0.1.0.0 && <0.2 + , nri-env-parser >=0.1.0.0 && <0.3 + , nri-observability >=0.1.0.0 && <0.3 , nri-prelude >=0.1.0.0 && <0.7 , postgresql-typed ==0.6.* , resource-pool >=0.2.0.0 && <0.5 diff --git a/nri-postgresql/package.yaml b/nri-postgresql/package.yaml index a9d1d90e..bcda916a 100644 --- a/nri-postgresql/package.yaml +++ b/nri-postgresql/package.yaml @@ -3,7 +3,7 @@ synopsis: Make queries against Postgresql. description: Please see the README at . homepage: https://github.com/NoRedInk/haskell-libraries/tree/trunk/nri-postgresql#readme author: NoRedInk -version: 0.1.0.6 +version: 0.2.0.0 maintainer: haskell-open-source@noredink.com copyright: 2023 NoRedInk Corp. github: NoRedInk/haskell-libraries/postgresql @@ -14,15 +14,15 @@ extra-doc-files: - LICENSE - CHANGELOG.md extra-source-files: -- "test/golden-results/*.json" +- "test/golden-results/*" dependencies: - attoparsec >= 0.13.0.0 && < 0.15 -- base >= 4.12.0.0 && < 4.18 +- base >= 4.16.4.0 && < 4.18 - bytestring >= 0.10.8.2 && < 0.12 - filepath >= 1.4.2.1 && < 1.5 - network >= 3.1.0.0 && < 3.2 -- nri-env-parser >= 0.1.0.0 && < 0.2 -- nri-observability >= 0.1.0.0 && < 0.2 +- nri-env-parser >= 0.1.0.0 && < 0.3 +- nri-observability >= 0.1.0.0 && < 0.3 - nri-prelude >= 0.1.0.0 && < 0.7 - postgresql-typed >= 0.6 && < 0.7 - resource-pool >= 0.2.0.0 && < 0.5 diff --git a/nri-postgresql/test/ObservabilitySpec.hs b/nri-postgresql/test/ObservabilitySpec.hs index 9b2d2c77..46b4f94b 100644 --- a/nri-postgresql/test/ObservabilitySpec.hs +++ b/nri-postgresql/test/ObservabilitySpec.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE CPP #-} {-# LANGUAGE QuasiQuotes #-} module ObservabilitySpec @@ -44,12 +43,7 @@ tests postgres = |> spanForTask Debug.toString span |> Expect.equalToContentsOf -#if __GLASGOW_HASKELL__ >= 902 "test/golden-results/observability-spec-postgres-reporting-ghc-9" -#else - "test/golden-results/observability-spec-postgres-reporting-ghc-8" -#endif - ] spanForTask :: Show e => Task e () -> Expect.Expectation' Platform.TracingSpan diff --git a/nri-postgresql/test/golden-results/observability-spec-postgres-reporting-ghc-8 b/nri-postgresql/test/golden-results/observability-spec-postgres-reporting-ghc-8 deleted file mode 100644 index f61c545a..00000000 --- a/nri-postgresql/test/golden-results/observability-spec-postgres-reporting-ghc-8 +++ /dev/null @@ -1,76 +0,0 @@ -TracingSpan - { name = "test-root" - , started = MonotonicTime { inMicroseconds = 0 } - , finished = MonotonicTime { inMicroseconds = 0 } - , frame = - Just - ( "rootTracingSpanIO" - , SrcLoc - { srcLocPackage = "main" - , srcLocModule = "ObservabilitySpec" - , srcLocFile = "test/ObservabilitySpec.hs" - , srcLocStartLine = 60 - , srcLocStartCol = 7 - , srcLocEndLine = 64 - , srcLocEndCol = 40 - } - ) - , details = Nothing - , summary = Nothing - , succeeded = Succeeded - , containsFailures = False - , allocated = 0 - , children = - [ TracingSpan - { name = "Postgresql Query" - , started = MonotonicTime { inMicroseconds = 0 } - , finished = MonotonicTime { inMicroseconds = 0 } - , frame = - Just - ( "doQuery" - , SrcLoc - { srcLocPackage = "main" - , srcLocModule = "ObservabilitySpec" - , srcLocFile = "test/ObservabilitySpec.hs" - , srcLocStartLine = 36 - , srcLocStartCol = 11 - , srcLocEndLine = 43 - , srcLocEndCol = 14 - } - ) - , details = - Just - "{\"query\":\"Secret *****\",\"query template\":\"!SELECT 1::bigint\",\"sql operation\":\"UNKNOWN\",\"queried relation\":\"!SELECT 1::bigint\",\"database type\":\"PostgreSQL\",\"host\":\"/mock/db/path.sock\",\"database\":\"mock-db-name\",\"rows returned\":1}" - , summary = Just "UNKNOWN !SELECT 1::bigint" - , succeeded = Succeeded - , containsFailures = False - , allocated = 0 - , children = - [ TracingSpan - { name = "acquiring Postgres connection from pool" - , started = MonotonicTime { inMicroseconds = 0 } - , finished = MonotonicTime { inMicroseconds = 0 } - , frame = - Just - ( "withContext" - , SrcLoc - { srcLocPackage = "main" - , srcLocModule = "Postgres" - , srcLocFile = "src/Postgres.hs" - , srcLocStartLine = 225 - , srcLocStartCol = 9 - , srcLocEndLine = 225 - , srcLocEndCol = 69 - } - ) - , details = Just "{}" - , summary = Just "acquiring Postgres connection from pool" - , succeeded = Succeeded - , containsFailures = False - , allocated = 0 - , children = [] - } - ] - } - ] - } \ No newline at end of file diff --git a/nri-postgresql/test/golden-results/observability-spec-postgres-reporting-ghc-9 b/nri-postgresql/test/golden-results/observability-spec-postgres-reporting-ghc-9 index 94767efe..b2a4b18b 100644 --- a/nri-postgresql/test/golden-results/observability-spec-postgres-reporting-ghc-9 +++ b/nri-postgresql/test/golden-results/observability-spec-postgres-reporting-ghc-9 @@ -9,9 +9,9 @@ TracingSpan { srcLocPackage = "main" , srcLocModule = "ObservabilitySpec" , srcLocFile = "test/ObservabilitySpec.hs" - , srcLocStartLine = 60 + , srcLocStartLine = 54 , srcLocStartCol = 7 - , srcLocEndLine = 60 + , srcLocEndLine = 54 , srcLocEndCol = 33 } ) @@ -32,9 +32,9 @@ TracingSpan { srcLocPackage = "main" , srcLocModule = "ObservabilitySpec" , srcLocFile = "test/ObservabilitySpec.hs" - , srcLocStartLine = 36 + , srcLocStartLine = 35 , srcLocStartCol = 11 - , srcLocEndLine = 36 + , srcLocEndLine = 35 , srcLocEndCol = 27 } ) diff --git a/nri-prelude/CHANGELOG.md b/nri-prelude/CHANGELOG.md index 554475df..f2c946f9 100644 --- a/nri-prelude/CHANGELOG.md +++ b/nri-prelude/CHANGELOG.md @@ -1,5 +1,6 @@ # Unreleased +- Drop support for GHC 8.10.7 - Allow specifying where devlogs for log-explorer go through `NRI_DEV_LOG` environment variable. - Added `putText` and `putTextLn` functions for thread-safe console printing. diff --git a/nri-prelude/nri-prelude.cabal b/nri-prelude/nri-prelude.cabal index 1edee94f..b8ce088c 100644 --- a/nri-prelude/nri-prelude.cabal +++ b/nri-prelude/nri-prelude.cabal @@ -92,7 +92,7 @@ library , async >=2.2.2 && <2.3 , attoparsec >=0.13.0.0 && <0.15 , auto-update >=0.1.6 && <0.2 - , base >=4.12.0.0 && <4.18 + , base >=4.16.4.0 && <4.18 , bytestring >=0.10.8.2 && <0.12 , containers >=0.6.0.1 && <0.7 , directory >=1.3.3.0 && <1.4 @@ -191,7 +191,7 @@ test-suite tests , async >=2.2.2 && <2.3 , attoparsec >=0.13.0.0 && <0.15 , auto-update >=0.1.6 && <0.2 - , base >=4.12.0.0 && <4.18 + , base >=4.16.4.0 && <4.18 , bytestring >=0.10.8.2 && <0.12 , containers >=0.6.0.1 && <0.7 , directory >=1.3.3.0 && <1.4 diff --git a/nri-prelude/package.yaml b/nri-prelude/package.yaml index abc4b4d4..9d7300ab 100644 --- a/nri-prelude/package.yaml +++ b/nri-prelude/package.yaml @@ -22,7 +22,7 @@ library: - async >= 2.2.2 && < 2.3 - attoparsec >= 0.13.0.0 && < 0.15 - auto-update >= 0.1.6 && < 0.2 - - base >= 4.12.0.0 && < 4.18 + - base >= 4.16.4.0 && < 4.18 - bytestring >= 0.10.8.2 && < 0.12 - containers >= 0.6.0.1 && < 0.7 - directory >= 1.3.3.0 && < 1.4 diff --git a/nri-prelude/tests/GoldenHelpers.hs b/nri-prelude/tests/GoldenHelpers.hs index a459e7b2..1008389f 100644 --- a/nri-prelude/tests/GoldenHelpers.hs +++ b/nri-prelude/tests/GoldenHelpers.hs @@ -1,11 +1,11 @@ -{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} module GoldenHelpers (goldenResultsDir) where import Data.Text (Text) --- | Golden results are slightly different between GHC 9.2.x and 8.10.x due +-- | Historical context: +-- Golden results are slightly different between GHC 9.2.x and 8.10.x due -- to apparent differences in internal handling of stack frame source locations. -- In particular, the end of a function call now does not extend to the end of -- the line but instead to the end of the function name. E.g. for the following: @@ -17,10 +17,9 @@ import Data.Text (Text) -- In GHC 8.10.x (and possibly GHC 9.0.x?) `srcLocEndLine` and `srcLocEndCol` -- would correspond to the `z` at the end of `baz`. Unfortunately, in GHC 9.2.x -- it corresponds to the second `o` at the end of `foo`. +-- +-- We keep this helper around so that if this happens again for future GHC versions +-- we can have different golden results for different GHC versions as necessary. goldenResultsDir :: Text -#if __GLASGOW_HASKELL__ >= 902 goldenResultsDir = "tests/golden-results-9.2" -#else -goldenResultsDir = "tests/golden-results-8.10" -#endif diff --git a/nri-prelude/tests/golden-results-8.10/debug b/nri-prelude/tests/golden-results-8.10/debug deleted file mode 100644 index a2092416..00000000 --- a/nri-prelude/tests/golden-results-8.10/debug +++ /dev/null @@ -1,25 +0,0 @@ -[ TracingSpan - { name = "pressed the button" - , started = MonotonicTime { inMicroseconds = 0 } - , finished = MonotonicTime { inMicroseconds = 0 } - , frame = - Just - ( "debug" - , SrcLoc - { srcLocPackage = "main" - , srcLocModule = "LogSpec" - , srcLocFile = "tests/LogSpec.hs" - , srcLocStartLine = 40 - , srcLocStartCol = 15 - , srcLocEndLine = 42 - , srcLocEndCol = 53 - } - ) - , details = Just "{\"level\":\"Debug\",\"button\":\"PRESS\"}" - , summary = Nothing - , succeeded = Succeeded - , containsFailures = False - , allocated = 0 - , children = [] - } -] \ No newline at end of file diff --git a/nri-prelude/tests/golden-results-8.10/debug-todo-stacktrace b/nri-prelude/tests/golden-results-8.10/debug-todo-stacktrace deleted file mode 100644 index 217f6d84..00000000 --- a/nri-prelude/tests/golden-results-8.10/debug-todo-stacktrace +++ /dev/null @@ -1,3 +0,0 @@ -foo -CallStack (from HasCallStack): - todo, called at tests/TestSpec.hs:177:20 in main:TestSpec \ No newline at end of file diff --git a/nri-prelude/tests/golden-results-8.10/error b/nri-prelude/tests/golden-results-8.10/error deleted file mode 100644 index e914d431..00000000 --- a/nri-prelude/tests/golden-results-8.10/error +++ /dev/null @@ -1,25 +0,0 @@ -[ TracingSpan - { name = "door is blocked" - , started = MonotonicTime { inMicroseconds = 0 } - , finished = MonotonicTime { inMicroseconds = 0 } - , frame = - Just - ( "error" - , SrcLoc - { srcLocPackage = "main" - , srcLocModule = "LogSpec" - , srcLocFile = "tests/LogSpec.hs" - , srcLocStartLine = 66 - , srcLocStartCol = 15 - , srcLocEndLine = 68 - , srcLocEndCol = 52 - } - ) - , details = Just "{\"level\":\"Error\",\"house number\":5}" - , summary = Nothing - , succeeded = Failed - , containsFailures = True - , allocated = 0 - , children = [] - } -] \ No newline at end of file diff --git a/nri-prelude/tests/golden-results-8.10/log-async-exceptions b/nri-prelude/tests/golden-results-8.10/log-async-exceptions deleted file mode 100644 index 272229a7..00000000 --- a/nri-prelude/tests/golden-results-8.10/log-async-exceptions +++ /dev/null @@ -1,50 +0,0 @@ -[ TracingSpan - { name = "outer span" - , started = MonotonicTime { inMicroseconds = 0 } - , finished = MonotonicTime { inMicroseconds = 0 } - , frame = - Just - ( "withContext" - , SrcLoc - { srcLocPackage = "main" - , srcLocModule = "LogSpec" - , srcLocFile = "tests/LogSpec.hs" - , srcLocStartLine = 113 - , srcLocStartCol = 20 - , srcLocEndLine = 113 - , srcLocEndCol = 76 - } - ) - , details = Just "{\"number\":825}" - , summary = Just "outer span" - , succeeded = FailedWith TestException - , containsFailures = True - , allocated = 0 - , children = - [ TracingSpan - { name = "inner span" - , started = MonotonicTime { inMicroseconds = 0 } - , finished = MonotonicTime { inMicroseconds = 0 } - , frame = - Just - ( "withContext" - , SrcLoc - { srcLocPackage = "main" - , srcLocModule = "LogSpec" - , srcLocFile = "tests/LogSpec.hs" - , srcLocStartLine = 112 - , srcLocStartCol = 20 - , srcLocEndLine = 112 - , srcLocEndCol = 84 - } - ) - , details = Just "{\"word\":\"sabbatical\"}" - , summary = Just "inner span" - , succeeded = FailedWith TestException - , containsFailures = True - , allocated = 0 - , children = [] - } - ] - } -] \ No newline at end of file diff --git a/nri-prelude/tests/golden-results-8.10/log-context-show b/nri-prelude/tests/golden-results-8.10/log-context-show deleted file mode 100644 index 01cd1f17..00000000 --- a/nri-prelude/tests/golden-results-8.10/log-context-show +++ /dev/null @@ -1 +0,0 @@ -Context "hello" "world" \ No newline at end of file diff --git a/nri-prelude/tests/golden-results-8.10/log-info b/nri-prelude/tests/golden-results-8.10/log-info deleted file mode 100644 index 52ed896d..00000000 --- a/nri-prelude/tests/golden-results-8.10/log-info +++ /dev/null @@ -1,25 +0,0 @@ -[ TracingSpan - { name = "logging a message!" - , started = MonotonicTime { inMicroseconds = 0 } - , finished = MonotonicTime { inMicroseconds = 0 } - , frame = - Just - ( "info" - , SrcLoc - { srcLocPackage = "main" - , srcLocModule = "LogSpec" - , srcLocFile = "tests/LogSpec.hs" - , srcLocStartLine = 30 - , srcLocStartCol = 18 - , srcLocEndLine = 30 - , srcLocEndCol = 76 - } - ) - , details = Just "{\"level\":\"Info\",\"a number\":12}" - , summary = Nothing - , succeeded = Succeeded - , containsFailures = False - , allocated = 0 - , children = [] - } -] \ No newline at end of file diff --git a/nri-prelude/tests/golden-results-8.10/log-nested-spans b/nri-prelude/tests/golden-results-8.10/log-nested-spans deleted file mode 100644 index ca752c96..00000000 --- a/nri-prelude/tests/golden-results-8.10/log-nested-spans +++ /dev/null @@ -1,75 +0,0 @@ -[ TracingSpan - { name = "outer span" - , started = MonotonicTime { inMicroseconds = 0 } - , finished = MonotonicTime { inMicroseconds = 0 } - , frame = - Just - ( "withContext" - , SrcLoc - { srcLocPackage = "main" - , srcLocModule = "LogSpec" - , srcLocFile = "tests/LogSpec.hs" - , srcLocStartLine = 81 - , srcLocStartCol = 20 - , srcLocEndLine = 81 - , srcLocEndCol = 76 - } - ) - , details = Just "{\"number\":825}" - , summary = Just "outer span" - , succeeded = Succeeded - , containsFailures = False - , allocated = 0 - , children = - [ TracingSpan - { name = "inner span" - , started = MonotonicTime { inMicroseconds = 0 } - , finished = MonotonicTime { inMicroseconds = 0 } - , frame = - Just - ( "withContext" - , SrcLoc - { srcLocPackage = "main" - , srcLocModule = "LogSpec" - , srcLocFile = "tests/LogSpec.hs" - , srcLocStartLine = 80 - , srcLocStartCol = 20 - , srcLocEndLine = 80 - , srcLocEndCol = 84 - } - ) - , details = Just "{\"word\":\"sabbatical\"}" - , summary = Just "inner span" - , succeeded = Succeeded - , containsFailures = False - , allocated = 0 - , children = - [ TracingSpan - { name = "log!" - , started = MonotonicTime { inMicroseconds = 0 } - , finished = MonotonicTime { inMicroseconds = 0 } - , frame = - Just - ( "info" - , SrcLoc - { srcLocPackage = "main" - , srcLocModule = "LogSpec" - , srcLocFile = "tests/LogSpec.hs" - , srcLocStartLine = 79 - , srcLocStartCol = 15 - , srcLocEndLine = 79 - , srcLocEndCol = 29 - } - ) - , details = Just "{\"level\":\"Info\"}" - , summary = Nothing - , succeeded = Succeeded - , containsFailures = False - , allocated = 0 - , children = [] - } - ] - } - ] - } -] \ No newline at end of file diff --git a/nri-prelude/tests/golden-results-8.10/log-new-root b/nri-prelude/tests/golden-results-8.10/log-new-root deleted file mode 100644 index f25670d9..00000000 --- a/nri-prelude/tests/golden-results-8.10/log-new-root +++ /dev/null @@ -1,122 +0,0 @@ -[ TracingSpan - { name = "logging a first 'inner' message" - , started = MonotonicTime { inMicroseconds = 0 } - , finished = MonotonicTime { inMicroseconds = 0 } - , frame = - Just - ( "info" - , SrcLoc - { srcLocPackage = "main" - , srcLocModule = "LogSpec" - , srcLocFile = "tests/LogSpec.hs" - , srcLocStartLine = 174 - , srcLocStartCol = 45 - , srcLocEndLine = 174 - , srcLocEndCol = 86 - } - ) - , details = Just "{\"level\":\"Info\"}" - , summary = Nothing - , succeeded = Succeeded - , containsFailures = False - , allocated = 0 - , children = [] - } -, TracingSpan - { name = "logging a third 'inner' message" - , started = MonotonicTime { inMicroseconds = 0 } - , finished = MonotonicTime { inMicroseconds = 0 } - , frame = - Just - ( "info" - , SrcLoc - { srcLocPackage = "main" - , srcLocModule = "LogSpec" - , srcLocFile = "tests/LogSpec.hs" - , srcLocStartLine = 177 - , srcLocStartCol = 19 - , srcLocEndLine = 177 - , srcLocEndCol = 60 - } - ) - , details = Just "{\"level\":\"Info\"}" - , summary = Nothing - , succeeded = Succeeded - , containsFailures = False - , allocated = 0 - , children = [] - } -, TracingSpan - { name = "logging a second 'inner' message" - , started = MonotonicTime { inMicroseconds = 0 } - , finished = MonotonicTime { inMicroseconds = 0 } - , frame = - Just - ( "info" - , SrcLoc - { srcLocPackage = "main" - , srcLocModule = "LogSpec" - , srcLocFile = "tests/LogSpec.hs" - , srcLocStartLine = 176 - , srcLocStartCol = 19 - , srcLocEndLine = 176 - , srcLocEndCol = 61 - } - ) - , details = Just "{\"level\":\"Info\"}" - , summary = Nothing - , succeeded = Succeeded - , containsFailures = False - , allocated = 0 - , children = [] - } -, TracingSpan - { name = "foo" - , started = MonotonicTime { inMicroseconds = 0 } - , finished = MonotonicTime { inMicroseconds = 0 } - , frame = - Just - ( "withContext" - , SrcLoc - { srcLocPackage = "main" - , srcLocModule = "LogSpec" - , srcLocFile = "tests/LogSpec.hs" - , srcLocStartLine = 173 - , srcLocStartCol = 17 - , srcLocEndLine = 173 - , srcLocEndCol = 37 - } - ) - , details = Just "{}" - , summary = Just "foo" - , succeeded = Succeeded - , containsFailures = False - , allocated = 0 - , children = - [ TracingSpan - { name = "logging a message!" - , started = MonotonicTime { inMicroseconds = 0 } - , finished = MonotonicTime { inMicroseconds = 0 } - , frame = - Just - ( "info" - , SrcLoc - { srcLocPackage = "main" - , srcLocModule = "LogSpec" - , srcLocFile = "tests/LogSpec.hs" - , srcLocStartLine = 173 - , srcLocStartCol = 41 - , srcLocEndLine = 173 - , srcLocEndCol = 99 - } - ) - , details = Just "{\"level\":\"Info\",\"a number\":12}" - , summary = Nothing - , succeeded = Succeeded - , containsFailures = False - , allocated = 0 - , children = [] - } - ] - } -] \ No newline at end of file diff --git a/nri-prelude/tests/golden-results-8.10/log-unexpected-exceptions b/nri-prelude/tests/golden-results-8.10/log-unexpected-exceptions deleted file mode 100644 index b44e7e2d..00000000 --- a/nri-prelude/tests/golden-results-8.10/log-unexpected-exceptions +++ /dev/null @@ -1,50 +0,0 @@ -[ TracingSpan - { name = "outer span" - , started = MonotonicTime { inMicroseconds = 0 } - , finished = MonotonicTime { inMicroseconds = 0 } - , frame = - Just - ( "withContext" - , SrcLoc - { srcLocPackage = "main" - , srcLocModule = "LogSpec" - , srcLocFile = "tests/LogSpec.hs" - , srcLocStartLine = 94 - , srcLocStartCol = 20 - , srcLocEndLine = 94 - , srcLocEndCol = 76 - } - ) - , details = Just "{\"number\":825}" - , summary = Just "outer span" - , succeeded = FailedWith TestException - , containsFailures = True - , allocated = 0 - , children = - [ TracingSpan - { name = "inner span" - , started = MonotonicTime { inMicroseconds = 0 } - , finished = MonotonicTime { inMicroseconds = 0 } - , frame = - Just - ( "withContext" - , SrcLoc - { srcLocPackage = "main" - , srcLocModule = "LogSpec" - , srcLocFile = "tests/LogSpec.hs" - , srcLocStartLine = 93 - , srcLocStartCol = 20 - , srcLocEndLine = 93 - , srcLocEndCol = 84 - } - ) - , details = Just "{\"word\":\"sabbatical\"}" - , summary = Just "inner span" - , succeeded = FailedWith TestException - , containsFailures = True - , allocated = 0 - , children = [] - } - ] - } -] \ No newline at end of file diff --git a/nri-prelude/tests/golden-results-8.10/test-report-logfile-all-passed b/nri-prelude/tests/golden-results-8.10/test-report-logfile-all-passed deleted file mode 100644 index 1022cdf8..00000000 --- a/nri-prelude/tests/golden-results-8.10/test-report-logfile-all-passed +++ /dev/null @@ -1,72 +0,0 @@ -{ - "allocated": 0, - "children": [ - { - "allocated": 0, - "children": [ - { - "allocated": 0, - "children": [ - { - "allocated": 1, - "children": [], - "containsFailures": false, - "details": null, - "finished": 0, - "frame": null, - "name": "name", - "started": 0, - "succeeded": "Succeeded", - "summary": null - }, - { - "allocated": 1, - "children": [], - "containsFailures": false, - "details": null, - "finished": 0, - "frame": null, - "name": "name", - "started": 0, - "succeeded": "Succeeded", - "summary": null - } - ], - "containsFailures": false, - "details": null, - "finished": 0, - "frame": null, - "name": "describe", - "started": 0, - "succeeded": "Succeeded", - "summary": "sub suite" - } - ], - "containsFailures": false, - "details": null, - "finished": 0, - "frame": null, - "name": "describe", - "started": 0, - "succeeded": "Succeeded", - "summary": "suite" - } - ], - "containsFailures": false, - "details": null, - "finished": 0, - "frame": { - "endCol": 69, - "endLine": 429, - "file": "tests/TestSpec.hs", - "module": "TestSpec", - "name": "report", - "package": "main", - "startCol": 22, - "startLine": 429 - }, - "name": "test run", - "started": 0, - "succeeded": "Succeeded", - "summary": "nri-prelude" -} \ No newline at end of file diff --git a/nri-prelude/tests/golden-results-8.10/test-report-logfile-no-tests-in-suite b/nri-prelude/tests/golden-results-8.10/test-report-logfile-no-tests-in-suite deleted file mode 100644 index 89967856..00000000 --- a/nri-prelude/tests/golden-results-8.10/test-report-logfile-no-tests-in-suite +++ /dev/null @@ -1,21 +0,0 @@ -{ - "allocated": 0, - "children": [], - "containsFailures": true, - "details": null, - "finished": 0, - "frame": { - "endCol": 69, - "endLine": 468, - "file": "tests/TestSpec.hs", - "module": "TestSpec", - "name": "report", - "package": "main", - "startCol": 22, - "startLine": 468 - }, - "name": "test run", - "started": 0, - "succeeded": "Failed", - "summary": "nri-prelude" -} \ No newline at end of file diff --git a/nri-prelude/tests/golden-results-8.10/test-report-logfile-onlys-passed b/nri-prelude/tests/golden-results-8.10/test-report-logfile-onlys-passed deleted file mode 100644 index a39611f8..00000000 --- a/nri-prelude/tests/golden-results-8.10/test-report-logfile-onlys-passed +++ /dev/null @@ -1,72 +0,0 @@ -{ - "allocated": 0, - "children": [ - { - "allocated": 0, - "children": [ - { - "allocated": 0, - "children": [ - { - "allocated": 1, - "children": [], - "containsFailures": false, - "details": null, - "finished": 0, - "frame": null, - "name": "name", - "started": 0, - "succeeded": "Succeeded", - "summary": null - }, - { - "allocated": 1, - "children": [], - "containsFailures": false, - "details": null, - "finished": 0, - "frame": null, - "name": "name", - "started": 0, - "succeeded": "Succeeded", - "summary": null - } - ], - "containsFailures": false, - "details": null, - "finished": 0, - "frame": null, - "name": "describe", - "started": 0, - "succeeded": "Succeeded", - "summary": "sub suite" - } - ], - "containsFailures": false, - "details": null, - "finished": 0, - "frame": null, - "name": "describe", - "started": 0, - "succeeded": "Succeeded", - "summary": "suite" - } - ], - "containsFailures": true, - "details": null, - "finished": 0, - "frame": { - "endCol": 69, - "endLine": 444, - "file": "tests/TestSpec.hs", - "module": "TestSpec", - "name": "report", - "package": "main", - "startCol": 22, - "startLine": 444 - }, - "name": "test run", - "started": 0, - "succeeded": "Failed", - "summary": "nri-prelude" -} \ No newline at end of file diff --git a/nri-prelude/tests/golden-results-8.10/test-report-logfile-passed-with-skipped b/nri-prelude/tests/golden-results-8.10/test-report-logfile-passed-with-skipped deleted file mode 100644 index 828a8c8e..00000000 --- a/nri-prelude/tests/golden-results-8.10/test-report-logfile-passed-with-skipped +++ /dev/null @@ -1,72 +0,0 @@ -{ - "allocated": 0, - "children": [ - { - "allocated": 0, - "children": [ - { - "allocated": 0, - "children": [ - { - "allocated": 1, - "children": [], - "containsFailures": false, - "details": null, - "finished": 0, - "frame": null, - "name": "name", - "started": 0, - "succeeded": "Succeeded", - "summary": null - }, - { - "allocated": 1, - "children": [], - "containsFailures": false, - "details": null, - "finished": 0, - "frame": null, - "name": "name", - "started": 0, - "succeeded": "Succeeded", - "summary": null - } - ], - "containsFailures": false, - "details": null, - "finished": 0, - "frame": null, - "name": "describe", - "started": 0, - "succeeded": "Succeeded", - "summary": "sub suite" - } - ], - "containsFailures": false, - "details": null, - "finished": 0, - "frame": null, - "name": "describe", - "started": 0, - "succeeded": "Succeeded", - "summary": "suite" - } - ], - "containsFailures": true, - "details": null, - "finished": 0, - "frame": { - "endCol": 69, - "endLine": 459, - "file": "tests/TestSpec.hs", - "module": "TestSpec", - "name": "report", - "package": "main", - "startCol": 22, - "startLine": 459 - }, - "name": "test run", - "started": 0, - "succeeded": "Failed", - "summary": "nri-prelude" -} \ No newline at end of file diff --git a/nri-prelude/tests/golden-results-8.10/test-report-logfile-tests-failed b/nri-prelude/tests/golden-results-8.10/test-report-logfile-tests-failed deleted file mode 100644 index 60e8ac84..00000000 --- a/nri-prelude/tests/golden-results-8.10/test-report-logfile-tests-failed +++ /dev/null @@ -1,120 +0,0 @@ -{ - "allocated": 0, - "children": [ - { - "allocated": 0, - "children": [ - { - "allocated": 0, - "children": [ - { - "allocated": 1, - "children": [], - "containsFailures": false, - "details": null, - "finished": 0, - "frame": null, - "name": "name", - "started": 0, - "succeeded": "Succeeded", - "summary": null - }, - { - "allocated": 1, - "children": [], - "containsFailures": false, - "details": null, - "finished": 0, - "frame": null, - "name": "name", - "started": 0, - "succeeded": "Succeeded", - "summary": null - }, - { - "allocated": 1, - "children": [], - "containsFailures": false, - "details": null, - "finished": 0, - "frame": null, - "name": "name", - "started": 0, - "succeeded": "Succeeded", - "summary": null - }, - { - "allocated": 1, - "children": [], - "containsFailures": false, - "details": null, - "finished": 0, - "frame": null, - "name": "name", - "started": 0, - "succeeded": "Succeeded", - "summary": null - }, - { - "allocated": 1, - "children": [], - "containsFailures": false, - "details": null, - "finished": 0, - "frame": null, - "name": "name", - "started": 0, - "succeeded": "Succeeded", - "summary": null - }, - { - "allocated": 1, - "children": [], - "containsFailures": false, - "details": null, - "finished": 0, - "frame": null, - "name": "name", - "started": 0, - "succeeded": "Succeeded", - "summary": null - } - ], - "containsFailures": false, - "details": null, - "finished": 0, - "frame": null, - "name": "describe", - "started": 0, - "succeeded": "Succeeded", - "summary": "sub suite" - } - ], - "containsFailures": false, - "details": null, - "finished": 0, - "frame": null, - "name": "describe", - "started": 0, - "succeeded": "Succeeded", - "summary": "suite" - } - ], - "containsFailures": true, - "details": null, - "finished": 0, - "frame": { - "endCol": 69, - "endLine": 488, - "file": "tests/TestSpec.hs", - "module": "TestSpec", - "name": "report", - "package": "main", - "startCol": 22, - "startLine": 488 - }, - "name": "test run", - "started": 0, - "succeeded": "Failed", - "summary": "nri-prelude" -} \ No newline at end of file diff --git a/nri-prelude/tests/golden-results-8.10/test-report-stdout-all-passed b/nri-prelude/tests/golden-results-8.10/test-report-stdout-all-passed deleted file mode 100644 index 3e8feb48..00000000 --- a/nri-prelude/tests/golden-results-8.10/test-report-stdout-all-passed +++ /dev/null @@ -1,4 +0,0 @@ -TEST RUN PASSED - -Duration: 1.23 s -Passed: 2 diff --git a/nri-prelude/tests/golden-results-8.10/test-report-stdout-no-tests-in-suite b/nri-prelude/tests/golden-results-8.10/test-report-stdout-no-tests-in-suite deleted file mode 100644 index 235dc19b..00000000 --- a/nri-prelude/tests/golden-results-8.10/test-report-stdout-no-tests-in-suite +++ /dev/null @@ -1 +0,0 @@ -TEST RUN INCOMPLETE because the test suite is empty. diff --git a/nri-prelude/tests/golden-results-8.10/test-report-stdout-onlys-passed b/nri-prelude/tests/golden-results-8.10/test-report-stdout-onlys-passed deleted file mode 100644 index 01561afa..00000000 --- a/nri-prelude/tests/golden-results-8.10/test-report-stdout-onlys-passed +++ /dev/null @@ -1,21 +0,0 @@ -↓ Module.hs:2 -↓ suite -↓ sub suite -✗ test 1 -This test passed, but there is a `Test.only` in your test. -I failed the test, because it's easy to forget to remove `Test.only`. - - -↓ Module.hs:2 -↓ suite -↓ sub suite -✗ test 2 -This test passed, but there is a `Test.only` in your test. -I failed the test, because it's easy to forget to remove `Test.only`. - - -TEST RUN INCOMPLETE because there is an `only` in your tests. - -Duration: 13 ms -Passed: 2 -Skipped: 2 diff --git a/nri-prelude/tests/golden-results-8.10/test-report-stdout-passed-with-skipped b/nri-prelude/tests/golden-results-8.10/test-report-stdout-passed-with-skipped deleted file mode 100644 index 54433379..00000000 --- a/nri-prelude/tests/golden-results-8.10/test-report-stdout-passed-with-skipped +++ /dev/null @@ -1,17 +0,0 @@ -↓ Module.hs:2 -↓ suite -↓ sub suite -✗ test 3 -This test was skipped. - -↓ Module.hs:2 -↓ suite -↓ sub suite -✗ test 4 -This test was skipped. - -TEST RUN INCOMPLETE because 2 tests were skipped - -Duration: 10 ms -Passed: 2 -Skipped: 2 diff --git a/nri-prelude/tests/golden-results-8.10/test-report-stdout-tests-failed b/nri-prelude/tests/golden-results-8.10/test-report-stdout-tests-failed deleted file mode 100644 index e7103c5d..00000000 --- a/nri-prelude/tests/golden-results-8.10/test-report-stdout-tests-failed +++ /dev/null @@ -1,40 +0,0 @@ -↓ Module.hs:2 -↓ suite -↓ sub suite -✗ test 5 -assertion error - -↓ Module.hs:2 -↓ suite -↓ sub suite -✗ test 6 -Test threw an exception -Control.Exception.Safe.throwString called with: - -exception -Called from: - - -↓ Module.hs:2 -↓ suite -↓ sub suite -✗ test 7 -Test timed out - -↓ Module.hs:2 -↓ suite -↓ sub suite -✗ test 7 -Test runner encountered an unexpected error: -sorry -This is a bug. - -If you have some time to report the bug it would be much appreciated! -You can do so here: https://github.com/NoRedInk/haskell-libraries/issues - -TEST RUN FAILED - -Duration: 17 ms -Passed: 2 -Skipped: 2 -Failed: 4 diff --git a/nri-prelude/tests/golden-results-8.10/test-report-stdout-tests-failed-loc b/nri-prelude/tests/golden-results-8.10/test-report-stdout-tests-failed-loc deleted file mode 100644 index 438af384..00000000 --- a/nri-prelude/tests/golden-results-8.10/test-report-stdout-tests-failed-loc +++ /dev/null @@ -1,281 +0,0 @@ -↓ tests/TestSpec.hs:324 -↓ suite loc -✗ test fail - -Expectation failed at tests/TestSpec.hs:324 - 322: describe - 323: "suite loc" -✗ 324: [ test "test fail" (\_ -> Expect.fail "fail"), - 325: test "test equal" (\_ -> Expect.equal True False), - 326: test "test notEqual" (\_ -> Expect.notEqual True True), - -fail - -↓ tests/TestSpec.hs:325 -↓ suite loc -✗ test equal - -Expectation failed at tests/TestSpec.hs:325 - 323: "suite loc" - 324: [ test "test fail" (\_ -> Expect.fail "fail"), -✗ 325: test "test equal" (\_ -> Expect.equal True False), - 326: test "test notEqual" (\_ -> Expect.notEqual True True), - 327: test - -▼▼▼▼ -False -╷ -│ Expect.equal -╵ -True -▲▲▲ - -↓ tests/TestSpec.hs:326 -↓ suite loc -✗ test notEqual - -Expectation failed at tests/TestSpec.hs:326 - 324: [ test "test fail" (\_ -> Expect.fail "fail"), - 325: test "test equal" (\_ -> Expect.equal True False), -✗ 326: test "test notEqual" (\_ -> Expect.notEqual True True), - 327: test - 328: "test all" - -True -╷ -│ Expect.notEqual -╵ -True - -↓ tests/TestSpec.hs:327 -↓ suite loc -✗ test all - -Expectation failed at tests/TestSpec.hs:332 - 330: True - 331: |> Expect.all -✗ 332: [ Expect.equal False - 333: ] - 334: ), - -▼▼▼ -True -╷ -│ Expect.equal -╵ -False -▲▲▲▲ - -↓ tests/TestSpec.hs:335 -↓ suite loc -✗ test lessThan - -Expectation failed at tests/TestSpec.hs:335 - 333: ] - 334: ), -✗ 335: test "test lessThan" (\_ -> Expect.lessThan 1 (2 :: Int)), - 336: test "test astMost" (\_ -> Expect.atMost 1 (2 :: Int)), - 337: test "test greatherThan" (\_ -> Expect.greaterThan 2 (1 :: Int)), - -▼ -2 -╷ -│ Expect.lessThan -╵ -1 -▲ - -↓ tests/TestSpec.hs:336 -↓ suite loc -✗ test astMost - -Expectation failed at tests/TestSpec.hs:336 - 334: ), - 335: test "test lessThan" (\_ -> Expect.lessThan 1 (2 :: Int)), -✗ 336: test "test astMost" (\_ -> Expect.atMost 1 (2 :: Int)), - 337: test "test greatherThan" (\_ -> Expect.greaterThan 2 (1 :: Int)), - 338: test "test atLeast" (\_ -> Expect.atLeast 2 (1 :: Int)), - -▼ -2 -╷ -│ Expect.atMost -╵ -1 -▲ - -↓ tests/TestSpec.hs:337 -↓ suite loc -✗ test greatherThan - -Expectation failed at tests/TestSpec.hs:337 - 335: test "test lessThan" (\_ -> Expect.lessThan 1 (2 :: Int)), - 336: test "test astMost" (\_ -> Expect.atMost 1 (2 :: Int)), -✗ 337: test "test greatherThan" (\_ -> Expect.greaterThan 2 (1 :: Int)), - 338: test "test atLeast" (\_ -> Expect.atLeast 2 (1 :: Int)), - 339: test "test within" (\_ -> Expect.within (Expect.Absolute 0.1) 1 2), - -▼ -1 -╷ -│ Expect.greaterThan -╵ -2 -▲ - -↓ tests/TestSpec.hs:338 -↓ suite loc -✗ test atLeast - -Expectation failed at tests/TestSpec.hs:338 - 336: test "test astMost" (\_ -> Expect.atMost 1 (2 :: Int)), - 337: test "test greatherThan" (\_ -> Expect.greaterThan 2 (1 :: Int)), -✗ 338: test "test atLeast" (\_ -> Expect.atLeast 2 (1 :: Int)), - 339: test "test within" (\_ -> Expect.within (Expect.Absolute 0.1) 1 2), - 340: test "test notWithin" (\_ -> Expect.notWithin (Expect.Relative 0.1) 1 1), - -▼ -1 -╷ -│ Expect.atLeast -╵ -2 -▲ - -↓ tests/TestSpec.hs:339 -↓ suite loc -✗ test within - -Expectation failed at tests/TestSpec.hs:339 - 337: test "test greatherThan" (\_ -> Expect.greaterThan 2 (1 :: Int)), - 338: test "test atLeast" (\_ -> Expect.atLeast 2 (1 :: Int)), -✗ 339: test "test within" (\_ -> Expect.within (Expect.Absolute 0.1) 1 2), - 340: test "test notWithin" (\_ -> Expect.notWithin (Expect.Relative 0.1) 1 1), - 341: test "test true" (\_ -> Expect.true False), - -▼ -2.0 -╷ -│ Expect.within Absolute 0.1 -╵ -1.0 -▲ - -↓ tests/TestSpec.hs:340 -↓ suite loc -✗ test notWithin - -Expectation failed at tests/TestSpec.hs:340 - 338: test "test atLeast" (\_ -> Expect.atLeast 2 (1 :: Int)), - 339: test "test within" (\_ -> Expect.within (Expect.Absolute 0.1) 1 2), -✗ 340: test "test notWithin" (\_ -> Expect.notWithin (Expect.Relative 0.1) 1 1), - 341: test "test true" (\_ -> Expect.true False), - 342: test "test false" (\_ -> Expect.false True), - -1.0 -╷ -│ Expect.notWithin Relative 0.1 -╵ -1.0 - -↓ tests/TestSpec.hs:341 -↓ suite loc -✗ test true - -Expectation failed at tests/TestSpec.hs:341 - 339: test "test within" (\_ -> Expect.within (Expect.Absolute 0.1) 1 2), - 340: test "test notWithin" (\_ -> Expect.notWithin (Expect.Relative 0.1) 1 1), -✗ 341: test "test true" (\_ -> Expect.true False), - 342: test "test false" (\_ -> Expect.false True), - 343: test "test ok" (\_ -> Expect.ok (Err ())), - -I expected a True but got False - -↓ tests/TestSpec.hs:342 -↓ suite loc -✗ test false - -Expectation failed at tests/TestSpec.hs:342 - 340: test "test notWithin" (\_ -> Expect.notWithin (Expect.Relative 0.1) 1 1), - 341: test "test true" (\_ -> Expect.true False), -✗ 342: test "test false" (\_ -> Expect.false True), - 343: test "test ok" (\_ -> Expect.ok (Err ())), - 344: test "test err" (\_ -> Expect.err (Ok ())), - -I expected a False but got True - -↓ tests/TestSpec.hs:343 -↓ suite loc -✗ test ok - -Expectation failed at tests/TestSpec.hs:343 - 341: test "test true" (\_ -> Expect.true False), - 342: test "test false" (\_ -> Expect.false True), -✗ 343: test "test ok" (\_ -> Expect.ok (Err ())), - 344: test "test err" (\_ -> Expect.err (Ok ())), - 345: test "test succeeds" (\_ -> Expect.succeeds (Task.fail "oops")), - -I expected a Ok but got Err (()) - -↓ tests/TestSpec.hs:344 -↓ suite loc -✗ test err - -Expectation failed at tests/TestSpec.hs:344 - 342: test "test false" (\_ -> Expect.false True), - 343: test "test ok" (\_ -> Expect.ok (Err ())), -✗ 344: test "test err" (\_ -> Expect.err (Ok ())), - 345: test "test succeeds" (\_ -> Expect.succeeds (Task.fail "oops")), - 346: test "test fails" (\_ -> Expect.fails (Task.succeed "oops")), - -I expected a Err but got Ok (()) - -↓ tests/TestSpec.hs:345 -↓ suite loc -✗ test succeeds - -Expectation failed at tests/TestSpec.hs:345 - 343: test "test ok" (\_ -> Expect.ok (Err ())), - 344: test "test err" (\_ -> Expect.err (Ok ())), -✗ 345: test "test succeeds" (\_ -> Expect.succeeds (Task.fail "oops")), - 346: test "test fails" (\_ -> Expect.fails (Task.succeed "oops")), - 347: test "test andCheck" (\_ -> Task.succeed (1 :: Int) |> Expect.andCheck (Expect.equal 2) |> map (\_ -> ())) - -"oops" - -↓ tests/TestSpec.hs:346 -↓ suite loc -✗ test fails - -Expectation failed at tests/TestSpec.hs:346 - 344: test "test err" (\_ -> Expect.err (Ok ())), - 345: test "test succeeds" (\_ -> Expect.succeeds (Task.fail "oops")), -✗ 346: test "test fails" (\_ -> Expect.fails (Task.succeed "oops")), - 347: test "test andCheck" (\_ -> Task.succeed (1 :: Int) |> Expect.andCheck (Expect.equal 2) |> map (\_ -> ())) - 348: ] - -"Expected failure but succeeded with \"oops\"" - -↓ tests/TestSpec.hs:347 -↓ suite loc -✗ test andCheck - -Expectation failed at tests/TestSpec.hs:347 - 345: test "test succeeds" (\_ -> Expect.succeeds (Task.fail "oops")), - 346: test "test fails" (\_ -> Expect.fails (Task.succeed "oops")), -✗ 347: test "test andCheck" (\_ -> Task.succeed (1 :: Int) |> Expect.andCheck (Expect.equal 2) |> map (\_ -> ())) - 348: ] - 349: contents <- - -▼ -1 -╷ -│ Expect.equal -╵ -2 -▲ - -TEST RUN FAILED - -Passed: 0 -Failed: 17 \ No newline at end of file diff --git a/nri-prelude/tests/golden-results-8.10/test-report-stdout-tests-failed-loc-one-file b/nri-prelude/tests/golden-results-8.10/test-report-stdout-tests-failed-loc-one-file deleted file mode 100644 index 8a81af46..00000000 --- a/nri-prelude/tests/golden-results-8.10/test-report-stdout-tests-failed-loc-one-file +++ /dev/null @@ -1,17 +0,0 @@ -↓ tests/TestSpec.hs:397 -↓ suite loc -✗ test fail - -Expectation failed at tests/TestSpec.hs:397 - 395: describe - 396: "suite loc" -✗ 397: [ test "test fail" (\_ -> Expect.fail "fail"), - 398: test "test equal" (\_ -> Expect.equal True True), - 399: test "test notEqual" (\_ -> Expect.notEqual True False) - -fail - -TEST RUN FAILED - -Passed: 2 -Failed: 1 \ No newline at end of file diff --git a/nri-prelude/tests/golden-results-8.10/test-report-stdout-tests-failed-loc-subset b/nri-prelude/tests/golden-results-8.10/test-report-stdout-tests-failed-loc-subset deleted file mode 100644 index afd41685..00000000 --- a/nri-prelude/tests/golden-results-8.10/test-report-stdout-tests-failed-loc-subset +++ /dev/null @@ -1,17 +0,0 @@ -↓ tests/TestSpec.hs:369 -↓ suite loc -✗ test fail - -Expectation failed at tests/TestSpec.hs:369 - 367: describe - 368: "suite loc" -✗ 369: [ test "test fail" (\_ -> Expect.fail "fail"), - 370: test "test equal" (\_ -> Expect.equal True True), - 371: test "test notEqual" (\_ -> Expect.notEqual True False) - -fail - -TEST RUN FAILED - -Passed: 1 -Failed: 1 \ No newline at end of file diff --git a/nri-prelude/tests/golden-results-8.10/warn b/nri-prelude/tests/golden-results-8.10/warn deleted file mode 100644 index 4ed8d977..00000000 --- a/nri-prelude/tests/golden-results-8.10/warn +++ /dev/null @@ -1,25 +0,0 @@ -[ TracingSpan - { name = "user cut themselves on the modal" - , started = MonotonicTime { inMicroseconds = 0 } - , finished = MonotonicTime { inMicroseconds = 0 } - , frame = - Just - ( "warn" - , SrcLoc - { srcLocPackage = "main" - , srcLocModule = "LogSpec" - , srcLocFile = "tests/LogSpec.hs" - , srcLocStartLine = 53 - , srcLocStartCol = 15 - , srcLocEndLine = 55 - , srcLocEndCol = 56 - } - ) - , details = Just "{\"level\":\"Warn\",\"modal\":\"SURPRISE!\"}" - , summary = Nothing - , succeeded = Failed - , containsFailures = True - , allocated = 0 - , children = [] - } -] \ No newline at end of file diff --git a/nri-redis/CHANGELOG.md b/nri-redis/CHANGELOG.md index 9d6e62af..4dac31ac 100644 --- a/nri-redis/CHANGELOG.md +++ b/nri-redis/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.2.0.0 + +- Drop support for GHC 8.10.7 + # 0.1.2.1 - Support GHC 9.4.7, `aeson-2.1.x` diff --git a/nri-redis/nri-redis.cabal b/nri-redis/nri-redis.cabal index ecc553eb..a50fdfbb 100644 --- a/nri-redis/nri-redis.cabal +++ b/nri-redis/nri-redis.cabal @@ -5,7 +5,7 @@ cabal-version: 1.18 -- see: https://github.com/sol/hpack name: nri-redis -version: 0.1.2.1 +version: 0.2.0.0 synopsis: An intuitive hedis wrapper library. description: Please see the README at . category: Web @@ -65,7 +65,7 @@ library build-depends: aeson >=1.4.6.0 && <2.2 , async >=2.2.2 && <2.3 - , base >=4.12.0.0 && <4.18 + , base >=4.16.4.0 && <4.18 , bytestring >=0.10.8.2 && <0.12 , conduit >=1.3.0 && <1.4 , containers >=0.6.0.1 && <0.7 @@ -74,8 +74,8 @@ library , hedis >=0.14.0 && <0.16 , megaparsec >=9.2.2 && <9.4 , modern-uri >=0.3.1.0 && <0.4 - , nri-env-parser >=0.1.0.0 && <0.2 - , nri-observability >=0.1.0 && <0.2 + , nri-env-parser >=0.1.0.0 && <0.3 + , nri-observability >=0.1.0 && <0.3 , nri-prelude >=0.1.0.0 && <0.7 , pcre-light >=0.4.1.0 && <0.4.2 , resourcet >=1.2.0 && <1.3 @@ -130,7 +130,7 @@ test-suite tests build-depends: aeson >=1.4.6.0 && <2.2 , async >=2.2.2 && <2.3 - , base >=4.12.0.0 && <4.18 + , base >=4.16.4.0 && <4.18 , bytestring >=0.10.8.2 && <0.12 , conduit >=1.3.0 && <1.4 , containers >=0.6.0.1 && <0.7 @@ -139,8 +139,8 @@ test-suite tests , hedis >=0.14.0 && <0.16 , megaparsec >=9.2.2 && <9.4 , modern-uri >=0.3.1.0 && <0.4 - , nri-env-parser >=0.1.0.0 && <0.2 - , nri-observability >=0.1.0 && <0.2 + , nri-env-parser >=0.1.0.0 && <0.3 + , nri-observability >=0.1.0 && <0.3 , nri-prelude >=0.1.0.0 && <0.7 , pcre-light >=0.4.1.0 && <0.4.2 , resourcet >=1.2.0 && <1.3 diff --git a/nri-redis/package.yaml b/nri-redis/package.yaml index cf34c9ec..b2da9535 100644 --- a/nri-redis/package.yaml +++ b/nri-redis/package.yaml @@ -3,7 +3,7 @@ synopsis: An intuitive hedis wrapper library. description: Please see the README at . homepage: https://github.com/NoRedInk/haskell-libraries/tree/trunk/nri-redis#readme author: NoRedInk -version: 0.1.2.1 +version: 0.2.0.0 maintainer: haskell-open-source@noredink.com copyright: 2023 NoRedInk Corp. github: NoRedInk/haskell-libraries/nri-redis @@ -16,7 +16,7 @@ extra-doc-files: dependencies: - aeson >= 1.4.6.0 && < 2.2 - async >=2.2.2 && <2.3 - - base >= 4.12.0.0 && < 4.18 + - base >= 4.16.4.0 && < 4.18 - bytestring >= 0.10.8.2 && < 0.12 - conduit >= 1.3.0 && < 1.4 - containers >= 0.6.0.1 && < 0.7 @@ -26,8 +26,8 @@ dependencies: - hedis >= 0.14.0 && < 0.16 - megaparsec >= 9.2.2 && < 9.4 - modern-uri >= 0.3.1.0 && < 0.4 - - nri-env-parser >= 0.1.0.0 && < 0.2 - - nri-observability >= 0.1.0 && < 0.2 + - nri-env-parser >= 0.1.0.0 && < 0.3 + - nri-observability >= 0.1.0 && < 0.3 - nri-prelude >= 0.1.0.0 && < 0.7 - pcre-light >= 0.4.1.0 && < 0.4.2 - resourcet >= 1.2.0 && < 1.3 diff --git a/nri-test-encoding/CHANGELOG.md b/nri-test-encoding/CHANGELOG.md index 2001d75c..f0aab624 100644 --- a/nri-test-encoding/CHANGELOG.md +++ b/nri-test-encoding/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.2.0.0 + +- Drop support for GHC 8.10.7 + # 0.1.1.5 - Support GHC 9.4.7, `aeson-2.1.x` diff --git a/nri-test-encoding/nri-test-encoding.cabal b/nri-test-encoding/nri-test-encoding.cabal index 238c76b8..ec6782c7 100644 --- a/nri-test-encoding/nri-test-encoding.cabal +++ b/nri-test-encoding/nri-test-encoding.cabal @@ -5,7 +5,7 @@ cabal-version: 1.18 -- see: https://github.com/sol/hpack name: nri-test-encoding -version: 0.1.1.5 +version: 0.2.0.0 synopsis: A library to simplify writing golden tests for encoding types. description: Please see the README at . category: Testing @@ -55,11 +55,11 @@ library build-depends: aeson >=1.4.6.0 && <2.2 , aeson-pretty >=0.8.0 && <0.9 - , base >=4.12.0.0 && <4.18 + , base >=4.16.4.0 && <4.18 , bytestring >=0.10.8.2 && <0.12 , filepath >=1.4.2.1 && <1.5 , nri-prelude >=0.1.0.0 && <0.7 - , nri-redis >=0.1.0.0 && <0.2 + , nri-redis >=0.1.0.0 && <0.3 , servant >=0.16.2 && <0.20 , servant-auth-server >=0.4.5.1 && <0.5 , servant-server >=0.16.2 && <0.20 @@ -96,11 +96,11 @@ test-suite tests build-depends: aeson >=1.4.6.0 && <2.2 , aeson-pretty >=0.8.0 && <0.9 - , base >=4.12.0.0 && <4.18 + , base >=4.16.4.0 && <4.18 , bytestring >=0.10.8.2 && <0.12 , filepath >=1.4.2.1 && <1.5 , nri-prelude >=0.1.0.0 && <0.7 - , nri-redis >=0.1.0.0 && <0.2 + , nri-redis >=0.1.0.0 && <0.3 , servant >=0.16.2 && <0.20 , servant-auth-server >=0.4.5.1 && <0.5 , servant-server >=0.16.2 && <0.20 diff --git a/nri-test-encoding/package.yaml b/nri-test-encoding/package.yaml index 55918908..b24638f3 100644 --- a/nri-test-encoding/package.yaml +++ b/nri-test-encoding/package.yaml @@ -3,7 +3,7 @@ synopsis: A library to simplify writing golden tests for encoding types. description: Please see the README at . homepage: https://github.com/NoRedInk/haskell-libraries/tree/trunk/nri-test-encoding#readme author: NoRedInk -version: 0.1.1.5 +version: 0.2.0.0 maintainer: haskell-open-source@noredink.com copyright: 2023 NoRedInk Corp. github: NoRedInk/haskell-libraries/nri-test-encoding @@ -16,7 +16,7 @@ extra-doc-files: dependencies: - aeson >= 1.4.6.0 && < 2.2 - aeson-pretty >=0.8.0 && < 0.9 - - base >= 4.12.0.0 && < 4.18 + - base >= 4.16.4.0 && < 4.18 - bytestring >= 0.10.8.2 && < 0.12 - filepath >= 1.4.2.1 && < 1.5 - servant >= 0.16.2 && < 0.20 @@ -24,7 +24,7 @@ dependencies: - servant-server >= 0.16.2 && < 0.20 - text >= 1.2.3.1 && < 2.1 - nri-prelude >= 0.1.0.0 && < 0.7 - - nri-redis >= 0.1.0.0 && < 0.2 + - nri-redis >= 0.1.0.0 && < 0.3 library: exposed-modules: - Examples diff --git a/run-tests.sh b/run-tests.sh index b467360c..34544b7d 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -6,9 +6,13 @@ pushd nri-postgresql source setup-postgres.sh popd -## start redis +## start redis. We don't want background snapshotting, and we don't want it to +## block us, if it happens to be enabled. This is an instance for testing only. mkdir -p ./_build/redis/data -redis-server --daemonize yes --dir ./_build/redis/data +redis-server --daemonize yes \ + --dir ./_build/redis/data \ + --save '' \ + --stop-writes-on-bgsave-error no ## start zookeeper (for kafka) mkdir -p /tmp/zookeeper /tmp/zookeeper-logs diff --git a/shell-ghc-8-10.nix b/shell-ghc-8-10.nix deleted file mode 100644 index 67beb07b..00000000 --- a/shell-ghc-8-10.nix +++ /dev/null @@ -1,15 +0,0 @@ -let - sources = import ./nix/sources.nix { }; - - pkgs = import sources.nixpkgs { }; -in import nix/mk-shell.nix { - pkgs = pkgs; - haskellPackages = pkgs.haskell.packages.ghc8107.extend (self: super: { - # modern-uri-0.3.6.0 is incompatible with the `base` provided by ghc 8.10.7; - # use known-good @ 0.3.4.4. - modern-uri = self.callHackage "modern-uri" "0.3.4.4" { }; - - # todo: resolve breaking changes in brick >= 0.72 - brick = self.callHackage "brick" "0.71.1" { }; - }); -} diff --git a/shell-ghc-9-2.nix b/shell-ghc-9-2.nix index 3c625bb2..4505bf10 100644 --- a/shell-ghc-9-2.nix +++ b/shell-ghc-9-2.nix @@ -4,8 +4,30 @@ let pkgs = import sources.nixpkgs { }; in import nix/mk-shell.nix { pkgs = pkgs; - haskellPackages = pkgs.haskell.packages.ghc926.extend (self: super: { - # todo: resolve breaking changes in brick >= 0.72 - brick = self.callHackage "brick" "0.71.1" { }; - }); + haskellPackages = pkgs.haskell.packages.ghc926.extend (self: super: + let + packageFromSources = name: self.callCabal2nix name sources."${name}" { }; + in { + # todo: resolve breaking changes in brick >= 0.72 + brick = self.callHackage "brick" "0.71.1" { }; + + # tasty-test-reporter is marked as broken, get the same version we use for + # ghc 9.4 + tasty-test-reporter = packageFromSources "tasty-test-reporter"; + + hspec = + pkgs.haskell.lib.doJailbreak (self.callHackage "hspec" "2.8.5" { }); + hspec-discover = self.callHackage "hspec-discover" "2.8.5" { }; + hspec-meta = self.callHackage "hspec-meta" "2.7.8" { }; + + # servant-auth-server 0.4.8.0 is marked as broken in nixpkgs, so jailbreak + # (known good) 0.4.7.0 to make it work + servant-auth-server = pkgs.haskell.lib.doJailbreak + (self.callHackage "servant-auth-server" "0.4.7.0" { }); + servant-auth = pkgs.haskell.lib.doJailbreak super.servant-auth; + + # required by servant-auth-server@0.4.7.0 + jose = pkgs.haskell.lib.dontCheck (self.callHackage "jose" "0.9" { }); + jose-jwt = self.callHackage "jose-jwt" "0.9.5" { }; + }); } diff --git a/shell-ghc-9-4.nix b/shell-ghc-9-4.nix index a8a81b89..b4b58ec9 100644 --- a/shell-ghc-9-4.nix +++ b/shell-ghc-9-4.nix @@ -6,13 +6,12 @@ in import nix/mk-shell.nix { pkgs = pkgs; haskellPackages = pkgs.haskell.packages.ghc947.extend (self: super: let - packageFromSources = name: - self.callCabal2nix name sources."${name}" { }; + packageFromSources = name: self.callCabal2nix name sources."${name}" { }; in { # todo: resolve breaking changes in brick >= 0.72, also jailbreak # to allow ghc 9.4.x - brick = pkgs.haskell.lib.doJailbreak - (self.callHackage "brick" "0.71.1" { }); + brick = + pkgs.haskell.lib.doJailbreak (self.callHackage "brick" "0.71.1" { }); # latest master supports ghc 9.4.x tasty-test-reporter = packageFromSources "tasty-test-reporter"; @@ -22,6 +21,14 @@ in import nix/mk-shell.nix { # jailbreak to allow text >= 2 pretty-diff = pkgs.haskell.lib.doJailbreak super.pretty-diff; - } - ); + + # servant-auth-server 0.4.8.0 is marked as broken in nixpkgs, so jailbreak + # (known good) 0.4.7.0 to make it work + servant-auth-server = pkgs.haskell.lib.doJailbreak + (self.callHackage "servant-auth-server" "0.4.7.0" { }); + + # required by servant-auth-server@0.4.7.0 + jose = pkgs.haskell.lib.dontCheck (self.callHackage "jose" "0.9" { }); + jose-jwt = self.callHackage "jose-jwt" "0.9.5" { }; + }); }