From f534e422526e0e9fe268031c06f416985d62c14c Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 13 Mar 2014 07:59:58 +0200 Subject: [PATCH] Remove upper bounds and close #153 --- Stackage/Config.hs | 6 ---- Stackage/LoadDatabase.hs | 11 +++++- patching/patches/foldl-1.0.2.patch | 12 +++++++ patching/patches/threepenny-gui-0.4.1.0.patch | 35 +++++++++++++++++++ patching/patches/yesod-auth-oauth-1.2.0.patch | 12 +++++++ 5 files changed, 69 insertions(+), 7 deletions(-) create mode 100644 patching/patches/foldl-1.0.2.patch create mode 100644 patching/patches/threepenny-gui-0.4.1.0.patch create mode 100644 patching/patches/yesod-auth-oauth-1.2.0.patch diff --git a/Stackage/Config.hs b/Stackage/Config.hs index 9102c6be..0b60c2c5 100644 --- a/Stackage/Config.hs +++ b/Stackage/Config.hs @@ -323,9 +323,6 @@ defaultStablePackages ghcVer = unPackageMap $ execWriter $ do addRange "Michael Snoyman" "hxt" "< 9.3.1" addRange "Michael Snoyman" "network" "< 2.4" - -- https://github.com/fpco/stackage/issues/153 - addRange "Michael Snoyman" "text" "< 1.0" - -- https://github.com/fpco/stackage/issues/178 addRange "Michael Snoyman" "MonadCatchIO-transformers" "< 0.3.1" addRange "Michael Snoyman" "MonadCatchIO-mtl" "< 0.3.1" @@ -337,9 +334,6 @@ defaultStablePackages ghcVer = unPackageMap $ execWriter $ do addRange "Michael Snoyman" "hint" "< 0.4" addRange "Michael Snoyman" "ghc-mtl" "< 1.1" - -- Requires aeson 0.6.* - addRange "Michael Snoyman" "threepenny-gui" "< 0.4.1" - -- local patch addRange "Michael Snoyman" "bson" "== 0.2.3" diff --git a/Stackage/LoadDatabase.hs b/Stackage/LoadDatabase.hs index 913a9a33..95f30414 100644 --- a/Stackage/LoadDatabase.hs +++ b/Stackage/LoadDatabase.hs @@ -197,10 +197,19 @@ loadPackageDB settings coreMap core deps = do goBI f x = buildTools $ f $ condTreeData x depName (Dependency (PackageName pn) _) = Executable pn go gpd tree - = Map.unionsWith unionVersionRanges + = Map.filterWithKey (\k _ -> not $ ignoredDep k) + $ Map.unionsWith unionVersionRanges $ Map.fromList (map (\(Dependency pn vr) -> (pn, vr)) $ condTreeConstraints tree) : map (go gpd) (mapMaybe (checkCond gpd) $ condTreeComponents tree) + -- Some specific overrides for cases where getting Stackage to be smart + -- enough to handle things would be too difficult. + ignoredDep :: PackageName -> Bool + ignoredDep dep + -- The flag logic used by text-stream-decode confuses Stackage. + | dep == PackageName "text" && p == PackageName "text-stream-decode" = True + | otherwise = False + checkCond gpd (cond, tree, melse) | checkCond' cond = Just tree | otherwise = melse diff --git a/patching/patches/foldl-1.0.2.patch b/patching/patches/foldl-1.0.2.patch new file mode 100644 index 00000000..bc0f24b5 --- /dev/null +++ b/patching/patches/foldl-1.0.2.patch @@ -0,0 +1,12 @@ +diff -ru orig/foldl.cabal new/foldl.cabal +--- orig/foldl.cabal 2014-03-13 07:47:41.009928017 +0200 ++++ new/foldl.cabal 2014-03-13 07:47:40.000000000 +0200 +@@ -24,7 +24,7 @@ + base >= 4 && < 5 , + bytestring >= 0.9.2.1 && < 0.11, + primitive < 0.6 , +- text >= 0.11.2.0 && < 1.1 , ++ text >= 0.11.2.0 && < 1.2 , + vector >= 0.7 && < 0.11 + Exposed-Modules: + Control.Foldl, diff --git a/patching/patches/threepenny-gui-0.4.1.0.patch b/patching/patches/threepenny-gui-0.4.1.0.patch new file mode 100644 index 00000000..156a9379 --- /dev/null +++ b/patching/patches/threepenny-gui-0.4.1.0.patch @@ -0,0 +1,35 @@ +diff -ru orig/src/Graphics/UI/Threepenny/Internal/Types.hs new/src/Graphics/UI/Threepenny/Internal/Types.hs +--- orig/src/Graphics/UI/Threepenny/Internal/Types.hs 2014-03-13 07:47:41.597928004 +0200 ++++ new/src/Graphics/UI/Threepenny/Internal/Types.hs 2014-03-13 07:47:41.000000000 +0200 +@@ -17,6 +17,7 @@ + import Data.Map (Map) + import Data.String (fromString) + import Data.Time ++import Data.Text.Encoding (encodeUtf8, decodeUtf8) + + import Network.URI + import Data.Data +@@ -62,9 +63,9 @@ + + -- Marshalling ElementId + instance ToJSON ElementId where +- toJSON (ElementId o) = toJSON o ++ toJSON (ElementId o) = toJSON $ decodeUtf8 o + instance FromJSON ElementId where +- parseJSON (Object v) = ElementId <$> v .: "Element" ++ parseJSON (Object v) = (ElementId . encodeUtf8) <$> v .: "Element" + parseJSON _ = mzero + + +diff -ru orig/threepenny-gui.cabal new/threepenny-gui.cabal +--- orig/threepenny-gui.cabal 2014-03-13 07:47:41.605928005 +0200 ++++ new/threepenny-gui.cabal 2014-03-13 07:47:41.000000000 +0200 +@@ -92,7 +92,7 @@ + cpp-options: -DREBUG + ghc-options: -O2 + build-depends: base >= 4 && < 5 +- ,aeson == 0.6.* ++ ,aeson >= 0.6 + ,attoparsec-enumerator == 0.3.* + ,bytestring >= 0.9.2 && < 0.11 + ,containers >= 0.4.2 && < 0.6 diff --git a/patching/patches/yesod-auth-oauth-1.2.0.patch b/patching/patches/yesod-auth-oauth-1.2.0.patch new file mode 100644 index 00000000..8d99426c --- /dev/null +++ b/patching/patches/yesod-auth-oauth-1.2.0.patch @@ -0,0 +1,12 @@ +diff -ru orig/yesod-auth-oauth.cabal new/yesod-auth-oauth.cabal +--- orig/yesod-auth-oauth.cabal 2014-03-13 07:47:41.773928001 +0200 ++++ new/yesod-auth-oauth.cabal 2014-03-13 07:47:41.000000000 +0200 +@@ -24,7 +24,7 @@ + , bytestring >= 0.9.1.4 + , yesod-core >= 1.2 && < 1.3 + , yesod-auth >= 1.2 && < 1.3 +- , text >= 0.7 && < 0.12 ++ , text >= 0.7 && < 1.2 + , yesod-form >= 1.3 && < 1.4 + , transformers >= 0.2.2 && < 0.4 + , lifted-base >= 0.2 && < 0.3