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

Upgrade Nixpkgs to the latest nixpkgs-unstable #2573

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ in
# We can re-enable these once https://github.com/NixOS/nixpkgs/issues/133271
# is fixed and Nixpkgs is upgraded to a version that incorporates GHCJS

# inherit (shared_ghcjs) dhall-try;
# dhall-ghcjs = shared_ghcjs.dhall;
inherit (shared_ghcjs) dhall-try;
dhall-ghcjs = shared_ghcjs.dhall;
}
6 changes: 4 additions & 2 deletions dhall-csv/dhall-csv.cabal
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Cabal-Version: 2.4
Name: dhall-csv
Version: 1.0.4
Cabal-Version: >=1.10
Build-Type: Simple
License: BSD3
License: BSD-3-Clause
License-File: LICENSE
Copyright: 2021 Marcos Lerones
Author: Marcos Lerones
Expand All @@ -25,6 +25,8 @@ Category: Compiler
Extra-Source-Files:
CHANGELOG.md
README.md
tasty/data/**/*.dhall
tasty/data/**/*.csv
Source-Repository head
Type: git
Location: https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-csv
Expand Down
6 changes: 3 additions & 3 deletions dhall-lsp-server/dhall-lsp-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ library
, dhall >= 1.38.0 && < 1.43
, dhall-json >= 1.4 && < 1.8
, filepath >= 1.4.2 && < 1.6
, lsp >= 2.1.0.0 && < 2.2
, lsp >= 2.1.0.0 && < 2.4
, lens >= 4.16.1 && < 5.4
-- megaparsec follows SemVer: https://github.com/mrkkrp/megaparsec/issues/469#issuecomment-927918469
, megaparsec >= 7.0.2 && < 10
Expand Down Expand Up @@ -104,9 +104,9 @@ Test-Suite tests
GHC-Options: -Wall
Build-Depends:
base ,
lsp-types >= 2.0.1 && < 2.1 ,
lsp-types >= 2.0.1 && < 2.2 ,
hspec >= 2.7 && < 2.12 ,
lsp-test >= 0.15.0.0 && < 0.16 ,
lsp-test >= 0.15.0.0 && < 0.17 ,
tasty >= 0.11.2 && < 1.6 ,
tasty-hspec >= 1.1 && < 1.3 ,
text >= 0.11 && < 2.2
Expand Down
1 change: 0 additions & 1 deletion dhall-lsp-server/src/Dhall/LSP/Handlers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -653,11 +653,10 @@
respond (Right _default)

handler (severity_, _message) = do
let _type_ = case severity_ of

Check warning on line 656 in dhall-lsp-server/src/Dhall/LSP/Handlers.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest - stack.ghc-8.10.yaml

Pattern match(es) are non-exhaustive
Error -> MessageType_Error
Warning -> MessageType_Warning
Info -> MessageType_Info
Log -> MessageType_Log

liftLSP $ LSP.sendNotification SMethod_WindowShowMessage ShowMessageParams{..}
respond (Right _default)
7 changes: 5 additions & 2 deletions dhall-lsp-server/src/Dhall/LSP/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,15 @@

let defaultConfig = def

let onConfigurationChange _oldConfig json =
let configSection = "dhall-lsp-server"

Check warning on line 55 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / macOS-latest - stack.yaml

Defined but not used: ‘configSection’

Check warning on line 55 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / macOS-latest - stack.yaml

• Defaulting the type variable ‘a0’ to type ‘String’ in the following constraint

Check warning on line 55 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest - stack.ghc-9.4.yaml

Defined but not used: ‘configSection’

Check warning on line 55 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest - stack.ghc-9.4.yaml

• Defaulting the type variable ‘a0’ to type ‘String’ in the following constraint

Check warning on line 55 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest - stack.yaml

Defined but not used: ‘configSection’

Check warning on line 55 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest - stack.yaml

• Defaulting the type variable ‘a0’ to type ‘String’ in the following constraint

Check warning on line 55 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest - stack.ghc-9.2.yaml

Defined but not used: ‘configSection’

Check warning on line 55 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest - stack.ghc-9.2.yaml

• Defaulting the following constraint to type ‘String’

Check warning on line 55 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / windows-latest - stack.yaml

Defined but not used: `configSection'

Check warning on line 55 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / windows-latest - stack.yaml

* Defaulting the type variable `a0' to type `String' in the following constraint

Check warning on line 55 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest - stack.ghc-8.10.yaml

Defined but not used: ‘configSection’

Check warning on line 55 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest - stack.ghc-8.10.yaml

• Defaulting the following constraint to type ‘[Char]’

Check warning on line 55 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / macos-13 - stack.yaml

Defined but not used: ‘configSection’

Check warning on line 55 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / macos-13 - stack.yaml

• Defaulting the type variable ‘a0’ to type ‘String’ in the following constraint

let parseConfig _oldConfig json =

Check warning on line 57 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / macOS-latest - stack.yaml

Defined but not used: ‘parseConfig’

Check warning on line 57 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest - stack.ghc-9.4.yaml

Defined but not used: ‘parseConfig’

Check warning on line 57 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest - stack.yaml

Defined but not used: ‘parseConfig’

Check warning on line 57 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest - stack.ghc-9.2.yaml

Defined but not used: ‘parseConfig’

Check warning on line 57 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / windows-latest - stack.yaml

Defined but not used: `parseConfig'

Check warning on line 57 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest - stack.ghc-8.10.yaml

Defined but not used: ‘parseConfig’

Check warning on line 57 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / macos-13 - stack.yaml

Defined but not used: ‘parseConfig’
case fromJSON json of
Aeson.Success config -> Right config
Aeson.Error string -> Left (Text.pack string)

let onConfigChange _ = pure ()

Check warning on line 62 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / macOS-latest - stack.yaml

Defined but not used: ‘onConfigChange’

Check warning on line 62 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest - stack.ghc-9.4.yaml

Defined but not used: ‘onConfigChange’

Check warning on line 62 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest - stack.yaml

Defined but not used: ‘onConfigChange’

Check warning on line 62 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest - stack.ghc-9.2.yaml

Defined but not used: ‘onConfigChange’

Check warning on line 62 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / windows-latest - stack.yaml

Defined but not used: `onConfigChange'

Check warning on line 62 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest - stack.ghc-8.10.yaml

Defined but not used: ‘onConfigChange’

Check warning on line 62 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / macos-13 - stack.yaml

Defined but not used: ‘onConfigChange’

let doInitialize environment _request = do
return (Right environment)

Expand Down Expand Up @@ -110,11 +114,10 @@
liftIO (fail (Text.unpack _message))

Left (severity_, _message) -> do
let _type_ = case severity_ of

Check warning on line 117 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest - stack.ghc-8.10.yaml

Pattern match(es) are non-exhaustive
Error -> MessageType_Error
Warning -> MessageType_Warning
Info -> MessageType_Info
Log -> MessageType_Log

LSP.sendNotification SMethod_WindowShowMessage ShowMessageParams{..}
liftIO (fail (Text.unpack _message))
Expand All @@ -125,7 +128,7 @@

backward = liftIO

exitCode <- LSP.runServerWithHandles ioLogger lspLogger stdin stdout ServerDefinition{..}

Check warning on line 131 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / macOS-latest - stack.yaml

• Fields of ‘ServerDefinition’ not initialised:

Check warning on line 131 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest - stack.ghc-9.4.yaml

• Fields of ‘ServerDefinition’ not initialised:

Check warning on line 131 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest - stack.yaml

• Fields of ‘ServerDefinition’ not initialised:

Check warning on line 131 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest - stack.ghc-9.2.yaml

• Fields of ‘ServerDefinition’ not initialised:

Check warning on line 131 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / windows-latest - stack.yaml

* Fields of `ServerDefinition' not initialised:

Check warning on line 131 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest - stack.ghc-8.10.yaml

• Fields of ‘ServerDefinition’ not initialised: onConfigurationChange

Check warning on line 131 in dhall-lsp-server/src/Dhall/LSP/Server.hs

View workflow job for this annotation

GitHub Actions / macos-13 - stack.yaml

• Fields of ‘ServerDefinition’ not initialised:

case exitCode of
0 -> return ()
Expand Down
12 changes: 9 additions & 3 deletions dhall-lsp-server/tests/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ import Test.Tasty.Hspec
import Test.Hspec
#endif

import qualified Data.Text as T
import qualified Data.Text as T
import qualified GHC.IO.Encoding
import qualified System.Environment as Environment

baseDir :: FilePath -> FilePath
baseDir d = "tests/fixtures/" <> d
Expand Down Expand Up @@ -141,7 +142,9 @@ codeCompletionSpec fixtureDir =
docId <- openDoc "ImportedFunctions.dhall" "dhall"
cs <- getCompletions docId (Position {_line = 0, _character = 33})
liftIO $ do
let [ firstItem, secondItem ] = cs
(firstItem, secondItem) <- case cs of
[x, y] -> pure (x, y)
_ -> fail "Unexpected number of items"
_label firstItem `shouldBe` "`make user`"
_label secondItem `shouldBe` "makeUser"
_detail firstItem `shouldBe` Just "\8704(user : Text) \8594 { home : Text }"
Expand All @@ -152,7 +155,9 @@ codeCompletionSpec fixtureDir =
docId <- openDoc "Union.dhall" "dhall"
cs <- getCompletions docId (Position {_line = 2, _character = 10})
liftIO $ do
let [ firstItem, secondItem ] = cs
(firstItem, secondItem) <- case cs of
[x, y] -> pure (x, y)
_ -> fail "Unexpected number of items"
_label firstItem `shouldBe` "A"
_label secondItem `shouldBe` "`B C`"
_detail firstItem `shouldBe` Just "\8704(A : Text) \8594 < A : Text | `B C` >"
Expand Down Expand Up @@ -205,6 +210,7 @@ diagnosticsSpec fixtureDir = do
main :: IO ()
main = do
GHC.IO.Encoding.setLocaleEncoding GHC.IO.Encoding.utf8
Environment.setEnv "TASTY_NUM_THREADS" "1"
diagnostics <- testSpec "Diagnostics" (diagnosticsSpec (baseDir "diagnostics"))
linting <- testSpec "Linting" (lintingSpec (baseDir "linting"))
completion <- testSpec "Completion" (codeCompletionSpec (baseDir "completion"))
Expand Down
21 changes: 15 additions & 6 deletions dhall/ghcjs-src/Dhall/Import/HTTP.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,19 @@ import Control.Monad.IO.Class (MonadIO (..))
import Control.Monad.Trans.State.Strict (StateT)
import Data.ByteString (ByteString)
import Data.CaseInsensitive (CI)
import Dhall.Core (URL (..), Expr (..))
import Dhall.Import.Types (Import, Status)
import Dhall.Import.Types (Status)
import Dhall.Parser (Src)
import Dhall.URL (renderURL)

import Dhall.Core
( Import(..)
, ImportHashed(..)
, ImportMode(..)
, ImportType(..)
, URL (..)
, Expr (..)
)

import qualified Data.Text as Text
import qualified Data.Text.Encoding as Text.Encoding
import qualified JavaScript.XHR
Expand All @@ -40,13 +48,14 @@ fetchFromHttpUrl childURL Nothing = do
fetchFromHttpUrl _ _ =
fail "Dhall does not yet support custom headers when built using GHCJS"

fetchFromHTTPUrlBytes
fetchFromHttpUrlBytes
:: URL
-> Maybe [(CI ByteString, ByteString)]
-> StateT Status IO ByteString
fetchFromHTTPUrlBytes childUrl mheader = do
text <- fetchFromHTTPUrl childUrl mheader
fetchFromHttpUrlBytes childUrl mheader = do
text <- fetchFromHttpUrl childUrl mheader
return (Text.Encoding.encodeUtf8 text)

originHeadersFileExpr :: IO (Expr Src Import)
originHeadersFileExpr = return Missing
originHeadersFileExpr =
return (Embed (Import (ImportHashed Nothing Missing) Code))
1 change: 1 addition & 0 deletions dhall/src/Dhall/Syntax/Chunks.hs-boot
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE NoPolyKinds #-}
{-# LANGUAGE StandaloneKindSignatures #-}

module Dhall.Syntax.Chunks where
Expand Down
1 change: 1 addition & 0 deletions dhall/src/Dhall/Syntax/Types.hs-boot
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE NoPolyKinds #-}
{-# LANGUAGE StandaloneKindSignatures #-}

module Dhall.Syntax.Types where
Expand Down
11 changes: 0 additions & 11 deletions nix/packages/co-log-core.nix

This file was deleted.

19 changes: 0 additions & 19 deletions nix/packages/hashable.nix

This file was deleted.

52 changes: 0 additions & 52 deletions nix/packages/hnix.nix

This file was deleted.

27 changes: 0 additions & 27 deletions nix/packages/lsp-test.nix

This file was deleted.

31 changes: 0 additions & 31 deletions nix/packages/lsp-types.nix

This file was deleted.

28 changes: 0 additions & 28 deletions nix/packages/lsp.nix

This file was deleted.

22 changes: 0 additions & 22 deletions nix/packages/lucid.nix

This file was deleted.

Loading
Loading