From fee95239a9ce9b6f2380a79bf1789a3d2d182c48 Mon Sep 17 00:00:00 2001 From: Gabriel Gonzalez Date: Thu, 3 Jun 2021 22:40:35 -0700 Subject: [PATCH] =?UTF-8?q?Version=201.38.1=20=E2=86=92=201.39.0=20(#2201)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dhall-bash/dhall-bash.cabal | 4 +-- dhall-docs/CHANGELOG.md | 4 +++ dhall-docs/dhall-docs.cabal | 4 +-- dhall-json/CHANGELOG.md | 4 +++ dhall-json/dhall-json.cabal | 4 +-- dhall-lsp-server/dhall-lsp-server.cabal | 4 +-- dhall-nix/dhall-nix.cabal | 4 +-- dhall-nixpkgs/dhall-nixpkgs.cabal | 4 +-- dhall-openapi/dhall-openapi.cabal | 4 +-- dhall-yaml/CHANGELOG.md | 4 +++ dhall-yaml/dhall-yaml.cabal | 4 +-- dhall/CHANGELOG.md | 34 ++++++++++++++++++ dhall/dhall-lang | 2 +- dhall/dhall.cabal | 2 +- dhall/src/Dhall/Parser/Expression.hs | 2 +- dhall/tests/Dhall/Test/Import.hs | 48 ++++++++++++++++++------- 16 files changed, 101 insertions(+), 31 deletions(-) diff --git a/dhall-bash/dhall-bash.cabal b/dhall-bash/dhall-bash.cabal index e7fdb5b61..89afe07b6 100644 --- a/dhall-bash/dhall-bash.cabal +++ b/dhall-bash/dhall-bash.cabal @@ -1,5 +1,5 @@ Name: dhall-bash -Version: 1.0.36 +Version: 1.0.37 Cabal-Version: >=1.10 Build-Type: Simple Tested-With: GHC == 8.4.3, GHC == 8.6.1 @@ -31,7 +31,7 @@ Library base >= 4.11.0.0 && < 5 , bytestring < 0.12, containers < 0.7 , - dhall >= 1.36.0 && < 1.39, + dhall >= 1.36.0 && < 1.40, neat-interpolation < 0.6 , shell-escape < 0.3 , text >= 0.2 && < 1.3 diff --git a/dhall-docs/CHANGELOG.md b/dhall-docs/CHANGELOG.md index cb1861926..15907c648 100644 --- a/dhall-docs/CHANGELOG.md +++ b/dhall-docs/CHANGELOG.md @@ -1,3 +1,7 @@ +1.0.6 + +* Build against `dhall-1.39.0` + 1.0.5 * [BUG FIX: Fix index generation](https://github.com/dhall-lang/dhall-haskell/pull/2150) diff --git a/dhall-docs/dhall-docs.cabal b/dhall-docs/dhall-docs.cabal index 0c52bc219..7fef5ec12 100644 --- a/dhall-docs/dhall-docs.cabal +++ b/dhall-docs/dhall-docs.cabal @@ -1,5 +1,5 @@ Name: dhall-docs -Version: 1.0.5 +Version: 1.0.6 Cabal-Version: >=1.10 Build-Type: Simple Tested-With: GHC == 8.6.1 @@ -67,7 +67,7 @@ Library containers , cryptonite < 0.30, directory >= 1.3.0.0 && < 1.4 , - dhall >= 1.38.0 && < 1.39, + dhall >= 1.38.0 && < 1.40, file-embed >= 0.0.10.0 , filepath >= 1.4 && < 1.5 , lens-family-core >= 1.0.0 && < 2.2 , diff --git a/dhall-json/CHANGELOG.md b/dhall-json/CHANGELOG.md index 4f4ffc575..0a91851e3 100644 --- a/dhall-json/CHANGELOG.md +++ b/dhall-json/CHANGELOG.md @@ -1,3 +1,7 @@ +1.7.7 + +* Build against `dhall-1.39.0` + 1.7.6 * [Fix `hashable`-related test failures](https://github.com/dhall-lang/dhall-haskell/pull/2152) diff --git a/dhall-json/dhall-json.cabal b/dhall-json/dhall-json.cabal index 257a2ca12..0b4ad0de3 100644 --- a/dhall-json/dhall-json.cabal +++ b/dhall-json/dhall-json.cabal @@ -1,5 +1,5 @@ Name: dhall-json -Version: 1.7.6 +Version: 1.7.7 Cabal-Version: >=1.10 Build-Type: Simple Tested-With: GHC == 8.4.3, GHC == 8.6.1 @@ -44,7 +44,7 @@ Library aeson-yaml >= 1.1.0 && < 1.2 , bytestring < 0.12, containers >= 0.5.9 && < 0.7 , - dhall >= 1.38.0 && < 1.39, + dhall >= 1.39.0 && < 1.40, exceptions >= 0.8.3 && < 0.11, filepath < 1.5 , lens-family-core >= 1.0.0 && < 2.2 , diff --git a/dhall-lsp-server/dhall-lsp-server.cabal b/dhall-lsp-server/dhall-lsp-server.cabal index bf4bb6e55..af1b8de78 100644 --- a/dhall-lsp-server/dhall-lsp-server.cabal +++ b/dhall-lsp-server/dhall-lsp-server.cabal @@ -1,5 +1,5 @@ name: dhall-lsp-server -Version: 1.0.14 +Version: 1.0.15 cabal-version: 1.12 synopsis: Language Server Protocol (LSP) server for Dhall homepage: https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-lsp-server#readme @@ -49,7 +49,7 @@ library , containers >= 0.5.11.0 && < 0.7 , data-default >= 0.7.1.1 && < 0.8 , directory >= 1.2.2.0 && < 1.4 - , dhall >= 1.38.0 && < 1.39 + , dhall >= 1.38.0 && < 1.40 , dhall-json >= 1.4 && < 1.8 , filepath >= 1.4.2 && < 1.5 , haskell-lsp >= 0.19.0.0 && < 0.25 diff --git a/dhall-nix/dhall-nix.cabal b/dhall-nix/dhall-nix.cabal index 8d5aebb81..13b34b483 100644 --- a/dhall-nix/dhall-nix.cabal +++ b/dhall-nix/dhall-nix.cabal @@ -1,5 +1,5 @@ Name: dhall-nix -Version: 1.1.20 +Version: 1.1.21 Cabal-Version: >=1.10 Build-Type: Simple Tested-With: GHC == 8.0.1 @@ -30,7 +30,7 @@ Library base >= 4.11.0.0 && < 5 , containers < 0.7 , data-fix < 0.4 , - dhall >= 1.38 && < 1.39, + dhall >= 1.39 && < 1.40, hnix >= 0.7 && < 0.14, lens-family-core >= 1.0.0 && < 2.2 , neat-interpolation < 0.6 , diff --git a/dhall-nixpkgs/dhall-nixpkgs.cabal b/dhall-nixpkgs/dhall-nixpkgs.cabal index c5c6cd1d9..d4dc7cde9 100644 --- a/dhall-nixpkgs/dhall-nixpkgs.cabal +++ b/dhall-nixpkgs/dhall-nixpkgs.cabal @@ -1,4 +1,4 @@ -Version: 1.0.4 +Version: 1.0.5 Cabal-Version: >=1.10 Name: dhall-nixpkgs Synopsis: Convert Dhall projects to Nix packages @@ -19,7 +19,7 @@ Executable dhall-to-nixpkgs Build-Depends: base >= 4.11 && < 5 , aeson >= 1.0.0.0 && < 1.6 , data-fix - , dhall >= 1.32.0 && < 1.39 + , dhall >= 1.32.0 && < 1.40 , foldl < 1.5 , hnix >= 0.10.1 && < 0.14 , lens-family-core >= 1.0.0 && < 2.2 diff --git a/dhall-openapi/dhall-openapi.cabal b/dhall-openapi/dhall-openapi.cabal index b84959c9a..eee9a6b2d 100644 --- a/dhall-openapi/dhall-openapi.cabal +++ b/dhall-openapi/dhall-openapi.cabal @@ -1,6 +1,6 @@ Cabal-Version: >=1.10 Name: dhall-openapi -Version: 1.0.0 +Version: 1.0.1 Homepage: https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-openapi#dhall-openapi Author: Fabrizio Ferrai Maintainer: Gabriel439@gmail.com @@ -78,7 +78,7 @@ Library base >= 4.11.0.0 && < 5 , aeson >= 1.0.0.0 && < 1.6 , containers >= 0.5.8.0 && < 0.7 , - dhall >= 1.38.0 && < 1.39 , + dhall >= 1.38.0 && < 1.40 , prettyprinter >= 1.7.0 && < 1.8 , scientific >= 0.3.0.0 && < 0.4 , sort >= 1.0 && < 1.1 , diff --git a/dhall-yaml/CHANGELOG.md b/dhall-yaml/CHANGELOG.md index 7aab25624..59922c35d 100644 --- a/dhall-yaml/CHANGELOG.md +++ b/dhall-yaml/CHANGELOG.md @@ -1,3 +1,7 @@ +1.2.7 + +* Build against `dhall-1.39.0` + 1.2.6 * [Allow bytestring-0.11](https://github.com/dhall-lang/dhall-haskell/pull/2144) diff --git a/dhall-yaml/dhall-yaml.cabal b/dhall-yaml/dhall-yaml.cabal index fc256c3a2..e1d19cf71 100644 --- a/dhall-yaml/dhall-yaml.cabal +++ b/dhall-yaml/dhall-yaml.cabal @@ -1,5 +1,5 @@ Name: dhall-yaml -Version: 1.2.6 +Version: 1.2.7 Cabal-Version: >=1.10 Build-Type: Simple Tested-With: GHC == 8.4.3, GHC == 8.6.1 @@ -37,7 +37,7 @@ Library base >= 4.11.0.0 && < 5 , aeson >= 1.0.0.0 && < 1.6 , bytestring < 0.12, - dhall >= 1.31.0 && < 1.39, + dhall >= 1.31.0 && < 1.40, dhall-json >= 1.6.0 && < 1.8 , optparse-applicative >= 0.14.0.0 && < 0.17, text >= 0.11.1.0 && < 1.3 , diff --git a/dhall/CHANGELOG.md b/dhall/CHANGELOG.md index 6e6bfc395..070744a26 100644 --- a/dhall/CHANGELOG.md +++ b/dhall/CHANGELOG.md @@ -1,3 +1,37 @@ +1.39.0 + +* [Supports version 20.2.0 of the standard](https://github.com/dhall-lang/dhall-lang/releases/tag/v20.2.0) + * [Add support for Unix shebangs](https://github.com/dhall-lang/dhall-haskell/pull/2175) +* [BREAKING CHANGE TO THE API: `dhall {format,freeze,lint}` now accept multiple + files](https://github.com/dhall-lang/dhall-haskell/pull/2169) + * The `--inplace` flag is no longer necessary and you can now specify + multiple files to update in place on the command line, like + `dhall format foo.dhall bar.dhall` + * The `--inplace` flag is still accepted, but does nothing, and will emit a + warning + * This is a breaking change to the API for formatting/freezing/linting files + because now you can specify multiple inputs instead of one input +* [BREAKING CHANGE: Pre-6.0.0 hashes are no longer supported](https://github.com/dhall-lang/dhall-haskell/pull/2190) + * The interpreter no longer provides backwards compatibility for integrity + checks computed before standard version 6.0.0 + * This is a breaking change to the API of the `Dhall.Binary` module, where + certain utilities are no longer parameterized on a `StandardVersion` + * This is also a breaking change to any Dhall code that depended on these + really old integrity checks +* [BUG FIX: Formatting `≡` now correctly preserves the original character set](https://github.com/dhall-lang/dhall-haskell/pull/2176) +* [BUG FIX: Don't panic on `Text/replace ""`](https://github.com/dhall-lang/dhall-haskell/pull/2184) +* [Quasiquotation support for Dhall](https://github.com/dhall-lang/dhall-haskell/pull/2198) + * You can now convert a Dhall expression to the corresponding syntax tree + using a quasiquoter like this: `[dhall| \x -> x + 2 ]` +* [New `Dhall.Marshal.{Encode,Decode}` modules](https://github.com/dhall-lang/dhall-haskell/pull/2193) + * These modules split up the `Dhall` module into two smaller modules for + encoding and decoding logic, respectively + * The `Dhall` module still re-exports the same functionality as before, so + this is not a breaking change +* [Support GHC 9.0.1](https://github.com/dhall-lang/dhall-haskell/pull/2154) +* Fixes and improvements to code formatting + * [Improve pretty-printing of `sha256`](https://github.com/dhall-lang/dhall-haskell/pull/2189) + 1.38.1 * [Add `INLINABLE` annotations in more places](https://github.com/dhall-lang/dhall-haskell/pull/2164) diff --git a/dhall/dhall-lang b/dhall/dhall-lang index 1e0bb483a..deefb8667 160000 --- a/dhall/dhall-lang +++ b/dhall/dhall-lang @@ -1 +1 @@ -Subproject commit 1e0bb483aaa2230c53e5d231a172053c4b964fa4 +Subproject commit deefb8667871af9ea10b42dbd86a49aa27b6ecff diff --git a/dhall/dhall.cabal b/dhall/dhall.cabal index 5a3275311..36c3562e4 100644 --- a/dhall/dhall.cabal +++ b/dhall/dhall.cabal @@ -1,5 +1,5 @@ Name: dhall -Version: 1.38.1 +Version: 1.39.0 Cabal-Version: 2.0 Build-Type: Simple Tested-With: GHC == 8.4.3, GHC == 8.6.1 diff --git a/dhall/src/Dhall/Parser/Expression.hs b/dhall/src/Dhall/Parser/Expression.hs index 6a18b18a2..0ecf8a784 100644 --- a/dhall/src/Dhall/Parser/Expression.hs +++ b/dhall/src/Dhall/Parser/Expression.hs @@ -113,7 +113,7 @@ parsers :: forall a. Parser a -> Parsers a parsers embedded = Parsers {..} where completeExpression_ = - optional shebang *> whitespace *> expression <* whitespace + many shebang *> whitespace *> expression <* whitespace shebang = do _ <- text "#!" diff --git a/dhall/tests/Dhall/Test/Import.hs b/dhall/tests/Dhall/Test/Import.hs index da010b0b5..7f92986ab 100644 --- a/dhall/tests/Dhall/Test/Import.hs +++ b/dhall/tests/Dhall/Test/Import.hs @@ -52,7 +52,16 @@ getTests = do return path ) - failureTests <- Test.Util.discover (Turtle.chars <> ".dhall") failureTest (Turtle.lstree (importDirectory "failure")) + failureTests <- Test.Util.discover (Turtle.chars <> ".dhall") failureTest (do + path <- Turtle.lstree (importDirectory "failure") + + let expectedSuccesses = + [ importDirectory "failure/unit/DontRecoverCycle.dhall" + , importDirectory "failure/unit/DontRecoverTypeError.dhall" + ] + + Monad.guard (path `notElem` expectedSuccesses) + return path ) let testTree = Tasty.testGroup "import tests" @@ -84,10 +93,6 @@ successTest path = do let originalCache = "dhall-lang/tests/import/cache" - let setCache = Turtle.export "XDG_CACHE_HOME" - - let unsetCache = Turtle.unset "XDG_CACHE_HOME" - let httpManager = HTTP.newManager HTTP.tlsManagerSettings @@ -99,24 +104,43 @@ successTest path = do let usesCache = [ "hashFromCacheA.dhall" , "unit/asLocation/HashA.dhall" - , "unit/IgnorePoisonedCacheA.dhall"] + , "unit/IgnorePoisonedCacheA.dhall" + , "unit/DontCacheIfHashA.dhall" + ] - let endsIn path' = not $ null $ Turtle.match (Turtle.ends path') path + let endsIn path' = + not (null (Turtle.match (Turtle.ends path') (Test.Util.toDhallPath path))) let buildNewCache = do - tempdir <- Turtle.mktempdir "/tmp" "dhall-cache" - Turtle.liftIO $ Turtle.cptree originalCache tempdir - return tempdir + tempdir <- Turtle.mktempdir "/tmp" "dhall-cache" + Turtle.liftIO (Turtle.cptree originalCache tempdir) + return tempdir let runTest = if any endsIn usesCache then Turtle.runManaged $ do cacheDir <- buildNewCache - setCache $ Turtle.format Turtle.fp cacheDir + + let set = do + m <- Turtle.need "XDG_CACHE_HOME" + + Turtle.export "XDG_CACHE_HOME" (Turtle.format Turtle.fp cacheDir) + + return m + + let reset Nothing = do + Turtle.unset "XDG_CACHE_HOME" + reset (Just x) = do + Turtle.export "XDG_CACHE_HOME" x + + _ <- Turtle.managed (Exception.bracket set reset) + _ <- Turtle.liftIO load - unsetCache + + return () else do _ <- load + return () let handler :: SomeException -> IO ()