From 757514c536afc5d9dedd984375ebe1c2a22b8c53 Mon Sep 17 00:00:00 2001 From: mingyu guo Date: Tue, 28 Mar 2017 20:40:05 +1030 Subject: [PATCH 01/32] Completed chineseMessage in Yesod.Auth.Message. Previously, most of the messages are using simplified characters, but the google translated parts are using traditional characters. I have fixed this as well. --- yesod-auth/Yesod/Auth/Message.hs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/yesod-auth/Yesod/Auth/Message.hs b/yesod-auth/Yesod/Auth/Message.hs index a2020550..271f83f7 100644 --- a/yesod-auth/Yesod/Auth/Message.hs +++ b/yesod-auth/Yesod/Auth/Message.hs @@ -511,9 +511,9 @@ chineseMessage LoginOpenID = "用OpenID登录" chineseMessage LoginGoogle = "用Google帐户登录" chineseMessage LoginYahoo = "用Yahoo帐户登录" chineseMessage Email = "邮箱" -chineseMessage UserName = "用户名" -- FIXME by Google Translate "user name" +chineseMessage UserName = "用户名" chineseMessage Password = "密码" -chineseMessage CurrentPassword = "Current password" +chineseMessage CurrentPassword = "当前密码" chineseMessage Register = "注册" chineseMessage RegisterLong = "注册新帐户" chineseMessage EnterEmail = "输入你的邮箱地址,你将收到一封确认邮件。" @@ -547,11 +547,10 @@ chineseMessage ProvideIdentifier = "邮箱或用户名" chineseMessage SendPasswordResetEmail = "发送密码重置邮件" chineseMessage PasswordResetPrompt = "输入你的邮箱地址或用户名,你将收到一封密码重置邮件。" chineseMessage InvalidUsernamePass = "无效的用户名/密码组合" --- TODO -chineseMessage i@(IdentifierNotFound _) = englishMessage i -chineseMessage Logout = "註銷" -- FIXME by Google Translate -chineseMessage LogoutTitle = "註銷" -- FIXME by Google Translate -chineseMessage AuthError = "验证错误" -- FIXME by Google Translate +chineseMessage (IdentifierNotFound ident) = "邮箱/用户名不存在: " `mappend` ident +chineseMessage Logout = "注销" +chineseMessage LogoutTitle = "注销" +chineseMessage AuthError = "验证错误" czechMessage :: AuthMessage -> Text czechMessage NoOpenID = "Nebyl nalezen identifikátor OpenID" From db9b51cdf42c1ef657fbc5e0dfd3a6cf8ad9b7dc Mon Sep 17 00:00:00 2001 From: mingyu guo Date: Tue, 28 Mar 2017 20:59:48 +1030 Subject: [PATCH 02/32] Added Yesod.Form.I18n.Chinese --- yesod-form/Yesod/Form/I18n/Chinese.hs | 26 ++++++++++++++++++++++++++ yesod-form/yesod-form.cabal | 1 + 2 files changed, 27 insertions(+) create mode 100644 yesod-form/Yesod/Form/I18n/Chinese.hs diff --git a/yesod-form/Yesod/Form/I18n/Chinese.hs b/yesod-form/Yesod/Form/I18n/Chinese.hs new file mode 100644 index 00000000..5d85effc --- /dev/null +++ b/yesod-form/Yesod/Form/I18n/Chinese.hs @@ -0,0 +1,26 @@ +{-# LANGUAGE OverloadedStrings #-} +module Yesod.Form.I18n.Chinese where + +import Yesod.Form.Types (FormMessage (..)) +import Data.Monoid (mappend) +import Data.Text (Text) + +chineseFormMessage :: FormMessage -> Text +chineseFormMessage (MsgInvalidInteger t) = "无效的整数: " `Data.Monoid.mappend` t +chineseFormMessage (MsgInvalidNumber t) = "无效的数字: " `mappend` t +chineseFormMessage (MsgInvalidEntry t) = "无效的条目: " `mappend` t +chineseFormMessage MsgInvalidTimeFormat = "无效的时间, 必须符合HH:MM[:SS]格式" +chineseFormMessage MsgInvalidDay = "无效的日期, 必须符合YYYY-MM-DD格式" +chineseFormMessage (MsgInvalidUrl t) = "无效的链接: " `mappend` t +chineseFormMessage (MsgInvalidEmail t) = "无效的邮箱地址: " `mappend` t +chineseFormMessage (MsgInvalidHour t) = "无效的小时: " `mappend` t +chineseFormMessage (MsgInvalidMinute t) = "无效的分钟: " `mappend` t +chineseFormMessage (MsgInvalidSecond t) = "无效的秒: " `mappend` t +chineseFormMessage MsgCsrfWarning = "为了防备跨站请求伪造, 请确认表格提交." +chineseFormMessage MsgValueRequired = "此项必填" +chineseFormMessage (MsgInputNotFound t) = "输入找不到: " `mappend` t +chineseFormMessage MsgSelectNone = "<空>" +chineseFormMessage (MsgInvalidBool t) = "无效的逻辑值: " `mappend` t +chineseFormMessage MsgBoolYes = "是" +chineseFormMessage MsgBoolNo = "否" +chineseFormMessage MsgDelete = "删除?" diff --git a/yesod-form/yesod-form.cabal b/yesod-form/yesod-form.cabal index 61dc4e35..1d087185 100644 --- a/yesod-form/yesod-form.cabal +++ b/yesod-form/yesod-form.cabal @@ -68,6 +68,7 @@ library Yesod.Form.I18n.Russian Yesod.Form.I18n.Dutch Yesod.Form.I18n.Spanish + Yesod.Form.I18n.Chinese -- FIXME Yesod.Helpers.Crud ghc-options: -Wall From c1fa2645c04f49c6d74462f6d5e594e1a467abb2 Mon Sep 17 00:00:00 2001 From: Divam Date: Wed, 5 Apr 2017 10:07:09 +0900 Subject: [PATCH 03/32] Japanese message for Current password --- yesod-auth/Yesod/Auth/Message.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yesod-auth/Yesod/Auth/Message.hs b/yesod-auth/Yesod/Auth/Message.hs index a2020550..6127edf4 100644 --- a/yesod-auth/Yesod/Auth/Message.hs +++ b/yesod-auth/Yesod/Auth/Message.hs @@ -416,7 +416,7 @@ japaneseMessage LoginYahoo = "Yahooでログイン" japaneseMessage Email = "Eメール" japaneseMessage UserName = "ユーザー名" -- FIXME by Google Translate "user name" japaneseMessage Password = "パスワード" -japaneseMessage CurrentPassword = "Current password" +japaneseMessage CurrentPassword = "現在のパスワード" japaneseMessage Register = "登録" japaneseMessage RegisterLong = "新規アカウント登録" japaneseMessage EnterEmail = "メールアドレスを入力してください。確認メールが送られます" From d8919c2c2d050ddda505fe1f7b78d86f7d33b92a Mon Sep 17 00:00:00 2001 From: rkaminsk Date: Sun, 9 Apr 2017 02:44:39 +0200 Subject: [PATCH 04/32] remove value attribute from password field (#1374) remove value attribute from password field Fixes https://github.com/yesodweb/yesod/issues/1373 --- yesod-form/Yesod/Form/Fields.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yesod-form/Yesod/Form/Fields.hs b/yesod-form/Yesod/Form/Fields.hs index 7bdeb516..8833b2fc 100644 --- a/yesod-form/Yesod/Form/Fields.hs +++ b/yesod-form/Yesod/Form/Fields.hs @@ -267,9 +267,9 @@ $newline never passwordField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Text passwordField = Field { fieldParse = parseHelper $ Right - , fieldView = \theId name attrs val isReq -> toWidget [hamlet| + , fieldView = \theId name attrs _ isReq -> toWidget [hamlet| $newline never - + |] , fieldEnctype = UrlEncoded } From b8d2647a6a649f1ed247f80562feb0612022597b Mon Sep 17 00:00:00 2001 From: Amitai Burstein Date: Tue, 11 Apr 2017 20:30:55 +0300 Subject: [PATCH 05/32] Add assertNotEq --- yesod-test/ChangeLog.md | 5 +++++ yesod-test/Yesod/Test.hs | 12 ++++++++++++ yesod-test/yesod-test.cabal | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/yesod-test/ChangeLog.md b/yesod-test/ChangeLog.md index 98ff81a4..0245581e 100644 --- a/yesod-test/ChangeLog.md +++ b/yesod-test/ChangeLog.md @@ -1,3 +1,8 @@ +## 1.5.6 + +* Add assertNotEq. +[#1375](https://github.com/yesodweb/yesod/pull/1375) + ## 1.5.5 * Fix warnings diff --git a/yesod-test/Yesod/Test.hs b/yesod-test/Yesod/Test.hs index 93a05b99..79a62df5 100644 --- a/yesod-test/Yesod/Test.hs +++ b/yesod-test/Yesod/Test.hs @@ -86,6 +86,7 @@ module Yesod.Test -- * Assertions , assertEqual + , assertNotEq , assertEqualNoShow , assertEq @@ -335,6 +336,17 @@ assertEq m a b = "First argument: " ++ ppShow a ++ "\n" ++ "Second argument: " ++ ppShow b ++ "\n" +-- | Asserts that the two given values are not equal. +-- +-- In case they are equal, error mesasge includes the values. +-- +-- @since 1.5.6 +assertNotEq :: (Eq a, Show a) => String -> a -> a -> YesodExample site () +assertNotEq m a b = + liftIO $ HUnit.assertBool msg (a /= b) + where msg = "Assertion: " ++ m ++ "\n" ++ + "Both arguments: " ++ ppShow a ++ "\n" + {-# DEPRECATED assertEqual "Use assertEq instead" #-} assertEqual :: (Eq a) => String -> a -> a -> YesodExample site () assertEqual = assertEqualNoShow diff --git a/yesod-test/yesod-test.cabal b/yesod-test/yesod-test.cabal index 7448e7ee..cd1dddc7 100644 --- a/yesod-test/yesod-test.cabal +++ b/yesod-test/yesod-test.cabal @@ -1,5 +1,5 @@ name: yesod-test -version: 1.5.5 +version: 1.5.6 license: MIT license-file: LICENSE author: Nubis From 3229b7ad931cfe476c9569439ea7642a836e3467 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 12 Apr 2017 11:02:27 +0300 Subject: [PATCH 06/32] persistent 2.7 --- yesod-auth/yesod-auth.cabal | 4 ++-- yesod-persistent/yesod-persistent.cabal | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/yesod-auth/yesod-auth.cabal b/yesod-auth/yesod-auth.cabal index 5c552686..e6101841 100644 --- a/yesod-auth/yesod-auth.cabal +++ b/yesod-auth/yesod-auth.cabal @@ -37,8 +37,8 @@ library , unordered-containers , yesod-form >= 1.4 && < 1.5 , transformers >= 0.2.2 - , persistent >= 2.1 && < 2.7 - , persistent-template >= 2.1 && < 2.7 + , persistent >= 2.1 && < 2.8 + , persistent-template >= 2.1 && < 2.8 , http-client , http-conduit >= 2.1 , aeson >= 0.7 diff --git a/yesod-persistent/yesod-persistent.cabal b/yesod-persistent/yesod-persistent.cabal index 2d04725b..ed9a33ed 100644 --- a/yesod-persistent/yesod-persistent.cabal +++ b/yesod-persistent/yesod-persistent.cabal @@ -16,8 +16,8 @@ extra-source-files: README.md ChangeLog.md library build-depends: base >= 4 && < 5 , yesod-core >= 1.4.0 && < 1.5 - , persistent >= 2.1 && < 2.7 - , persistent-template >= 2.1 && < 2.7 + , persistent >= 2.1 && < 2.8 + , persistent-template >= 2.1 && < 2.8 , transformers >= 0.2.2 , blaze-builder , conduit From 01d5f02ceebeac293cfbfd173b6bc4a7e28d029a Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Wed, 12 Apr 2017 19:31:40 +0200 Subject: [PATCH 07/32] GHC 7.6 not supported --- yesod-core/yesod-core.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yesod-core/yesod-core.cabal b/yesod-core/yesod-core.cabal index ade5c86e..73bd487d 100644 --- a/yesod-core/yesod-core.cabal +++ b/yesod-core/yesod-core.cabal @@ -21,7 +21,7 @@ extra-source-files: README.md library - build-depends: base >= 4.6 && < 5 + build-depends: base >= 4.7 && < 5 , time >= 1.1.4 , wai >= 3.0 , wai-extra >= 3.0.7 From fcb1b7f6b4f1e163852fab789e1d4877b5547c0b Mon Sep 17 00:00:00 2001 From: Dawei LIU Date: Mon, 17 Apr 2017 15:25:03 +0200 Subject: [PATCH 08/32] Fix minor doc typo --- yesod-form/Yesod/Form/Input.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yesod-form/Yesod/Form/Input.hs b/yesod-form/Yesod/Form/Input.hs index 4591ac17..826b4c60 100644 --- a/yesod-form/Yesod/Form/Input.hs +++ b/yesod-form/Yesod/Form/Input.hs @@ -25,7 +25,7 @@ import Control.Arrow ((***)) type DText = [Text] -> [Text] -- | Type for a form which parses a value of type @a@ with the base monad @m@ --- (usually your @Handler@). Can can compose this using its @Applicative@ instance. +-- (usually your @Handler@). Can compose this using its @Applicative@ instance. newtype FormInput m a = FormInput { unFormInput :: HandlerSite m -> [Text] -> Env -> FileEnv -> m (Either DText a) } instance Monad m => Functor (FormInput m) where fmap a (FormInput f) = FormInput $ \c d e e' -> liftM (either Left (Right . a)) $ f c d e e' From 878534a272e06fb65ea44a86a7558d6f07c9cfcf Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Thu, 20 Apr 2017 18:52:20 +0530 Subject: [PATCH 09/32] Fix race condition in yesod-bin Stack build process emittles line even after successful build process which leads to the overwriting of the appPortVar with -1. This leads it to a compile mode again. Pressing Return Key and rebuilding it again makes it go, but that's just a workaround I have to do every now and then to solve the actual issue. I'm using a `MVar` based locking solution for fixing the race condition introduced. --- yesod-bin/Devel.hs | 37 +++++++++++++++++++++++++++++++++++-- yesod-bin/yesod-bin.cabal | 2 +- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/yesod-bin/Devel.hs b/yesod-bin/Devel.hs index 4289317b..b477557c 100644 --- a/yesod-bin/Devel.hs +++ b/yesod-bin/Devel.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} @@ -11,9 +12,12 @@ import Control.Applicative ((<|>)) import Control.Concurrent (threadDelay) import Control.Concurrent.Async (race_) import Control.Concurrent.STM +import Control.Concurrent.MVar +import System.IO import qualified Control.Exception.Safe as Ex import Control.Monad (forever, unless, void, when) +import Data.ByteString (ByteString, isInfixOf) import qualified Data.ByteString.Lazy as LB import Data.Conduit (($$), (=$)) import qualified Data.Conduit.Binary as CB @@ -222,6 +226,33 @@ checkDevelFile = then return x else loop xs +stackSuccessString :: ByteString +stackSuccessString = "ExitSuccess" + +stackFailureString :: ByteString +stackFailureString = "ExitFailure" + +data BuildOutput = Started + deriving (Show, Eq, Ord) + +makeEmptyMVar :: MVar a -> IO () +makeEmptyMVar mvar = do + isEmpty <- isEmptyMVar mvar + case isEmpty of + True -> return () + False -> takeMVar mvar >> return () + +updateAppPort :: ByteString -> MVar (BuildOutput) -> TVar Int -> IO () +updateAppPort bs mvar appPortVar = do + isEmpty <- isEmptyMVar mvar + let hasEnd = isInfixOf stackFailureString bs || isInfixOf stackSuccessString bs + case (isEmpty,hasEnd) of + (True,False) -> do + putMVar mvar Started + atomically $ writeTVar appPortVar (-1 :: Int) + (_,False) -> return () + (_,True) -> makeEmptyMVar mvar + -- | Get the set of all flags available in the given cabal file getAvailableFlags :: D.GenericPackageDescription -> Set.Set String getAvailableFlags = @@ -283,6 +314,7 @@ devel opts passThroughArgs = do sayV = when (verbose opts) . sayString -- Leverage "stack build --file-watch" to do the build + runStackBuild :: TVar Int -> [Char] -> Set.Set [Char] -> IO () runStackBuild appPortVar packageName availableFlags = do -- We call into this app for the devel-signal command myPath <- getExecutablePath @@ -316,7 +348,7 @@ devel opts passThroughArgs = do passThroughArgs sayV $ show procConfig - + mvar <- newEmptyMVar -- Monitor the stdout and stderr content from the build process. Any -- time some output comes, we invalidate the currently running app by -- changing the destination port for reverse proxying to -1. We also @@ -325,12 +357,13 @@ devel opts passThroughArgs = do withProcess_ procConfig $ \p -> do let helper getter h = getter p - $$ CL.iterM (\_ -> atomically $ writeTVar appPortVar (-1)) + $$ CL.iterM (\(str :: ByteString) -> updateAppPort str mvar appPortVar) =$ CB.sinkHandle h race_ (helper getStdout stdout) (helper getStderr stderr) -- Run the inner action with a TVar which will be set to True -- whenever the signal file is modified. + withChangedVar :: (TVar Bool -> IO a) -> IO a withChangedVar inner = withManager $ \manager -> do -- Variable indicating that the signal file has been changed. We -- reset it each time we handle the signal. diff --git a/yesod-bin/yesod-bin.cabal b/yesod-bin/yesod-bin.cabal index 54eb1805..31f42fb6 100644 --- a/yesod-bin/yesod-bin.cabal +++ b/yesod-bin/yesod-bin.cabal @@ -1,5 +1,5 @@ name: yesod-bin -version: 1.5.2.2 +version: 1.7 license: MIT license-file: LICENSE author: Michael Snoyman From c37283e300fd21374bfc3901ce1a2bf666667959 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Mon, 24 Apr 2017 20:39:20 +0530 Subject: [PATCH 10/32] Update Changelog and do version bump --- yesod-bin/ChangeLog.md | 4 ++++ yesod-bin/yesod-bin.cabal | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/yesod-bin/ChangeLog.md b/yesod-bin/ChangeLog.md index 9a8c6990..2ffb0332 100644 --- a/yesod-bin/ChangeLog.md +++ b/yesod-bin/ChangeLog.md @@ -1,3 +1,7 @@ +## 1.5.2.3 + +* Fix race condition which leads dev server to stay in compilation mode. [#1380](https://github.com/yesodweb/yesod/issues/1380) + ## 1.5.2.2 * I guess `--no-nix-pure` implies Nix... sigh [#1359](https://github.com/yesodweb/yesod/issues/1359) diff --git a/yesod-bin/yesod-bin.cabal b/yesod-bin/yesod-bin.cabal index 31f42fb6..67d6392f 100644 --- a/yesod-bin/yesod-bin.cabal +++ b/yesod-bin/yesod-bin.cabal @@ -1,5 +1,5 @@ name: yesod-bin -version: 1.7 +version: 1.5.2.3 license: MIT license-file: LICENSE author: Michael Snoyman From 62d7a19149783f47ca8e392c216acaefc386d76a Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Mon, 24 Apr 2017 21:51:13 +0530 Subject: [PATCH 11/32] Fix warnings --- yesod-bin/Devel.hs | 1 - 1 file changed, 1 deletion(-) diff --git a/yesod-bin/Devel.hs b/yesod-bin/Devel.hs index b477557c..b7c0de28 100644 --- a/yesod-bin/Devel.hs +++ b/yesod-bin/Devel.hs @@ -13,7 +13,6 @@ import Control.Concurrent (threadDelay) import Control.Concurrent.Async (race_) import Control.Concurrent.STM import Control.Concurrent.MVar -import System.IO import qualified Control.Exception.Safe as Ex import Control.Monad (forever, unless, void, when) From 706de891562ff9ec70c51a3d536ffb18a2a53c52 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Wed, 26 Apr 2017 19:37:59 +0530 Subject: [PATCH 12/32] Change logic to use TVar --- yesod-bin/Devel.hs | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/yesod-bin/Devel.hs b/yesod-bin/Devel.hs index b7c0de28..45cb4239 100644 --- a/yesod-bin/Devel.hs +++ b/yesod-bin/Devel.hs @@ -231,26 +231,24 @@ stackSuccessString = "ExitSuccess" stackFailureString :: ByteString stackFailureString = "ExitFailure" -data BuildOutput = Started - deriving (Show, Eq, Ord) - -makeEmptyMVar :: MVar a -> IO () -makeEmptyMVar mvar = do - isEmpty <- isEmptyMVar mvar - case isEmpty of - True -> return () - False -> takeMVar mvar >> return () - -updateAppPort :: ByteString -> MVar (BuildOutput) -> TVar Int -> IO () -updateAppPort bs mvar appPortVar = do - isEmpty <- isEmptyMVar mvar - let hasEnd = isInfixOf stackFailureString bs || isInfixOf stackSuccessString bs - case (isEmpty,hasEnd) of - (True,False) -> do - putMVar mvar Started - atomically $ writeTVar appPortVar (-1 :: Int) - (_,False) -> return () - (_,True) -> makeEmptyMVar mvar +-- We need updateAppPort logic to prevent a race condition. +-- See https://github.com/yesodweb/yesod/issues/1380 +updateAppPort :: ByteString -> TVar Bool -- ^ Bool to indicate if the + -- output from stack has + -- started. False indicate + -- that it hasn't started + -- yet. + -> TVar Int -> IO () +updateAppPort bs buildStarted appPortVar = do + hasStarted <- readTVarIO buildStarted + let buildEnd = isInfixOf stackFailureString bs || isInfixOf stackSuccessString bs + case (hasStarted, buildEnd) of + (False, False) -> do + atomically $ do + writeTVar appPortVar (-1 :: Int) + writeTVar buildStarted True + (True, False) -> return () + (_, True) -> atomically $ writeTVar buildStarted False -- | Get the set of all flags available in the given cabal file getAvailableFlags :: D.GenericPackageDescription -> Set.Set String @@ -347,7 +345,7 @@ devel opts passThroughArgs = do passThroughArgs sayV $ show procConfig - mvar <- newEmptyMVar + buildStarted <- newTVarIO False -- Monitor the stdout and stderr content from the build process. Any -- time some output comes, we invalidate the currently running app by -- changing the destination port for reverse proxying to -1. We also @@ -356,7 +354,7 @@ devel opts passThroughArgs = do withProcess_ procConfig $ \p -> do let helper getter h = getter p - $$ CL.iterM (\(str :: ByteString) -> updateAppPort str mvar appPortVar) + $$ CL.iterM (\(str :: ByteString) -> updateAppPort str buildStarted appPortVar) =$ CB.sinkHandle h race_ (helper getStdout stdout) (helper getStderr stderr) From 37c9d2599001b5e49635f4eea994524d4e115a61 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Wed, 26 Apr 2017 20:56:58 +0530 Subject: [PATCH 13/32] Add Debug flag --- yesod-bin/Devel.hs | 20 +++++++++++++++++--- yesod/yesod.cabal | 2 +- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/yesod-bin/Devel.hs b/yesod-bin/Devel.hs index 45cb4239..889f91c8 100644 --- a/yesod-bin/Devel.hs +++ b/yesod-bin/Devel.hs @@ -12,7 +12,6 @@ import Control.Applicative ((<|>)) import Control.Concurrent (threadDelay) import Control.Concurrent.Async (race_) import Control.Concurrent.STM -import Control.Concurrent.MVar import qualified Control.Exception.Safe as Ex import Control.Monad (forever, unless, void, when) @@ -145,6 +144,9 @@ reverseProxy opts appPortVar = do let proxyApp = waiProxyToSettings (const $ do appPort <- atomically $ readTVar appPortVar +#if DEBUG + print $ "revProxy: appPort " ++ (show appPort) +#endif return $ ReverseProxy.WPRProxyDest $ ProxyDest "127.0.0.1" appPort) @@ -244,11 +246,22 @@ updateAppPort bs buildStarted appPortVar = do let buildEnd = isInfixOf stackFailureString bs || isInfixOf stackSuccessString bs case (hasStarted, buildEnd) of (False, False) -> do +#if DEBUG + print "updated appPortVar to -1" +#endif atomically $ do writeTVar appPortVar (-1 :: Int) writeTVar buildStarted True - (True, False) -> return () - (_, True) -> atomically $ writeTVar buildStarted False + (True, False) -> do +#if DEBUG + print "ignored" +#endif + return () + (_, True) -> do +#if DEBUG + print "Reset buildStarted to False" +#endif + atomically $ writeTVar buildStarted False -- | Get the set of all flags available in the given cabal file getAvailableFlags :: D.GenericPackageDescription -> Set.Set String @@ -383,6 +396,7 @@ devel opts passThroughArgs = do inner changedVar -- Each time the library builds successfully, run the application + runApp :: TVar Int -> TVar Bool -> String -> IO b runApp appPortVar changedVar develHsPath = do -- Wait for the first change, indicating that the library -- has been built diff --git a/yesod/yesod.cabal b/yesod/yesod.cabal index fdde1f0e..b804714b 100644 --- a/yesod/yesod.cabal +++ b/yesod/yesod.cabal @@ -1,5 +1,5 @@ name: yesod -version: 1.4.5 +version: 1.4.6 license: MIT license-file: LICENSE author: Michael Snoyman From 35e0095590ad3b372e3772e50b75e16f7062e20b Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Wed, 26 Apr 2017 20:57:13 +0530 Subject: [PATCH 14/32] Add releavant flag in yesod-bin --- yesod-bin/yesod-bin.cabal | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/yesod-bin/yesod-bin.cabal b/yesod-bin/yesod-bin.cabal index 67d6392f..df53c4e8 100644 --- a/yesod-bin/yesod-bin.cabal +++ b/yesod-bin/yesod-bin.cabal @@ -18,11 +18,17 @@ extra-source-files: refreshing.html *.pem +flag debug + default: False + description: Print debugging info. + executable yesod if os(windows) cpp-options: -DWINDOWS if os(openbsd) ld-options: -Wl,-zwxneeded + if flag(debug) + cpp-options: -DDEBUG build-depends: base >= 4.3 && < 5 , parsec >= 2.1 && < 4 From 67eb728703ea773614b7f2d62bdd3e2236cb9d1f Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Thu, 27 Apr 2017 17:08:12 +0530 Subject: [PATCH 15/32] Make updateAppPort as a single STM transaction --- yesod-bin/Devel.hs | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/yesod-bin/Devel.hs b/yesod-bin/Devel.hs index 889f91c8..22e6a515 100644 --- a/yesod-bin/Devel.hs +++ b/yesod-bin/Devel.hs @@ -128,6 +128,7 @@ reverseProxy :: DevelOpts -> TVar Int -> IO () reverseProxy opts appPortVar = do manager <- newManager $ managerSetProxy noProxy tlsManagerSettings let refreshHtml = LB.fromChunks [$(embedFile "refreshing.html")] + sayV = when (verbose opts) . sayString let onExc _ req | maybe False (("application/json" `elem`) . parseHttpAccept) (lookup "accept" $ requestHeaders req) = @@ -144,9 +145,7 @@ reverseProxy opts appPortVar = do let proxyApp = waiProxyToSettings (const $ do appPort <- atomically $ readTVar appPortVar -#if DEBUG - print $ "revProxy: appPort " ++ (show appPort) -#endif + sayV $ "revProxy: appPort " ++ (show appPort) return $ ReverseProxy.WPRProxyDest $ ProxyDest "127.0.0.1" appPort) @@ -240,28 +239,16 @@ updateAppPort :: ByteString -> TVar Bool -- ^ Bool to indicate if the -- started. False indicate -- that it hasn't started -- yet. - -> TVar Int -> IO () + -> TVar Int -> STM () updateAppPort bs buildStarted appPortVar = do - hasStarted <- readTVarIO buildStarted + hasStarted <- readTVar buildStarted let buildEnd = isInfixOf stackFailureString bs || isInfixOf stackSuccessString bs case (hasStarted, buildEnd) of (False, False) -> do -#if DEBUG - print "updated appPortVar to -1" -#endif - atomically $ do - writeTVar appPortVar (-1 :: Int) - writeTVar buildStarted True - (True, False) -> do -#if DEBUG - print "ignored" -#endif - return () - (_, True) -> do -#if DEBUG - print "Reset buildStarted to False" -#endif - atomically $ writeTVar buildStarted False + writeTVar appPortVar (-1 :: Int) + writeTVar buildStarted True + (True, False) -> return () + (_, True) -> writeTVar buildStarted False -- | Get the set of all flags available in the given cabal file getAvailableFlags :: D.GenericPackageDescription -> Set.Set String @@ -367,7 +354,7 @@ devel opts passThroughArgs = do withProcess_ procConfig $ \p -> do let helper getter h = getter p - $$ CL.iterM (\(str :: ByteString) -> updateAppPort str buildStarted appPortVar) + $$ CL.iterM (\(str :: ByteString) -> atomically (updateAppPort str buildStarted appPortVar)) =$ CB.sinkHandle h race_ (helper getStdout stdout) (helper getStderr stderr) From 10b5d4f8e267b853669a3e0178a51d85a3187ecb Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Thu, 27 Apr 2017 17:40:32 +0530 Subject: [PATCH 16/32] Remove debug option --- yesod-bin/yesod-bin.cabal | 4 ---- 1 file changed, 4 deletions(-) diff --git a/yesod-bin/yesod-bin.cabal b/yesod-bin/yesod-bin.cabal index df53c4e8..1560c8b7 100644 --- a/yesod-bin/yesod-bin.cabal +++ b/yesod-bin/yesod-bin.cabal @@ -18,10 +18,6 @@ extra-source-files: refreshing.html *.pem -flag debug - default: False - description: Print debugging info. - executable yesod if os(windows) cpp-options: -DWINDOWS From 3350ca3d9adf13b0c37b638e79443ad0a6bec990 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Thu, 27 Apr 2017 17:49:21 +0530 Subject: [PATCH 17/32] Remove flag conditional --- yesod-bin/yesod-bin.cabal | 2 -- 1 file changed, 2 deletions(-) diff --git a/yesod-bin/yesod-bin.cabal b/yesod-bin/yesod-bin.cabal index 1560c8b7..67d6392f 100644 --- a/yesod-bin/yesod-bin.cabal +++ b/yesod-bin/yesod-bin.cabal @@ -23,8 +23,6 @@ executable yesod cpp-options: -DWINDOWS if os(openbsd) ld-options: -Wl,-zwxneeded - if flag(debug) - cpp-options: -DDEBUG build-depends: base >= 4.3 && < 5 , parsec >= 2.1 && < 4 From 5bb5e8948faccbaafc34dd7896e2d885a65b6cb4 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Thu, 27 Apr 2017 18:03:39 +0530 Subject: [PATCH 18/32] Revert back yesod version --- yesod/yesod.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yesod/yesod.cabal b/yesod/yesod.cabal index b804714b..fdde1f0e 100644 --- a/yesod/yesod.cabal +++ b/yesod/yesod.cabal @@ -1,5 +1,5 @@ name: yesod -version: 1.4.6 +version: 1.4.5 license: MIT license-file: LICENSE author: Michael Snoyman From 13cea1e3f74b2040dbf6d110605a3744d51ba531 Mon Sep 17 00:00:00 2001 From: Steven Shaw Date: Thu, 4 May 2017 11:54:17 +1000 Subject: [PATCH 19/32] Fix Haddock formatting for staticFilesList --- yesod-static/Yesod/Static.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yesod-static/Yesod/Static.hs b/yesod-static/Yesod/Static.hs index 1356f22d..168bbbf8 100644 --- a/yesod-static/Yesod/Static.hs +++ b/yesod-static/Yesod/Static.hs @@ -246,7 +246,7 @@ staticFiles dir = mkStaticFiles dir -- files @\"static\/js\/jquery.js\"@ and -- @\"static\/css\/normalize.css\"@, you would use: -- --- > staticFilesList \"static\" [\"js\/jquery.js\", \"css\/normalize.css\"] +-- > staticFilesList "static" ["js/jquery.js", "css/normalize.css"] -- -- This can be useful when you have a very large number of static -- files, but only need to refer to a few of them from Haskell. From 56b09eef9309f2610377eb20365ff584e3694f0c Mon Sep 17 00:00:00 2001 From: James Haver II Date: Fri, 12 May 2017 00:13:07 +0800 Subject: [PATCH 20/32] Add WaiSubsiteWithAuth --- yesod-core/Yesod/Core/Class/Dispatch.hs | 11 ++++++++++- yesod-core/Yesod/Core/Dispatch.hs | 1 + yesod-core/Yesod/Core/Types.hs | 10 ++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/yesod-core/Yesod/Core/Class/Dispatch.hs b/yesod-core/Yesod/Core/Class/Dispatch.hs index 7f52b9fb..b68340ea 100644 --- a/yesod-core/Yesod/Core/Class/Dispatch.hs +++ b/yesod-core/Yesod/Core/Class/Dispatch.hs @@ -10,7 +10,7 @@ import Yesod.Routes.Class import qualified Network.Wai as W import Yesod.Core.Types import Yesod.Core.Content -import Yesod.Core.Handler (stripHandlerT) +import Yesod.Core.Handler (sendWaiApplication, stripHandlerT) import Yesod.Core.Class.Yesod import Yesod.Core.Class.Handler @@ -28,6 +28,15 @@ instance YesodSubDispatch WaiSubsite master where where WaiSubsite app = ysreGetSub $ yreSite ysreParentEnv +instance YesodSubDispatch WaiSubsiteWithAuth (HandlerT master IO) where + yesodSubDispatch YesodSubRunnerEnv {..} req = + ysreParentRunner base ysreParentEnv (fmap ysreToParentRoute route) req + where + base = stripHandlerT handlert ysreGetSub ysreToParentRoute route + route = Just $ WaiSubsiteWithAuthRoute (W.pathInfo req) [] + WaiSubsiteWithAuth set = ysreGetSub $ yreSite $ ysreParentEnv + handlert = sendWaiApplication $ set + -- | A helper function for creating YesodSubDispatch instances, used by the -- internal generated code. This function has been exported since 1.4.11. -- It promotes a subsite handler to a wai application. diff --git a/yesod-core/Yesod/Core/Dispatch.hs b/yesod-core/Yesod/Core/Dispatch.hs index 17674268..d13a154d 100644 --- a/yesod-core/Yesod/Core/Dispatch.hs +++ b/yesod-core/Yesod/Core/Dispatch.hs @@ -34,6 +34,7 @@ module Yesod.Core.Dispatch , defaultMiddlewaresNoLogging -- * WAI subsites , WaiSubsite (..) + , WaiSubsiteWithAuth (..) , subHelper ) where diff --git a/yesod-core/Yesod/Core/Types.hs b/yesod-core/Yesod/Core/Types.hs index fa86a6f5..38194b4f 100644 --- a/yesod-core/Yesod/Core/Types.hs +++ b/yesod-core/Yesod/Core/Types.hs @@ -178,6 +178,8 @@ type Texts = [Text] -- | Wrap up a normal WAI application as a Yesod subsite. newtype WaiSubsite = WaiSubsite { runWaiSubsite :: W.Application } +newtype WaiSubsiteWithAuth = WaiSubsiteWithAuth { runWaiSubsiteWithAuth :: W.Application } + data RunHandlerEnv site = RunHandlerEnv { rheRender :: !(Route site -> [(Text, Text)] -> Text) , rheRoute :: !(Maybe (Route site)) @@ -560,6 +562,14 @@ instance RenderRoute WaiSubsite where instance ParseRoute WaiSubsite where parseRoute (x, y) = Just $ WaiSubsiteRoute x y +instance RenderRoute WaiSubsiteWithAuth where + data Route WaiSubsiteWithAuth = WaiSubsiteWithAuthRoute [Text] [(Text,Text)] + deriving (Show, Eq, Read, Ord) + renderRoute (WaiSubsiteWithAuthRoute ps qs) = (ps,qs) + +instance ParseRoute WaiSubsiteWithAuth where + parseRoute (x, y) = Just $ WaiSubsiteWithAuthRoute x y + data Logger = Logger { loggerSet :: !LoggerSet , loggerDate :: !DateCacheGetter From 5ee51262debc2c317ecfcefaa200f9bb1ab71b3c Mon Sep 17 00:00:00 2001 From: James Haver II Date: Fri, 12 May 2017 01:04:13 +0800 Subject: [PATCH 21/32] Update ChangeLog and Hackage comments --- yesod-core/ChangeLog.md | 4 ++++ yesod-core/Yesod/Core/Types.hs | 5 ++++- yesod-core/yesod-core.cabal | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/yesod-core/ChangeLog.md b/yesod-core/ChangeLog.md index d23ec260..7cfee692 100644 --- a/yesod-core/ChangeLog.md +++ b/yesod-core/ChangeLog.md @@ -1,3 +1,7 @@ +## 1.4.34 + +* Add `WaiSubsiteWithAuth`. [#1394](https://github.com/yesodweb/yesod/pull/1394) + ## 1.4.33 * Adds curly brackets to route parser. [#1363](https://github.com/yesodweb/yesod/pull/1363) diff --git a/yesod-core/Yesod/Core/Types.hs b/yesod-core/Yesod/Core/Types.hs index 38194b4f..5067c480 100644 --- a/yesod-core/Yesod/Core/Types.hs +++ b/yesod-core/Yesod/Core/Types.hs @@ -175,9 +175,12 @@ type BottomOfHeadAsync master type Texts = [Text] --- | Wrap up a normal WAI application as a Yesod subsite. +-- | Wrap up a normal WAI application as a Yesod subsite. Ignore parent site's middleware and isAuthorized. newtype WaiSubsite = WaiSubsite { runWaiSubsite :: W.Application } +-- | Like 'WaiSubsite', but applies parent site's middleware and isAuthorized. +-- +-- @since 1.4.34 newtype WaiSubsiteWithAuth = WaiSubsiteWithAuth { runWaiSubsiteWithAuth :: W.Application } data RunHandlerEnv site = RunHandlerEnv diff --git a/yesod-core/yesod-core.cabal b/yesod-core/yesod-core.cabal index 73bd487d..bbd637c2 100644 --- a/yesod-core/yesod-core.cabal +++ b/yesod-core/yesod-core.cabal @@ -1,5 +1,5 @@ name: yesod-core -version: 1.4.33 +version: 1.4.34 license: MIT license-file: LICENSE author: Michael Snoyman From 5721f65ebfb3f05830832133c6f27f15e1bf4fe4 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 14 May 2017 00:24:12 +0300 Subject: [PATCH 22/32] Version bumps --- yesod-auth/ChangeLog.md | 4 ++++ yesod-auth/yesod-auth.cabal | 2 +- yesod-form/ChangeLog.md | 4 ++++ yesod-form/yesod-form.cabal | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/yesod-auth/ChangeLog.md b/yesod-auth/ChangeLog.md index 27ae545c..b8ff2a13 100644 --- a/yesod-auth/ChangeLog.md +++ b/yesod-auth/ChangeLog.md @@ -1,3 +1,7 @@ +## 1.4.17.1 + +* Some translation fixes + ## 1.4.17 * Add Show instance for user credentials `Creds` diff --git a/yesod-auth/yesod-auth.cabal b/yesod-auth/yesod-auth.cabal index e6101841..71c928c9 100644 --- a/yesod-auth/yesod-auth.cabal +++ b/yesod-auth/yesod-auth.cabal @@ -1,5 +1,5 @@ name: yesod-auth -version: 1.4.17 +version: 1.4.17.1 license: MIT license-file: LICENSE author: Michael Snoyman, Patrick Brisbin diff --git a/yesod-form/ChangeLog.md b/yesod-form/ChangeLog.md index 0da6f50a..3fa52a16 100644 --- a/yesod-form/ChangeLog.md +++ b/yesod-form/ChangeLog.md @@ -1,3 +1,7 @@ +## 1.4.12 + +* Password field does not remember its previous value + ## 1.4.11 * Fix warnings diff --git a/yesod-form/yesod-form.cabal b/yesod-form/yesod-form.cabal index 1d087185..617ada59 100644 --- a/yesod-form/yesod-form.cabal +++ b/yesod-form/yesod-form.cabal @@ -1,5 +1,5 @@ name: yesod-form -version: 1.4.11 +version: 1.4.12 license: MIT license-file: LICENSE author: Michael Snoyman From 92849d863c6b352701e44f00f7e4923d97b796bd Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Thu, 18 May 2017 08:18:39 +0530 Subject: [PATCH 23/32] Port to cryptonite --- yesod-auth/Yesod/Auth/Email.hs | 6 +++--- yesod-auth/Yesod/PasswordStore.hs | 15 +++++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/yesod-auth/Yesod/Auth/Email.hs b/yesod-auth/Yesod/Auth/Email.hs index aa76231a..0c6aa34d 100644 --- a/yesod-auth/Yesod/Auth/Email.hs +++ b/yesod-auth/Yesod/Auth/Email.hs @@ -117,9 +117,8 @@ import qualified Yesod.Auth.Message as Msg import Yesod.Core import Yesod.Form import qualified Yesod.PasswordStore as PS - import Control.Applicative ((<$>), (<*>)) -import qualified Crypto.Hash.MD5 as H +import qualified Crypto.Hash as H import qualified Crypto.Nonce as Nonce import Data.ByteString.Base16 as B16 import Data.Text (Text) @@ -134,6 +133,7 @@ import System.IO.Unsafe (unsafePerformIO) import qualified Text.Email.Validate import Data.Aeson.Types (Parser, Result(..), parseMaybe, withObject, (.:?)) import Data.Maybe (isJust, isNothing, fromJust) +import Data.ByteArray (convert) loginR, registerR, forgotPasswordR, setpassR :: AuthRoute loginR = PluginR "email" ["login"] @@ -811,7 +811,7 @@ saltPass = fmap (decodeUtf8With lenientDecode) saltPass' :: String -> String -> String saltPass' salt pass = - salt ++ T.unpack (TE.decodeUtf8 $ B16.encode $ H.hash $ TE.encodeUtf8 $ T.pack $ salt ++ pass) + salt ++ T.unpack (TE.decodeUtf8 $ B16.encode $ convert (H.hash (TE.encodeUtf8 $ T.pack $ salt ++ pass) :: H.Digest H.MD5)) isValidPass :: Text -- ^ cleartext password -> SaltedPass -- ^ salted password diff --git a/yesod-auth/Yesod/PasswordStore.hs b/yesod-auth/Yesod/PasswordStore.hs index 9408b7bc..9e32a48e 100755 --- a/yesod-auth/Yesod/PasswordStore.hs +++ b/yesod-auth/Yesod/PasswordStore.hs @@ -102,16 +102,14 @@ module Yesod.PasswordStore ( importSalt -- :: ByteString -> Salt ) where - +import qualified Crypto.MAC.HMAC as CH import qualified Crypto.Hash as CH -import qualified Crypto.Hash.SHA256 as H import qualified Data.ByteString.Char8 as B import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BL import qualified Data.Binary as Binary import Control.Monad import Control.Monad.ST -import Data.Byteable (toBytes) import Data.STRef import Data.Bits import Data.ByteString.Char8 (ByteString) @@ -120,6 +118,7 @@ import System.IO import System.Random import Data.Maybe import qualified Control.Exception +import Data.ByteArray (convert) --------------------- -- Cryptographic base @@ -134,14 +133,18 @@ import qualified Control.Exception -- matches. pbkdf1 :: ByteString -> Salt -> Int -> ByteString pbkdf1 password (SaltBS salt) iter = hashRounds first_hash (iter + 1) - where first_hash = H.finalize $ H.init `H.update` password `H.update` salt + where + first_hash = + convert $ + ((CH.hashFinalize $ CH.hashInit `CH.hashUpdate` password `CH.hashUpdate` salt) :: CH.Digest CH.SHA256) + -- | Hash a 'ByteString' for a given number of rounds. The number of rounds is 0 -- or more. If the number of rounds specified is 0, the ByteString will be -- returned unmodified. hashRounds :: ByteString -> Int -> ByteString hashRounds (!bs) 0 = bs -hashRounds bs rounds = hashRounds (H.hash bs) (rounds - 1) +hashRounds bs rounds = hashRounds (convert (CH.hash bs :: CH.Digest CH.SHA256)) (rounds - 1) -- | Computes the hmacSHA256 of the given message, with the given 'Salt'. hmacSHA256 :: ByteString @@ -151,7 +154,7 @@ hmacSHA256 :: ByteString -> ByteString -- ^ The encoded message hmacSHA256 secret msg = - toBytes (CH.hmacGetDigest (CH.hmac secret msg) :: CH.Digest CH.SHA256) + convert (CH.hmacGetDigest (CH.hmac secret msg) :: CH.Digest CH.SHA256) -- | PBKDF2 key-derivation function. -- For details see @http://tools.ietf.org/html/rfc2898@. From f1fb571427feeca93547bfd2e921bf740b8a5227 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Thu, 18 May 2017 08:18:53 +0530 Subject: [PATCH 24/32] Make relevant changes to cabal file for yesod-auth --- yesod-auth/yesod-auth.cabal | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yesod-auth/yesod-auth.cabal b/yesod-auth/yesod-auth.cabal index 71c928c9..18330036 100644 --- a/yesod-auth/yesod-auth.cabal +++ b/yesod-auth/yesod-auth.cabal @@ -27,7 +27,8 @@ library , wai >= 1.4 , template-haskell , base16-bytestring - , cryptohash + , cryptonite + , memory , random >= 1.0.0.2 , text >= 0.7 , mime-mail >= 0.3 From 8f5b0bc2389c9711c63fad5a2dac8cf8e80ca789 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Thu, 18 May 2017 08:43:29 +0530 Subject: [PATCH 25/32] Do version bump and add Changelog Partially addresses #1397 --- yesod-auth/ChangeLog.md | 4 ++++ yesod-auth/yesod-auth.cabal | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/yesod-auth/ChangeLog.md b/yesod-auth/ChangeLog.md index b8ff2a13..fdfbfeea 100644 --- a/yesod-auth/ChangeLog.md +++ b/yesod-auth/ChangeLog.md @@ -1,3 +1,7 @@ +## 1.4.17.2 + +* Move to cryptonite from cryptohash + ## 1.4.17.1 * Some translation fixes diff --git a/yesod-auth/yesod-auth.cabal b/yesod-auth/yesod-auth.cabal index 18330036..a50db32a 100644 --- a/yesod-auth/yesod-auth.cabal +++ b/yesod-auth/yesod-auth.cabal @@ -1,5 +1,5 @@ name: yesod-auth -version: 1.4.17.1 +version: 1.4.17.2 license: MIT license-file: LICENSE author: Michael Snoyman, Patrick Brisbin From cc1fa4219224096f4885ced37f30af34f0a358dd Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Thu, 18 May 2017 09:46:04 +0530 Subject: [PATCH 26/32] Update travis to use ghc-8.0.2 instead of 8.0.1 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9a2002f1..fcafa250 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,8 +54,8 @@ matrix: compiler: ": #GHC 7.10.3" addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}} - env: BUILD=cabal GHCVER=8.0.1 CABALVER=head HAPPYVER=1.19.5 ALEXVER=3.1.7 - compiler: ": #GHC 8.0.1" - addons: {apt: {packages: [cabal-install-head,ghc-8.0.1,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}} + compiler: ": #GHC 8.0.2" + addons: {apt: {packages: [cabal-install-1.24.2.0,ghc-8.0.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}} # Build with the newest GHC and cabal-install. This is an accepted failure, # see below. From d56485c3d346169e6320187cb8bac41d496e1628 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Thu, 18 May 2017 09:46:44 +0530 Subject: [PATCH 27/32] Cryptonite --- stack.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/stack.yaml b/stack.yaml index 03dfba42..0a596b78 100644 --- a/stack.yaml +++ b/stack.yaml @@ -23,6 +23,7 @@ extra-deps: - persistent-2.5 - persistent-sqlite-2.5 - cookie-0.4.2 +- cryptonite-0.23 - conduit-extra-1.1.14 - streaming-commons-0.1.16 From 4ba2fc8494547c15aa1156dfa1a8228bc2d64d5d Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Thu, 18 May 2017 09:50:47 +0530 Subject: [PATCH 28/32] Add foundation to stack.yaml --- stack.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/stack.yaml b/stack.yaml index 0a596b78..b3eb41d3 100644 --- a/stack.yaml +++ b/stack.yaml @@ -24,6 +24,7 @@ extra-deps: - persistent-sqlite-2.5 - cookie-0.4.2 - cryptonite-0.23 +- foundation-0.0.9 - conduit-extra-1.1.14 - streaming-commons-0.1.16 From 36a98bc4ab210a695c6ca050d7314a6d5cced1da Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Thu, 18 May 2017 12:06:36 +0530 Subject: [PATCH 29/32] Add memory to stack yaml for lts-2 --- stack.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stack.yaml b/stack.yaml index b3eb41d3..cef0c7b5 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-6.23 +resolver: lts-2.12 packages: - ./yesod-core - ./yesod-static @@ -25,6 +25,7 @@ extra-deps: - cookie-0.4.2 - cryptonite-0.23 - foundation-0.0.9 +- memory-0.14.5 - conduit-extra-1.1.14 - streaming-commons-0.1.16 From 635470f7500b31e24ec94e634f2ef5ba61569748 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Thu, 18 May 2017 13:32:35 +0530 Subject: [PATCH 30/32] Change cabal install version --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fcafa250..72ccdc49 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,7 +55,7 @@ matrix: addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}} - env: BUILD=cabal GHCVER=8.0.1 CABALVER=head HAPPYVER=1.19.5 ALEXVER=3.1.7 compiler: ": #GHC 8.0.2" - addons: {apt: {packages: [cabal-install-1.24.2.0,ghc-8.0.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}} + addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}} # Build with the newest GHC and cabal-install. This is an accepted failure, # see below. From 37452896d2a77108189d5489d94da4e4397a5d89 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Thu, 18 May 2017 19:17:55 +0530 Subject: [PATCH 31/32] Try fixing travis error --- .travis.yml | 2 +- stack.yaml | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 72ccdc49..ee1a40b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,7 +53,7 @@ matrix: - env: BUILD=cabal GHCVER=7.10.3 CABALVER=1.22 HAPPYVER=1.19.5 ALEXVER=3.1.7 compiler: ": #GHC 7.10.3" addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}} - - env: BUILD=cabal GHCVER=8.0.1 CABALVER=head HAPPYVER=1.19.5 ALEXVER=3.1.7 + - env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 HAPPYVER=1.19.5 ALEXVER=3.1.7 compiler: ": #GHC 8.0.2" addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}} diff --git a/stack.yaml b/stack.yaml index cef0c7b5..88e1062b 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-2.12 +resolver: lts-6.23 packages: - ./yesod-core - ./yesod-static @@ -26,6 +26,14 @@ extra-deps: - cryptonite-0.23 - foundation-0.0.9 - memory-0.14.5 +- hfsevents-0.1.6 +- x509-1.6.5 +- x509-store-1.6.2 +- x509-system-1.6.4 +- x509-validation-1.6.5 +- tls-1.3.8 +- Win32-notify-0.3.0.1 + - conduit-extra-1.1.14 - streaming-commons-0.1.16 From ec90f48d889e616cc16e93645d8daac5ce1261b2 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Sun, 21 May 2017 19:53:28 +0530 Subject: [PATCH 32/32] Fix lts-2 related errors --- stack.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stack.yaml b/stack.yaml index 88e1062b..57a79fa9 100644 --- a/stack.yaml +++ b/stack.yaml @@ -33,7 +33,10 @@ extra-deps: - x509-validation-1.6.5 - tls-1.3.8 - Win32-notify-0.3.0.1 - +- asn1-parse-0.9.4 +- asn1-types-0.3.2 +- connection-0.2.8 +- socks-0.5.5 - conduit-extra-1.1.14 - streaming-commons-0.1.16