diff --git a/cabal.config b/cabal.config index 2db74afe4b..8cc5621d60 100644 --- a/cabal.config +++ b/cabal.config @@ -1,200 +1,206 @@ constraints: - , Cabal ==3.6.3.0 - , Cabal-syntax ==3.6.0.0 + , Cabal ==3.8.1.0 + , Cabal-syntax ==3.8.1.0 , Glob ==0.10.2 - , OneTuple ==0.3.1 - , QuickCheck ==2.14.2 + , OneTuple ==0.4.1.1 + , QuickCheck ==2.14.3 , StateVar ==1.2.2 - , aeson ==2.0.3.0 + , Win32 ==2.12.0.1 + , aeson ==2.1.2.1 , annotated-wl-pprint ==0.7.0 - , ansi-terminal ==0.11.3 + , ansi-terminal ==0.11.5 + , ansi-terminal-types ==0.11.5 , ansi-wl-pprint ==0.6.9 , appar ==0.1.8 , array ==0.5.4.0 , asn1-encoding ==0.9.6 , asn1-parse ==0.9.5 , asn1-types ==0.3.4 - , assoc ==1.0.2 + , assoc ==1.1 , async ==2.2.4 , attoparsec ==0.14.4 - , attoparsec-iso8601 ==1.0.2.1 + , attoparsec-iso8601 ==1.1.0.0 , auto-update ==0.1.6 - , base ==4.16.3.0 + , base ==4.17.1.0 , base-compat ==0.12.2 , base-compat-batteries ==0.12.2 - , base-orphans ==0.8.7 + , base-orphans ==0.9.0 , base16-bytestring ==1.0.2.0 , base64-bytestring ==1.2.1.0 - , basement ==0.0.15 - , bifunctors ==5.5.12 - , binary ==0.8.9.0 + , basement ==0.0.16 + , bifunctors ==5.5.15 + , binary ==0.8.9.1 + , bitvec ==1.1.4.0 , blaze-builder ==0.4.2.2 , blaze-html ==0.9.1.2 , blaze-markup ==0.8.2.8 , byteorder ==1.0.4 - , bytestring ==0.11.3.1 + , bytestring ==0.11.4.0 , casa-client ==0.0.1 , casa-types ==0.0.2 , case-insensitive ==1.2.1.0 , cereal ==0.5.8.3 , clock ==0.8.3 - , cmdargs ==0.10.21 + , cmdargs ==0.10.22 , colour ==2.3.6 , comonad ==5.0.8 - , conduit ==1.3.4.2 + , conduit ==1.3.5 , conduit-combinators ==1.3.0 , conduit-extra ==1.3.6 , connection ==0.3.1 - , containers ==0.6.5.1 + , containers ==0.6.7 , contravariant ==1.5.5 - , cookie ==0.4.5 + , cookie ==0.4.6 , cryptohash-sha256 ==0.11.102.1 , cryptonite ==0.30 , cryptonite-conduit ==0.2.2 , data-default-class ==0.1.2.0 , data-fix ==0.3.2 - , deepseq ==1.4.6.1 - , digest ==0.0.1.3 - , directory ==1.3.6.2 + , deepseq ==1.4.8.0 + , digest ==0.0.1.7 + , directory ==1.3.7.1 , distributive ==0.6.2.1 , dlist ==1.0 - , easy-file ==0.2.2 + , easy-file ==0.2.5 , echo ==0.1.4 , ed25519 ==0.0.5.0 - , exceptions ==0.10.4 - , extra ==1.7.12 - , fast-logger ==3.1.1 + , exceptions ==0.10.5 + , extra ==1.7.13 + , fast-logger ==3.2.1 , file-embed ==0.0.15.0 - , filelock ==0.1.1.5 + , filelock ==0.1.1.6 , filepath ==1.4.2.2 + , foldable1-classes-compat ==0.1 , fsnotify ==0.4.1.0 - , generic-deriving ==1.14.2 - , ghc-bignum ==1.2 - , ghc-boot-th ==9.2.4 - , ghc-prim ==0.8.0 - , githash ==0.1.6.2 - , hackage-security ==0.6.2.2 - , hashable ==1.4.1.0 - , hi-file-parser ==0.1.3.0 - , hinotify ==0.4.1 + , generic-deriving ==1.14.4 + , generically ==0.1.1 + , ghc-bignum ==1.3 + , ghc-boot-th ==9.4.5 + , ghc-prim ==0.9.0 + , githash ==0.1.6.3 + , hackage-security ==0.6.2.3 + , hashable ==1.4.2.0 + , hi-file-parser ==0.1.4.0 + . hinotify ==0.4.1 , hourglass ==0.2.12 - , hpack ==0.35.0 + , hpack ==0.35.2 , hpc ==0.6.1.0 - , http-api-data ==0.4.3 + , http-api-data ==0.5 , http-client ==0.7.13.1 , http-client-tls ==0.3.6.1 - , http-conduit ==2.3.8 + , http-conduit ==2.3.8.1 , http-download ==0.2.0.0 , http-types ==0.12.3 - , indexed-traversable ==0.1.2 - , indexed-traversable-instances ==0.1.1.1 + , indexed-traversable ==0.1.2.1 + , indexed-traversable-instances ==0.1.1.2 , infer-license ==0.2.0 , integer-gmp ==1.1 , integer-logarithms ==1.0.3.1 , iproute ==1.7.12 , libyaml ==0.1.2 - , lift-type ==0.1.0.1 + , lift-type ==0.1.1.1 , lifted-base ==0.2.3.12 , lukko ==0.1.1.3 - , megaparsec ==9.2.2 - , memory ==0.17.0 - , microlens ==0.4.12.0 - , microlens-mtl ==0.2.0.2 - , microlens-th ==0.4.3.10 - , mime-types ==0.1.0.9 + , megaparsec ==9.3.1 + , memory ==0.18.0 + , microlens ==0.4.13.1 + , microlens-mtl ==0.2.0.3 + , microlens-th ==0.4.3.13 + , mime-types ==0.1.1.0 , mintty ==0.1.4 , monad-control ==1.0.3.1 - , monad-logger ==0.3.37 + , monad-logger ==0.3.40 , monad-loops ==0.4.3 , mono-traversable ==1.0.15.3 , mtl ==2.2.2 , mtl-compat ==0.2.2 - , mustache ==2.4.1 + , mustache ==2.4.2 , neat-interpolation ==0.5.1.3 - , network ==3.1.2.7 - , network-uri ==2.6.4.1 + , network ==3.1.4.0 + , network-uri ==2.6.4.2 , old-locale ==1.0.0.7 , old-time ==1.1.0.3 , open-browser ==0.2.1.0 - , optparse-applicative ==0.17.0.0 + , optparse-applicative ==0.17.1.0 , optparse-simple ==0.1.1.4 - , pantry ==0.7.0 - , parsec ==3.1.15.0 + , pantry ==0.8.2.2 + , parsec ==3.1.16.1 , parser-combinators ==1.3.0 , path ==0.9.2 - , path-io ==1.7.0 + , path-io ==1.8.1 , path-pieces ==0.2.1 , pem ==0.2.4 - , persistent ==2.13.3.5 - , persistent-sqlite ==2.13.1.0 + , persistent ==2.14.5.0 + , persistent-sqlite ==2.13.1.1 , persistent-template ==2.12.0.0 , pretty ==1.1.3.6 - , primitive ==0.7.3.0 - , process ==1.6.13.2 + , primitive ==0.8.0.0 + , process ==1.6.16.0 , project-template ==0.2.1.0 , random ==1.2.1.1 - , resource-pool ==0.2.3.2 + , resource-pool ==0.4.0.0 , resourcet ==1.2.6 - , retry ==0.9.3.0 + , retry ==0.9.3.1 , rio ==0.1.22.0 , rio-orphans ==0.1.2.0 - , rio-prettyprint ==0.1.1.0 + , rio-prettyprint ==0.1.4.0 , rts ==1.0.2 , safe ==0.3.19 , safe-exceptions ==0.1.7.3 , scientific ==0.3.7.0 - , semialign ==1.2.0.1 + , semialign ==1.3 , semigroupoids ==5.3.7 , semigroups ==0.20 , silently ==1.2.5.3 , socks ==0.6.1 , split ==0.2.3.5 , splitmix ==0.1.0.4 - , stack ==2.10.0 - , stm ==2.5.0.2 - , stm-chans ==3.0.0.6 - , streaming-commons ==0.2.2.4 - , strict ==0.4.0.1 - , syb ==0.7.2.1 - , tagged ==0.8.6.1 + , stack ==2.9.3.1 + , stm ==2.5.1.0 + , stm-chans ==3.0.0.9 + , streaming-commons ==0.2.2.6 + , strict ==0.5 + , syb ==0.7.2.3 + , tagged ==0.8.7 , tar ==0.5.1.1 , tar-conduit ==0.3.2 - , template-haskell ==2.18.0.0 + , template-haskell ==2.19.0.0 , temporary ==1.3 - , text ==1.2.5.0 + , text ==2.0.2 , text-metrics ==0.3.2 , text-short ==0.1.5 - , th-abstraction ==0.4.4.0 + , th-abstraction ==0.4.5.0 , th-compat ==0.1.4 - , th-expand-syns ==0.4.10.0 - , th-lift ==0.8.2 + , th-expand-syns ==0.4.11.0 + , th-lift ==0.8.3 , th-lift-instances ==0.1.20 , th-reify-many ==0.1.10 - , these ==1.1.1.1 - , time ==1.11.1.1 + , these ==1.2 + , time ==1.12.2 , time-compat ==1.9.6.1 - , tls ==1.5.8 + , tls ==1.6.0 , transformers ==0.5.6.2 , transformers-base ==0.4.6 , transformers-compat ==0.7.2 - , typed-process ==0.2.10.1 - , unicode-data ==0.3.0 + , typed-process ==0.2.11.0 + , unix ==2.7.3 + , unicode-data ==0.4.0.1 , unicode-transforms ==0.4.0.1 - , unix ==2.7.2.2 - , unix-compat ==0.5.4 - , unix-time ==0.4.7 - , unliftio ==0.2.22.0 - , unliftio-core ==0.2.0.1 + , unix-compat ==0.7 + , unix-time ==0.4.9 + , unliftio ==0.2.25.0 + , unliftio-core ==0.2.1.0 , unordered-containers ==0.2.19.1 , uuid-types ==1.0.5 , vault ==0.3.1.5 - , vector ==0.12.3.1 - , vector-algorithms ==0.8.0.4 + , vector ==0.13.0.0 + , vector-algorithms ==0.9.0.1 + , vector-stream ==0.1.0.0 , witherable ==0.4.2 , x509 ==1.7.7 , x509-store ==1.6.9 , x509-system ==1.6.7 , x509-validation ==1.6.12 - , yaml ==0.11.8.0 - , zip-archive ==0.4.2.1 + , yaml ==0.11.11.1 + , zip-archive ==0.4.3 , zlib ==0.6.3.0 diff --git a/cabal.project b/cabal.project index a3a1a0fe37..463f0d2e6f 100644 --- a/cabal.project +++ b/cabal.project @@ -12,6 +12,30 @@ -- The constraints in file `cabal.config` can be obtained by commanding: -- -- > stack ls dependencies cabal > cabal.config +-- +-- However, be aware that, in respect of the `unix` package or the `Win32` +-- package (that may come with GHC, depending on the operating system): +-- +-- * on Windows, the Stack project does not depend on `unix` but depends on +-- `Win32`; and +-- +-- * on non-Windows operating systems, the Stack project does not depend on +-- `Win32` but depends on `unix`. +-- +-- The command above will add one of the two packages to `cabal.config` but omit +-- the other. A comprehensive `cabal.config` will need to be created by editing +-- the command's output. +-- +-- Also be aware that there may be other packages required only on non-Windows +-- systems. For example, the `hinotify` package. +-- +-- Be sure to set `with-compiler: ghc-x.y.z` below to the version of GHC that is +-- specified by the snapshot specifed in Stack's project-level YAML +-- configuration file (`stack.yaml`). The relevant version of GHC can be +-- confirmed by reviewing the snapshot on Stackage. For example, at: +-- https://www.stackage.org/lts-20.23/cabal.config. +-- +with-compiler: ghc-9.4.5 import: cabal.config packages: . diff --git a/package.yaml b/package.yaml index 5ef569c37f..bdaa935810 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: stack -version: '2.9.3' +version: '2.9.3.1' synopsis: The Haskell Tool Stack description: | Please see the documentation at @@ -102,7 +102,7 @@ dependencies: # In order for Cabal (the tool) to build Stack, it needs to be told of the # upper bound on persistent. See # https://github.com/commercialhaskell/stack/pull/5677#issuecomment-1193318542 -- persistent >= 2.13.3.5 && < 2.14 +- persistent >= 2.13.3.5 && < 2.15 - persistent-sqlite - persistent-template - pretty diff --git a/src/Stack/Config.hs b/src/Stack/Config.hs index 11795d56b7..68cd393d40 100644 --- a/src/Stack/Config.hs +++ b/src/Stack/Config.hs @@ -7,6 +7,7 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE CPP #-} -- | The general Stack configuration that starts everything off. This should -- be smart to fallback if there is no stack.yaml, instead relying on @@ -89,7 +90,7 @@ import System.Console.ANSI import System.Environment import System.Info.ShortPathName ( getShortPathName ) import System.PosixCompat.Files ( fileOwner, getFileStatus ) -import System.PosixCompat.User ( getEffectiveUserID ) +import System.Posix.User ( getEffectiveUserID ) -- | If deprecated path exists, use it and print a warning. -- Otherwise, return the new path. diff --git a/src/Stack/Docker.hs b/src/Stack/Docker.hs index 6c2888a811..6d80b847f8 100644 --- a/src/Stack/Docker.hs +++ b/src/Stack/Docker.hs @@ -66,7 +66,7 @@ import System.IO.Unsafe ( unsafePerformIO ) import System.Posix.Signals import qualified System.Posix.User as PosixUser #endif -import qualified System.PosixCompat.User as User +import System.Posix.User as User import qualified System.PosixCompat.Files as Files import System.Terminal ( hIsTerminalDeviceOrMinTTY ) import Text.ParserCombinators.ReadP ( readP_to_S ) diff --git a/src/Stack/Storage/Util.hs b/src/Stack/Storage/Util.hs index 058f5fef32..d2741833cb 100644 --- a/src/Stack/Storage/Util.hs +++ b/src/Stack/Storage/Util.hs @@ -4,6 +4,7 @@ {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} +{-# LANGUAGE CPP #-} -- | Utils for the other Stack.Storage modules module Stack.Storage.Util @@ -26,6 +27,9 @@ updateSet :: , PersistEntity record , MonadIO m , PersistQueryWrite backend +#if MIN_VERSION_persistent(2,14,0) + , SafeToInsert record +#endif ) => (parentid -> value -> record) -> EntityField record parentid @@ -51,6 +55,9 @@ updateList :: , PersistEntity record , MonadIO m , PersistQueryWrite backend +#if MIN_VERSION_persistent(2,14,0) + , SafeToInsert record +#endif ) => (parentid -> Int -> value -> record) -> EntityField record parentid diff --git a/src/windows/System/Posix/User.hs b/src/windows/System/Posix/User.hs new file mode 100644 index 0000000000..7f1794bbbd --- /dev/null +++ b/src/windows/System/Posix/User.hs @@ -0,0 +1,49 @@ +-- | The module of this name differs as between Windows and non-Windows builds. +-- This is the Windows version. Non-Windows builds rely on the unix package, +-- which exposes a module of the same name. + +module System.Posix.User + ( getEffectiveUserID + , getEffectiveGroupID + , getGroups + , getUserEntryForName + , homeDirectory + , setGroupID + , setUserID + ) where + +import System.IO.Error ( illegalOperationErrorType, mkIOError ) +import System.PosixCompat.Types ( GroupID, UserID ) + +unsupported :: String -> IO a +unsupported f = ioError $ mkIOError illegalOperationErrorType x Nothing Nothing + where + x = "System.Posix.User." ++ f ++ ": not supported on Windows." + +getEffectiveUserID :: IO UserID +getEffectiveUserID = unsupported "getEffectiveUserID" + +getEffectiveGroupID :: IO GroupID +getEffectiveGroupID = unsupported "getEffectiveGroupID" + +getGroups :: IO [GroupID] +getGroups = return [] + +getUserEntryForName :: String -> IO UserEntry +getUserEntryForName _ = unsupported "getUserEntryForName" + +setGroupID :: GroupID -> IO () +setGroupID _ = return () + +setUserID :: UserID -> IO () +setUserID _ = return () + +data UserEntry = UserEntry + { userName :: String + , userPassword :: String + , userID :: UserID + , userGroupID :: GroupID + , userGecos :: String + , homeDirectory :: String + , userShell :: String + } deriving (Eq, Read, Show) diff --git a/stack.cabal b/stack.cabal index a3e884227e..672dc626a3 100644 --- a/stack.cabal +++ b/stack.cabal @@ -1,11 +1,11 @@ cabal-version: 2.0 --- This file has been generated from package.yaml by hpack version 0.35.1. +-- This file has been generated from package.yaml by hpack version 0.35.2. -- -- see: https://github.com/sol/hpack name: stack -version: 2.9.3 +version: 2.9.3.1 synopsis: The Haskell Tool Stack description: Please see the documentation at for usage information. @@ -101,6 +101,8 @@ extra-source-files: test/package-dump/ghc-head.txt src/test/Stack/Untar/test1.tar.gz src/test/Stack/Untar/test2.tar.gz + cabal.project + cabal.config source-repository head type: git @@ -316,7 +318,7 @@ library , pantry >=0.8.1 , path , path-io - , persistent >=2.13.3.5 && <2.14 + , persistent >=2.13.3.5 && <2.15 , persistent-sqlite , persistent-template , pretty @@ -365,6 +367,7 @@ library cpp-options: -DSTACK_DEVELOPER_MODE_DEFAULT=False if os(windows) other-modules: + System.Posix.User System.Uname hs-source-dirs: src/windows/ @@ -440,7 +443,7 @@ executable stack , pantry >=0.8.1 , path , path-io - , persistent >=2.13.3.5 && <2.14 + , persistent >=2.13.3.5 && <2.15 , persistent-sqlite , persistent-template , pretty @@ -565,7 +568,7 @@ executable stack-integration-test , pantry >=0.8.1 , path , path-io - , persistent >=2.13.3.5 && <2.14 + , persistent >=2.13.3.5 && <2.15 , persistent-sqlite , persistent-template , pretty @@ -695,7 +698,7 @@ test-suite stack-test , pantry >=0.8.1 , path , path-io - , persistent >=2.13.3.5 && <2.14 + , persistent >=2.13.3.5 && <2.15 , persistent-sqlite , persistent-template , pretty diff --git a/stack.yaml b/stack.yaml index b90b30f4ea..0b8ea89fa6 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,15 +1,9 @@ -# GHC 9.2.5 -resolver: lts-20.0 +# GHC 9.4.5 +resolver: lts-21.0 packages: - . -extra-deps: -- hpack-0.35.1@sha256:ef816234cbc7b52b0a6c55f7e904b6bc5292b8dd8f2d81ffcbcbc69ab80d75e5,4762 -- pantry-0.8.1@sha256:196111414d2489499fda6213deebcb865bc12285023d5af9bd273bf27cdb185d,4099 -- rio-prettyprint-0.1.4.0@sha256:1f8eb3ead0ef33d3736d53e1de5e9b2c91a0c207cdca23321bd74c401e85f23a,1301 -- fsnotify-0.4.1.0@sha256:44540beabea36aeeef930aa4d5f28091d431904bc9923b6ac4d358831c651235,2854 - drop-packages: # See https://github.com/commercialhaskell/stack/pull/4712 - cabal-install diff --git a/stack.yaml.lock b/stack.yaml.lock index e10cdbb5cf..ad1be6c8b0 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -3,38 +3,10 @@ # For more information, please see the documentation at: # https://docs.haskellstack.org/en/stable/lock_files -packages: -- completed: - hackage: hpack-0.35.1@sha256:ef816234cbc7b52b0a6c55f7e904b6bc5292b8dd8f2d81ffcbcbc69ab80d75e5,4762 - pantry-tree: - sha256: 514f0311eff442ab83ef3c2db456857f360ea173c17df133e575f50915e02da0 - size: 3675 - original: - hackage: hpack-0.35.1@sha256:ef816234cbc7b52b0a6c55f7e904b6bc5292b8dd8f2d81ffcbcbc69ab80d75e5,4762 -- completed: - hackage: pantry-0.8.1@sha256:196111414d2489499fda6213deebcb865bc12285023d5af9bd273bf27cdb185d,4099 - pantry-tree: - sha256: f7032e124bda7deb3b70b0fc308e9bbe9ba6c81f79b88a1cd0b5b7932f4ab14a - size: 2524 - original: - hackage: pantry-0.8.1@sha256:196111414d2489499fda6213deebcb865bc12285023d5af9bd273bf27cdb185d,4099 -- completed: - hackage: rio-prettyprint-0.1.4.0@sha256:1f8eb3ead0ef33d3736d53e1de5e9b2c91a0c207cdca23321bd74c401e85f23a,1301 - pantry-tree: - sha256: 05bb2585e2d93899c62e0b6e1da02d040286b4524d0d363be1c5d99e49ac95bd - size: 628 - original: - hackage: rio-prettyprint-0.1.4.0@sha256:1f8eb3ead0ef33d3736d53e1de5e9b2c91a0c207cdca23321bd74c401e85f23a,1301 -- completed: - hackage: fsnotify-0.4.1.0@sha256:44540beabea36aeeef930aa4d5f28091d431904bc9923b6ac4d358831c651235,2854 - pantry-tree: - sha256: f8e89e81fe0ca6e285036e04b165119ccfc59e7e668c1bfc28927f39062c5949 - size: 1280 - original: - hackage: fsnotify-0.4.1.0@sha256:44540beabea36aeeef930aa4d5f28091d431904bc9923b6ac4d358831c651235,2854 +packages: [] snapshots: - completed: - sha256: a2cbcd2f37010a64c4ef74c21fd7e55982a07b49840d2bed306f9bac9981a9c3 - size: 648420 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/0.yaml - original: lts-20.0 + sha256: 1867d84255dff8c87373f5dd03e5a5cb1c10a99587e26c8793e750c54e83ffdc + size: 639139 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/21/0.yaml + original: lts-21.0