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

Support Aeson 2.2 #2578

Merged
merged 1 commit into from
Sep 21, 2023
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
1 change: 1 addition & 0 deletions .ci/stack-8.10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ extra-deps:
- prettyprinter-interp-0.2.0.0@sha256:45299b61bd6c27d594c1a72b5a8dd5734e791a59828725e4f4e420f3cc37232b,2016
- infinite-list-0.1@sha256:4de250517ce75e128c766fbc1f23b5a778ea964e695e47f8e83e0f3b293091bf,2383
- tasty-1.5@sha256:c62c96da1e9d65bf61ce583e9f7085eed1daeb62a45f3106ca252bf9ef87025b,2763
- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
1 change: 1 addition & 0 deletions .ci/stack-8.6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ extra-deps:
- prettyprinter-interp-0.2.0.0@sha256:45299b61bd6c27d594c1a72b5a8dd5734e791a59828725e4f4e420f3cc37232b,2016
- infinite-list-0.1@sha256:4de250517ce75e128c766fbc1f23b5a778ea964e695e47f8e83e0f3b293091bf,2383
- tasty-1.5@sha256:c62c96da1e9d65bf61ce583e9f7085eed1daeb62a45f3106ca252bf9ef87025b,2763
- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
1 change: 1 addition & 0 deletions .ci/stack-8.8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ extra-deps:
- prettyprinter-interp-0.2.0.0@sha256:45299b61bd6c27d594c1a72b5a8dd5734e791a59828725e4f4e420f3cc37232b,2016
- infinite-list-0.1@sha256:4de250517ce75e128c766fbc1f23b5a778ea964e695e47f8e83e0f3b293091bf,2383
- tasty-1.5@sha256:c62c96da1e9d65bf61ce583e9f7085eed1daeb62a45f3106ca252bf9ef87025b,2763
- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
1 change: 1 addition & 0 deletions .ci/stack-9.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ extra-deps:
- prettyprinter-interp-0.2.0.0@sha256:45299b61bd6c27d594c1a72b5a8dd5734e791a59828725e4f4e420f3cc37232b,2016
- infinite-list-0.1@sha256:4de250517ce75e128c766fbc1f23b5a778ea964e695e47f8e83e0f3b293091bf,2383
- tasty-1.5@sha256:c62c96da1e9d65bf61ce583e9f7085eed1daeb62a45f3106ca252bf9ef87025b,2763
- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
1 change: 1 addition & 0 deletions .ci/stack-9.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ extra-deps:
- prettyprinter-interp-0.2.0.0@sha256:7072e659fb902cbcab790c9cca2b0739f9f4b81b666a63f2140139950f05025d,2086
- infinite-list-0.1@sha256:4de250517ce75e128c766fbc1f23b5a778ea964e695e47f8e83e0f3b293091bf,2383
- tasty-1.5@sha256:c62c96da1e9d65bf61ce583e9f7085eed1daeb62a45f3106ca252bf9ef87025b,2763
- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154
5 changes: 4 additions & 1 deletion clash-lib/clash-lib.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ Library
RecordWildCards
TemplateHaskell

Build-depends: aeson >= 0.6.2.0 && < 2.2,
Build-depends: aeson >= 0.6.2.0 && < 2.3,
attoparsec-aeson >= 2.1 && < 2.3,
aeson-pretty >= 0.8 && < 0.9,
ansi-terminal >= 0.8.0.0 && < 1.1,
array,
Expand Down Expand Up @@ -337,6 +338,7 @@ executable v16-upgrade-primitives
Build-Depends:
base,
aeson,
attoparsec-aeson,
deepseq,
yaml,
bytestring,
Expand Down Expand Up @@ -404,6 +406,7 @@ test-suite unittests
ghc-typelits-knownnat,

aeson,
attoparsec-aeson,
aeson-pretty,
base,
base16-bytestring,
Expand Down
3 changes: 2 additions & 1 deletion clash-lib/src/Data/Aeson/Extra.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ import Data.List (intercalate)
import Data.List.NonEmpty (NonEmpty (..))
import qualified Data.List.NonEmpty as NE
import Data.Tuple.Extra (second, first)
import Data.Aeson (FromJSON, Result (..), fromJSON, json)
import Data.Aeson (FromJSON, Result (..), fromJSON)
import Data.Aeson.Parser (json)
import Data.Attoparsec.Lazy (Result (..), parse)
import Data.ByteString.Lazy (ByteString)
import qualified Data.ByteString.Lazy as BS
Expand Down
36 changes: 18 additions & 18 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@
# The versions of GHC that we want to be able to build / develop against
# within the nix environment. Since nix is lazy, only derivations for
# versions of GHC which are used are actually evaluated.
ghcVersions = [ "ghc902" "ghc961" ];
ghcVersions = [ "ghc902" "ghc962" ];

# We pick a single version of GHC to use by default within nix. This is
# probably cleaner than always having N copies of each package / app and
# being forced to refer to them by their GHC version.
defaultGhcVersion = "ghc961";
defaultGhcVersion = "ghc962";

# Overlays are not per-system, so let's only compute them once.
# For each version of GHC we produce a `pkgs.clashPackages-ghcVER`, e.g.
# `pkgs.clashPackages-ghc961`.
# `pkgs.clashPackages-ghc962`.
overlays =
let
makeOverlay =
Expand Down
10 changes: 0 additions & 10 deletions nix/overlay-ghc902.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,9 @@ in
# is basically abandonware it catches fire with brick 1.0+.
brick = doJailbreak prev.brick_0_70_1;

# Marked as broken in nixpkgs since it needs a newer hashable than the one
# in the .cabal file uplodaed to hackage.
concurrent-supply = doJailbreak (markUnbroken prev.concurrent-supply);

# Marked as broken in nixpkgs for this version of GHC.
docopt = markUnbroken prev.docopt;

# The doctests crash for this package, but the main testsuite passes.
generic-lens = dontCheck prev.generic-lens;

# For some reason, lens 5.1.1 didn't build properly.
lens = prev.lens_5_2_2;

# Marked as broken in nixpkgs, since it specifies much older dependencies
# than the defaults in nixpkgs.
rewrite-inspector = doJailbreak (markUnbroken prev.rewrite-inspector);
Expand Down
16 changes: 6 additions & 10 deletions nix/overlay-ghc961.nix → nix/overlay-ghc962.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ in
# .cabal file currently uploaded to hackage.
concurrent-supply = doJailbreak (markUnbroken prev.concurrent-supply);

# Use a newer version than the default in nixpkgs.
doctest-parallel = prev.doctest-parallel_0_3_0_1;

# Use a branch with changes to support GHC 9.6.1.
hint =
prev.hint.overrideAttrs (_: {
Expand All @@ -27,16 +24,10 @@ in
};
});

# Latest hackage revision is not yet in nixpkgs.
prettyprinter-interp = doJailbreak prev.prettyprinter-interp;

# Marked as broken in nixpkgs, since it specifies much older dependencies
# than the defaults in nixpkgs.
rewrite-inspector = doJailbreak (markUnbroken prev.rewrite-inspector);

# Use a newer version than the default in nixpkgs.
singletons = prev.singletons_3_0_2;

# We want a version that matches with singletons-th, but the tests in here
# are also a bit flaky since GHC 9.6 isn't officially supported.
singletons-base = dontCheck prev.singletons-base_3_2;
Expand All @@ -54,5 +45,10 @@ in
vector-binary-instances = doJailbreak prev.vector-binary-instances;

# Use a newer version than the default in nixpkgs.
vty = prev.vty_5_38;
th-abstraction = prev.th-abstraction_0_5_0_0;

# We can't use newer than 1.12 here: we need singletons 3.x (due to the cabal
# file of `clash-testsuite`) but the changed `DConP` constructor in 1.13
# stops `singletons-th` from building.
doctest = prev.callHackage "doctest" "0.21.1" { };
}
1 change: 1 addition & 0 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ extra-deps:
- prettyprinter-interp-0.2.0.0@sha256:45299b61bd6c27d594c1a72b5a8dd5734e791a59828725e4f4e420f3cc37232b,2016
- infinite-list-0.1@sha256:4de250517ce75e128c766fbc1f23b5a778ea964e695e47f8e83e0f3b293091bf,2383
- tasty-1.5@sha256:c62c96da1e9d65bf61ce583e9f7085eed1daeb62a45f3106ca252bf9ef87025b,2763
- attoparsec-aeson-2.1.0.0@sha256:fa83aba43bfa58490de8f274d19b9d58b6403a207b12cac5f93922102b084c52,1154