haskell / lsp

Haskell library for the Microsoft Language Server Protocol
364 stars 91 forks source link

Use uuid-types instead of uuid #466

Closed phadej closed 1 year ago

phadej commented 1 year ago

uuid is a bigger "batteries" included package, which re-exports stuff from uuid-types.

With a small patch:

diff --git a/lsp/lsp.cabal b/lsp/lsp.cabal
index c06855e..da3bb1a 100644
--- a/lsp/lsp.cabal
+++ b/lsp/lsp.cabal
@@ -58,7 +58,7 @@ library
                      , unliftio-core >= 0.2.0.0
                      -- used for generating random uuids for dynamic registration
                      , random
-                     , uuid >= 1.3
+                     , uuid-types >= 1.0.5
   hs-source-dirs:      src
   default-language:    Haskell2010
   ghc-options: -Wall -fprint-explicit-kinds
diff --git a/lsp/src/Language/LSP/Server/Core.hs b/lsp/src/Language/LSP/Server/Core.hs
index 82e1973..191eb59 100644
--- a/lsp/src/Language/LSP/Server/Core.hs
+++ b/lsp/src/Language/LSP/Server/Core.hs
@@ -45,7 +45,7 @@ import           Data.Monoid (Ap(..))
 import           Data.Ord (Down (Down))
 import qualified Data.Text as T
 import           Data.Text ( Text )
-import qualified Data.UUID as UUID
+import qualified Data.UUID.Types as UUID
 import qualified Language.LSP.Types.Capabilities    as J
 import Language.LSP.Types as J
 import           Language.LSP.Types.SMethodMap (SMethodMap)

You'll remove

-Cabal-2.4.0.1 lib
-cryptohash-md5-0.11.101.0 lib
-cryptohash-sha1-0.11.101.0 lib
-entropy-0.4.1.10
-entropy-0.4.1.10 lib
-entropy-0.4.1.10 setup
-network-info-0.2.1 lib
-uuid-1.3.15 lib

from install plan. (Cabal is there because it's a build-type: Custom dependency of entropy).