diff --git a/fixtures/calculator/smoke.yaml b/fixtures/calculator/smoke.yaml index b00308e3..7d167acb 100644 --- a/fixtures/calculator/smoke.yaml +++ b/fixtures/calculator/smoke.yaml @@ -57,6 +57,11 @@ tests: fixtures/calculator.rb:4:in `
': undefined method `to-the-power-of' for 3:Fixnum (NoMethodError) - | fixtures/calculator.rb:4:in `
': undefined method `to-the-power-of' for 3:Integer (NoMethodError) + - | + fixtures/calculator.rb:4:in `
': undefined method `to-the-power-of' for an instance of Integer (NoMethodError) + + puts tokens[0].to_i.send(tokens[1].to_sym, tokens[2].to_i) + ^^^^^ - name: ignored-test ignored: true diff --git a/flake.lock b/flake.lock index ae18072d..c48114b1 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "owner": "edolstra", "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "type": "github" }, "original": { @@ -17,12 +17,15 @@ } }, "flake-utils": { + "inputs": { + "systems": "systems" + }, "locked": { - "lastModified": 1676283394, - "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", "type": "github" }, "original": { @@ -31,35 +34,18 @@ "type": "github" } }, - "haskellTar": { - "flake": false, - "locked": { - "lastModified": 1657046996, - "narHash": "sha256-gDxF+1L0sMzwogCCTGtiYnPgZMIg5fTWV8d062F7iR0=", - "owner": "haskell", - "repo": "tar", - "rev": "dbf8c995153c8a80450724d9f94cf33403740c80", - "type": "github" - }, - "original": { - "owner": "haskell", - "repo": "tar", - "rev": "dbf8c995153c8a80450724d9f94cf33403740c80", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1677706469, - "narHash": "sha256-5oCNOAnnrRnRxbyrfTbXdEbCQVZJ7Dj1KOPPyVYRhJE=", + "lastModified": 1726937504, + "narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fd449a33c1209d2aabc1cd4819e384b21f520eef", + "rev": "9357f4f23713673f310988025d9dc261c20e70c6", "type": "github" }, "original": { "owner": "NixOS", - "ref": "master", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -68,9 +54,23 @@ "inputs": { "flake-compat": "flake-compat", "flake-utils": "flake-utils", - "haskellTar": "haskellTar", "nixpkgs": "nixpkgs" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index cb33bc2f..21542760 100644 --- a/flake.nix +++ b/flake.nix @@ -2,12 +2,10 @@ description = "Smoke"; inputs = { - flake-compat.url = github:edolstra/flake-compat; + flake-compat.url = "github:edolstra/flake-compat"; flake-compat.flake = false; - flake-utils.url = github:numtide/flake-utils; - nixpkgs.url = github:NixOS/nixpkgs/master; - haskellTar.url = github:haskell/tar/dbf8c995153c8a80450724d9f94cf33403740c80; - haskellTar.flake = false; + flake-utils.url = "github:numtide/flake-utils"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; }; outputs = @@ -15,41 +13,12 @@ , flake-compat , flake-utils , nixpkgs - , haskellTar }: flake-utils.lib.eachDefaultSystem (system: let ghcVersion = lib.strings.fileContents ./ghc.version; ghcName = "ghc" + lib.strings.stringAsChars (c: if c == "." then "" else c) ghcVersion; - pkgs = import nixpkgs { - inherit system; - overlays = [ - (self: super: { - haskell = super.haskell // { - packages = super.haskell.packages // { - # haskell package set from the version of GHC specified by `./ghc.version` - ${ghcName} = super.haskell.packages.${ghcName}.override { - overrides = hself: hsuper: { - # Override tar with the patched version; see stack.yaml for details. - # The tests don't work. - tar = hsuper.callCabal2nixWithOptions "tar" haskellTar "--no-check" { }; - } // (if super.stdenv.targetPlatform.isDarwin - then - # macOS-specific overrides: - { - # On aarch64-darwin, this creates a cycle. - # see https://github.com/NixOS/nixpkgs/issues/140774 - ormolu = super.haskell.lib.overrideCabal hsuper.ormolu (drv: { enableSeparateBinOutput = false; }); - } - else - # We don't need to override anything on Linux: - { }); - }; - }; - }; - }) - ]; - }; + pkgs = import nixpkgs { inherit system; }; inherit (pkgs) lib haskell; inherit (haskell.lib) overrideCabal justStaticExecutables doStrip; @@ -66,7 +35,10 @@ smoke = let - drv = hsPkgs.callCabal2nix "smoke" (pkgs.nix-gitignore.gitignoreSource [ ] ./.) { }; + drv = hsPkgs.callCabal2nix "smoke" (pkgs.nix-gitignore.gitignoreSource [ ] ./.) { + # Override tar with the patched version; see stack.yaml for details. + tar = hsPkgs.tar_0_6_3_0; + }; in haskell.lib.addExtraLibraries drv staticLibs; in diff --git a/ghc.version b/ghc.version index 4d6442e6..abe6c21e 100644 --- a/ghc.version +++ b/ghc.version @@ -1 +1 @@ -9.2.6 +9.6.6 diff --git a/src/lib/Test/Smoke/Discovery.hs b/src/lib/Test/Smoke/Discovery.hs index 1c351334..51913eee 100644 --- a/src/lib/Test/Smoke/Discovery.hs +++ b/src/lib/Test/Smoke/Discovery.hs @@ -9,7 +9,7 @@ import Control.Monad (forM, unless) import Control.Monad.IO.Class (liftIO) import Control.Monad.Trans.Except (ExceptT (..), except, throwE, withExceptT) import Data.Aeson qualified as Aeson -import Data.Aeson.Internal qualified as Aeson.Internal +import Data.Aeson.Types qualified as Aeson.Types import Data.List qualified as List import Data.Text qualified as Text import Data.Vector (Vector) @@ -75,9 +75,9 @@ decodeSpecificationFile path = withExceptT (InvalidSpecification path) $ do withExceptT Yaml.prettyPrintParseException $ ExceptT $ Yaml.decodeFileEither (toFilePath resolvedPath) - except $ case Aeson.Internal.ifromJSON value of - Aeson.Internal.IError jsonPath message -> Left $ Aeson.Internal.formatError jsonPath message - Aeson.Internal.ISuccess suite -> Right suite + except $ case Aeson.Types.ifromJSON value of + Aeson.Types.IError jsonPath message -> Left $ Aeson.Types.formatError jsonPath message + Aeson.Types.ISuccess suite -> Right suite parseRoot :: String -> Discovery Root parseRoot location = do diff --git a/stack.yaml b/stack.yaml index 80b485ca..3c59e9b3 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-20.12 +resolver: lts-22.35 packages: - . ghc-options: @@ -7,6 +7,5 @@ nix: shell-file: ./shell.nix extra-deps: # There was a bug in the `tar` package that is fixed in https://github.com/haskell/tar/pull/26. - # However, this code has not been released, so we need to grab the latest commit instead. - - git: https://github.com/haskell/tar.git - commit: dbf8c995153c8a80450724d9f94cf33403740c80 + # This has been released in tar v6.0.0.0 and up, but these versions are not in the current Stackage LTS (above). + - tar-0.6.3.0 diff --git a/stack.yaml.lock b/stack.yaml.lock index 83be75e6..16384646 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -5,19 +5,15 @@ packages: - completed: - commit: dbf8c995153c8a80450724d9f94cf33403740c80 - git: https://github.com/haskell/tar.git - name: tar + hackage: tar-0.6.3.0@sha256:e9f151d9999be8953443e730524b2792e9c0a4fb5b1463097fa1a8230870fd8a,4634 pantry-tree: - sha256: 1a97f1a4e4e2e86e338c2629c75af9efbb64eb087efcb6adce6c19f22bfd4de0 - size: 1985 - version: 0.6.0.0 + sha256: e59e0d0224352033c32356d517f90d4c6a41cee4fa0d386885df146302d1ba3b + size: 2241 original: - commit: dbf8c995153c8a80450724d9f94cf33403740c80 - git: https://github.com/haskell/tar.git + hackage: tar-0.6.3.0 snapshots: - completed: - sha256: af5d667f6096e535b9c725a72cffe0f6c060e0568d9f9eeda04caee70d0d9d2d - size: 649133 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/12.yaml - original: lts-20.12 + sha256: 31a722458578b1f709b6fe098d9027bbb5c04b4430e7338a5e69707bd3990e5d + size: 720019 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/35.yaml + original: lts-22.35