Hello community, here is the log from the commit of package ghc-yesod-core for openSUSE:Factory checked in at 2017-05-10 20:50:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-yesod-core (Old) and /work/SRC/openSUSE:Factory/.ghc-yesod-core.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yesod-core" Wed May 10 20:50:12 2017 rev:12 rq:491529 version:1.4.33 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-yesod-core/ghc-yesod-core.changes 2017-04-11 09:44:04.182349137 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-yesod-core.new/ghc-yesod-core.changes 2017-05-10 20:50:13.829277587 +0200 @@ -1,0 +2,10 @@ +Wed Apr 19 13:32:11 UTC 2017 - psim...@suse.com + +- Update to version 1.4.33 revision 1 with cabal2obs. + +------------------------------------------------------------------- +Sun Apr 9 18:08:06 UTC 2017 - psim...@suse.com + +- Update to version 1.4.33 with cabal2obs. + +------------------------------------------------------------------- Old: ---- yesod-core-1.4.32.tar.gz New: ---- yesod-core-1.4.33.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-yesod-core.spec ++++++ --- /var/tmp/diff_new_pack.fcI0q9/_old 2017-05-10 20:50:16.176946310 +0200 +++ /var/tmp/diff_new_pack.fcI0q9/_new 2017-05-10 20:50:16.180945746 +0200 @@ -19,7 +19,7 @@ %global pkg_name yesod-core %bcond_with tests Name: ghc-%{pkg_name} -Version: 1.4.32 +Version: 1.4.33 Release: 0 Summary: Creation of type-safe, RESTful web applications License: MIT ++++++ yesod-core-1.4.32.tar.gz -> yesod-core-1.4.33.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.4.32/ChangeLog.md new/yesod-core-1.4.33/ChangeLog.md --- old/yesod-core-1.4.32/ChangeLog.md 2017-03-01 07:53:06.000000000 +0100 +++ new/yesod-core-1.4.33/ChangeLog.md 2017-03-26 17:14:25.000000000 +0200 @@ -1,3 +1,7 @@ +## 1.4.33 + +* Adds curly brackets to route parser. [#1363](https://github.com/yesodweb/yesod/pull/1363) + ## 1.4.32 * Fix warnings diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.4.32/Yesod/Routes/Parse.hs new/yesod-core-1.4.33/Yesod/Routes/Parse.hs --- old/yesod-core-1.4.32/Yesod/Routes/Parse.hs 2017-02-07 16:18:21.000000000 +0100 +++ new/yesod-core-1.4.33/Yesod/Routes/Parse.hs 2017-03-26 17:13:58.000000000 +0200 @@ -13,7 +13,7 @@ ) where import Language.Haskell.TH.Syntax -import Data.Char (isUpper) +import Data.Char (isUpper, isSpace) import Language.Haskell.TH.Quote import qualified System.IO as SIO import Yesod.Routes.TH @@ -86,7 +86,7 @@ spaces = takeWhile (== ' ') thisLine (others, remainder) = parse indent otherLines' (this, otherLines') = - case takeWhile (not . isPrefixOf "--") $ words thisLine of + case takeWhile (not . isPrefixOf "--") $ splitSpaces thisLine of (pattern:rest0) | Just (constr:rest) <- stripColonLast rest0 , Just attrs <- mapM parseAttr rest -> @@ -102,6 +102,26 @@ [] -> (id, otherLines) _ -> error $ "Invalid resource line: " ++ thisLine +-- | Splits a string by spaces, as long as the spaces are not enclosed by curly brackets (not recursive). +splitSpaces :: String -> [String] +splitSpaces "" = [] +splitSpaces str = + let (rest, piece) = parse $ dropWhile isSpace str in + piece:(splitSpaces rest) + + where + parse :: String -> ( String, String) + parse ('{':s) = fmap ('{':) $ parseBracket s + parse (c:s) | isSpace c = (s, []) + parse (c:s) = fmap (c:) $ parse s + parse "" = ("", "") + + parseBracket :: String -> ( String, String) + parseBracket ('{':_) = error $ "Invalid resource line (nested curly bracket): " ++ str + parseBracket ('}':s) = fmap ('}':) $ parse s + parseBracket (c:s) = fmap (c:) $ parseBracket s + parseBracket "" = error $ "Invalid resource line (unclosed curly bracket): " ++ str + piecesFromStringCheck :: String -> ([Piece String], Maybe String, Bool) piecesFromStringCheck s0 = (pieces, mmulti, check) @@ -181,7 +201,7 @@ parseTypeTree orig = toTypeTree pieces where - pieces = filter (not . null) $ splitOn '-' $ addDashes orig + pieces = filter (not . null) $ splitOn (\c -> c == '-' || c == ' ') $ addDashes orig addDashes [] = [] addDashes (x:xs) = front $ addDashes xs @@ -194,7 +214,7 @@ _:y -> x : splitOn c y [] -> [x] where - (x, y') = break (== c) s + (x, y') = break c s data TypeTree = TTTerm String | TTApp TypeTree TypeTree @@ -237,9 +257,9 @@ ttToType (TTList t) = ListT `AppT` ttToType t pieceFromString :: String -> Either (CheckOverlap, String) (CheckOverlap, Piece String) -pieceFromString ('#':'!':x) = Right $ (False, Dynamic x) -pieceFromString ('!':'#':x) = Right $ (False, Dynamic x) -- https://github.com/yesodweb/yesod/issues/652 -pieceFromString ('#':x) = Right $ (True, Dynamic x) +pieceFromString ('#':'!':x) = Right $ (False, dynamicPieceFromString x) +pieceFromString ('!':'#':x) = Right $ (False, dynamicPieceFromString x) -- https://github.com/yesodweb/yesod/issues/652 +pieceFromString ('#':x) = Right $ (True, dynamicPieceFromString x) pieceFromString ('*':'!':x) = Left (False, x) pieceFromString ('+':'!':x) = Left (False, x) @@ -252,3 +272,10 @@ pieceFromString ('!':x) = Right $ (False, Static x) pieceFromString x = Right $ (True, Static x) + +dynamicPieceFromString :: String -> Piece String +dynamicPieceFromString str@('{':x) = case break (== '}') x of + (s, "}") -> Dynamic s + _ -> error $ "Invalid path piece: " ++ str +dynamicPieceFromString x = Dynamic x +-- JP: Should we check if there are curly brackets or other invalid characters? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.4.32/test/RouteSpec.hs new/yesod-core-1.4.33/test/RouteSpec.hs --- old/yesod-core-1.4.32/test/RouteSpec.hs 2017-02-05 13:38:01.000000000 +0100 +++ new/yesod-core-1.4.33/test/RouteSpec.hs 2017-03-26 17:13:58.000000000 +0200 @@ -322,7 +322,7 @@ it "hierarchy" $ do routeAttrs (ParentR (pack "ignored") ChildR) @?= Set.singleton (pack "child") hierarchy - describe "parseRouteTyoe" $ do + describe "parseRouteType" $ do let success s t = it s $ parseTypeTree s @?= Just t failure s = it s $ parseTypeTree s @?= Nothing success "Int" $ TTTerm "Int" @@ -334,6 +334,8 @@ success "[Int]" $ TTList $ TTTerm "Int" success "Foo-Bar" $ TTApp (TTTerm "Foo") (TTTerm "Bar") success "Foo-Bar-Baz" $ TTApp (TTTerm "Foo") (TTTerm "Bar") `TTApp` TTTerm "Baz" + success "Foo Bar" $ TTApp (TTTerm "Foo") (TTTerm "Bar") + success "Foo Bar Baz" $ TTApp (TTTerm "Foo") (TTTerm "Bar") `TTApp` TTTerm "Baz" getRootR :: Text getRootR = pack "this is the root" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.4.32/test/YesodCoreTest/Links.hs new/yesod-core-1.4.33/test/YesodCoreTest/Links.hs --- old/yesod-core-1.4.32/test/YesodCoreTest/Links.hs 2017-02-05 13:38:01.000000000 +0100 +++ new/yesod-core-1.4.33/test/YesodCoreTest/Links.hs 2017-03-26 17:13:58.000000000 +0200 @@ -25,6 +25,7 @@ /route-test-2/*Vector-String RT2 GET /route-test-3/*Vector-(Maybe-Int) RT3 GET /route-test-4/#(Foo-Int-Int) RT4 GET +/route-test-4-spaces/#{Foo Int Int} RT4Spaces GET |] data Vector a = Vector @@ -64,6 +65,9 @@ getRT4 :: Foo Int Int -> Handler () getRT4 _ = return () +getRT4Spaces :: Foo Int Int -> Handler () +getRT4Spaces _ = return () + linksTest :: Spec linksTest = describe "Test.Links" $ do it "linkToHome" case_linkToHome diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.4.32/yesod-core.cabal new/yesod-core-1.4.33/yesod-core.cabal --- old/yesod-core-1.4.32/yesod-core.cabal 2017-02-08 10:14:31.000000000 +0100 +++ new/yesod-core-1.4.33/yesod-core.cabal 2017-03-26 17:14:30.000000000 +0200 @@ -1,5 +1,5 @@ name: yesod-core -version: 1.4.32 +version: 1.4.33 license: MIT license-file: LICENSE author: Michael Snoyman <mich...@snoyman.com> ++++++ yesod-core.cabal ++++++ --- /var/tmp/diff_new_pack.fcI0q9/_old 2017-05-10 20:50:16.344922607 +0200 +++ /var/tmp/diff_new_pack.fcI0q9/_new 2017-05-10 20:50:16.344922607 +0200 @@ -1,227 +1,227 @@ -name: yesod-core -version: 1.4.32 -x-revision: 1 -license: MIT -license-file: LICENSE -author: Michael Snoyman <mich...@snoyman.com> -maintainer: Michael Snoyman <mich...@snoyman.com> -synopsis: Creation of type-safe, RESTful web applications. -description: API docs and the README are available at <http://www.stackage.org/package/yesod-core> -category: Web, Yesod -stability: Stable -cabal-version: >= 1.8 -build-type: Simple -homepage: http://www.yesodweb.com/ -extra-source-files: - test/YesodCoreTest.hs - test/YesodCoreTest/*.hs - test/YesodCoreTest/JsLoaderSites/Bottom.hs - test/en.msg - test/test.hs - ChangeLog.md - README.md - -library - build-depends: base >= 4.7 && < 5 - , time >= 1.1.4 - , wai >= 3.0 - , wai-extra >= 3.0.7 - , bytestring >= 0.10 - , text >= 0.7 - , template-haskell - , path-pieces >= 0.1.2 && < 0.3 - , shakespeare >= 2.0 - , blaze-builder >= 0.2.1.4 && < 0.5 - , transformers >= 0.2.2 - , mtl - , clientsession >= 0.9.1 && < 0.10 - , random >= 1.0.0.2 && < 1.2 - , cereal >= 0.3 - , old-locale >= 1.0.0.2 && < 1.1 - , containers >= 0.2 - , unordered-containers >= 0.2 - , monad-control >= 0.3 && < 1.1 - , transformers-base >= 0.4 - , cookie >= 0.4.2 && < 0.5 - , http-types >= 0.7 - , case-insensitive >= 0.2 - , parsec >= 2 && < 3.2 - , directory >= 1 - , vector >= 0.9 && < 0.13 - , aeson >= 0.5 - , fast-logger >= 2.2 - , wai-logger >= 0.2 - , monad-logger >= 0.3.1 && < 0.4 - , conduit >= 1.2 - , resourcet >= 0.4.9 && < 1.2 - , lifted-base >= 0.1.2 - , blaze-html >= 0.5 - , blaze-markup >= 0.7.1 - , data-default - , safe - , warp >= 3.0.2 - , unix-compat - , conduit-extra - , exceptions >= 0.6 - , deepseq >= 1.3 - , deepseq-generics - , mwc-random - , primitive - , word8 - , auto-update - , semigroups - , byteable - - exposed-modules: Yesod.Core - Yesod.Core.Content - Yesod.Core.Dispatch - Yesod.Core.Handler - Yesod.Core.Json - Yesod.Core.Widget - Yesod.Core.Internal - Yesod.Core.Types - Yesod.Core.Unsafe - Yesod.Routes.TH.Types - other-modules: Yesod.Core.Internal.Session - Yesod.Core.Internal.Request - Yesod.Core.Class.Handler - Yesod.Core.Internal.Util - Yesod.Core.Internal.Response - Yesod.Core.Internal.Run - Yesod.Core.Internal.TH - Yesod.Core.Internal.LiteApp - Yesod.Core.Class.Yesod - Yesod.Core.Class.Dispatch - Yesod.Core.Class.Breadcrumbs - Yesod.Core.TypeCache - Paths_yesod_core - - Yesod.Routes.TH - Yesod.Routes.Class - Yesod.Routes.Parse - Yesod.Routes.Overlap - Yesod.Routes.TH.Dispatch - Yesod.Routes.TH.RenderRoute - Yesod.Routes.TH.ParseRoute - Yesod.Routes.TH.RouteAttrs - - ghc-options: -Wall - -- Following line added due to: https://github.com/yesodweb/yesod/issues/545 - -- This looks like a GHC bug - extensions: MultiParamTypeClasses - - -- Workaround for: http://ghc.haskell.org/trac/ghc/ticket/8443 - extensions: TemplateHaskell - -test-suite test-routes - type: exitcode-stdio-1.0 - main-is: RouteSpec.hs - hs-source-dirs: test, . - - other-modules: Hierarchy - Yesod.Routes.Class - Yesod.Routes.Overlap - Yesod.Routes.Parse - Yesod.Routes.TH - Yesod.Routes.TH.Dispatch - Yesod.Routes.TH.ParseRoute - Yesod.Routes.TH.RenderRoute - Yesod.Routes.TH.RouteAttrs - Yesod.Routes.TH.Types - - -- Workaround for: http://ghc.haskell.org/trac/ghc/ticket/8443 - extensions: TemplateHaskell - - build-depends: base - , hspec - , containers - , bytestring - , template-haskell - , text - , random - , path-pieces - , HUnit - -test-suite tests - type: exitcode-stdio-1.0 - main-is: test.hs - hs-source-dirs: test - - other-modules: YesodCoreTest - YesodCoreTest.Auth - YesodCoreTest.Cache - YesodCoreTest.CleanPath - YesodCoreTest.Csrf - YesodCoreTest.ErrorHandling - YesodCoreTest.Exceptions - YesodCoreTest.InternalRequest - YesodCoreTest.JsLoader - YesodCoreTest.JsLoaderSites.Bottom - YesodCoreTest.Json - YesodCoreTest.Links - YesodCoreTest.LiteApp - YesodCoreTest.Media - YesodCoreTest.MediaData - YesodCoreTest.NoOverloadedStrings - YesodCoreTest.NoOverloadedStringsSub - YesodCoreTest.RawResponse - YesodCoreTest.Redirect - YesodCoreTest.Reps - YesodCoreTest.RequestBodySize - YesodCoreTest.Ssl - YesodCoreTest.Streaming - YesodCoreTest.StubLaxSameSite - YesodCoreTest.StubSslOnly - YesodCoreTest.StubStrictSameSite - YesodCoreTest.StubUnsecured - YesodCoreTest.WaiSubsite - YesodCoreTest.Widget - YesodCoreTest.YesodTest - - cpp-options: -DTEST - build-depends: base - ,hspec >= 1.3 - ,hspec-expectations - ,clientsession - ,wai >= 3.0 - ,yesod-core - ,bytestring - ,text - ,http-types - , random - , blaze-builder - ,HUnit - ,QuickCheck >= 2 && < 3 - ,transformers - , conduit - , containers - , lifted-base - , resourcet - , network - , async - , conduit-extra - , shakespeare - , streaming-commons - , wai-extra - , mwc-random - , cookie >= 0.4.1 && < 0.5 - ghc-options: -Wall - extensions: TemplateHaskell - -benchmark widgets - type: exitcode-stdio-1.0 - hs-source-dirs: bench - build-depends: base - , criterion - , bytestring - , text - , transformers - , yesod-core - , blaze-html - , shakespeare - main-is: widget.hs - ghc-options: -Wall -O2 - -source-repository head - type: git - location: https://github.com/yesodweb/yesod +name: yesod-core +version: 1.4.33 +x-revision: 1 +license: MIT +license-file: LICENSE +author: Michael Snoyman <mich...@snoyman.com> +maintainer: Michael Snoyman <mich...@snoyman.com> +synopsis: Creation of type-safe, RESTful web applications. +description: API docs and the README are available at <http://www.stackage.org/package/yesod-core> +category: Web, Yesod +stability: Stable +cabal-version: >= 1.8 +build-type: Simple +homepage: http://www.yesodweb.com/ +extra-source-files: + test/YesodCoreTest.hs + test/YesodCoreTest/*.hs + test/YesodCoreTest/JsLoaderSites/Bottom.hs + test/en.msg + test/test.hs + ChangeLog.md + README.md + +library + build-depends: base >= 4.7 && < 5 + , time >= 1.1.4 + , wai >= 3.0 + , wai-extra >= 3.0.7 + , bytestring >= 0.10 + , text >= 0.7 + , template-haskell + , path-pieces >= 0.1.2 && < 0.3 + , shakespeare >= 2.0 + , blaze-builder >= 0.2.1.4 && < 0.5 + , transformers >= 0.2.2 + , mtl + , clientsession >= 0.9.1 && < 0.10 + , random >= 1.0.0.2 && < 1.2 + , cereal >= 0.3 + , old-locale >= 1.0.0.2 && < 1.1 + , containers >= 0.2 + , unordered-containers >= 0.2 + , monad-control >= 0.3 && < 1.1 + , transformers-base >= 0.4 + , cookie >= 0.4.2 && < 0.5 + , http-types >= 0.7 + , case-insensitive >= 0.2 + , parsec >= 2 && < 3.2 + , directory >= 1 + , vector >= 0.9 && < 0.13 + , aeson >= 0.5 + , fast-logger >= 2.2 + , wai-logger >= 0.2 + , monad-logger >= 0.3.1 && < 0.4 + , conduit >= 1.2 + , resourcet >= 0.4.9 && < 1.2 + , lifted-base >= 0.1.2 + , blaze-html >= 0.5 + , blaze-markup >= 0.7.1 + , data-default + , safe + , warp >= 3.0.2 + , unix-compat + , conduit-extra + , exceptions >= 0.6 + , deepseq >= 1.3 + , deepseq-generics + , mwc-random + , primitive + , word8 + , auto-update + , semigroups + , byteable + + exposed-modules: Yesod.Core + Yesod.Core.Content + Yesod.Core.Dispatch + Yesod.Core.Handler + Yesod.Core.Json + Yesod.Core.Widget + Yesod.Core.Internal + Yesod.Core.Types + Yesod.Core.Unsafe + Yesod.Routes.TH.Types + other-modules: Yesod.Core.Internal.Session + Yesod.Core.Internal.Request + Yesod.Core.Class.Handler + Yesod.Core.Internal.Util + Yesod.Core.Internal.Response + Yesod.Core.Internal.Run + Yesod.Core.Internal.TH + Yesod.Core.Internal.LiteApp + Yesod.Core.Class.Yesod + Yesod.Core.Class.Dispatch + Yesod.Core.Class.Breadcrumbs + Yesod.Core.TypeCache + Paths_yesod_core + + Yesod.Routes.TH + Yesod.Routes.Class + Yesod.Routes.Parse + Yesod.Routes.Overlap + Yesod.Routes.TH.Dispatch + Yesod.Routes.TH.RenderRoute + Yesod.Routes.TH.ParseRoute + Yesod.Routes.TH.RouteAttrs + + ghc-options: -Wall + -- Following line added due to: https://github.com/yesodweb/yesod/issues/545 + -- This looks like a GHC bug + extensions: MultiParamTypeClasses + + -- Workaround for: http://ghc.haskell.org/trac/ghc/ticket/8443 + extensions: TemplateHaskell + +test-suite test-routes + type: exitcode-stdio-1.0 + main-is: RouteSpec.hs + hs-source-dirs: test, . + + other-modules: Hierarchy + Yesod.Routes.Class + Yesod.Routes.Overlap + Yesod.Routes.Parse + Yesod.Routes.TH + Yesod.Routes.TH.Dispatch + Yesod.Routes.TH.ParseRoute + Yesod.Routes.TH.RenderRoute + Yesod.Routes.TH.RouteAttrs + Yesod.Routes.TH.Types + + -- Workaround for: http://ghc.haskell.org/trac/ghc/ticket/8443 + extensions: TemplateHaskell + + build-depends: base + , hspec + , containers + , bytestring + , template-haskell + , text + , random + , path-pieces + , HUnit + +test-suite tests + type: exitcode-stdio-1.0 + main-is: test.hs + hs-source-dirs: test + + other-modules: YesodCoreTest + YesodCoreTest.Auth + YesodCoreTest.Cache + YesodCoreTest.CleanPath + YesodCoreTest.Csrf + YesodCoreTest.ErrorHandling + YesodCoreTest.Exceptions + YesodCoreTest.InternalRequest + YesodCoreTest.JsLoader + YesodCoreTest.JsLoaderSites.Bottom + YesodCoreTest.Json + YesodCoreTest.Links + YesodCoreTest.LiteApp + YesodCoreTest.Media + YesodCoreTest.MediaData + YesodCoreTest.NoOverloadedStrings + YesodCoreTest.NoOverloadedStringsSub + YesodCoreTest.RawResponse + YesodCoreTest.Redirect + YesodCoreTest.Reps + YesodCoreTest.RequestBodySize + YesodCoreTest.Ssl + YesodCoreTest.Streaming + YesodCoreTest.StubLaxSameSite + YesodCoreTest.StubSslOnly + YesodCoreTest.StubStrictSameSite + YesodCoreTest.StubUnsecured + YesodCoreTest.WaiSubsite + YesodCoreTest.Widget + YesodCoreTest.YesodTest + + cpp-options: -DTEST + build-depends: base + ,hspec >= 1.3 + ,hspec-expectations + ,clientsession + ,wai >= 3.0 + ,yesod-core + ,bytestring + ,text + ,http-types + , random + , blaze-builder + ,HUnit + ,QuickCheck >= 2 && < 3 + ,transformers + , conduit + , containers + , lifted-base + , resourcet + , network + , async + , conduit-extra + , shakespeare + , streaming-commons + , wai-extra + , mwc-random + , cookie >= 0.4.1 && < 0.5 + ghc-options: -Wall + extensions: TemplateHaskell + +benchmark widgets + type: exitcode-stdio-1.0 + hs-source-dirs: bench + build-depends: base + , criterion + , bytestring + , text + , transformers + , yesod-core + , blaze-html + , shakespeare + main-is: widget.hs + ghc-options: -Wall -O2 + +source-repository head + type: git + location: https://github.com/yesodweb/yesod