Hello community,

here is the log from the commit of package ghc-yesod for openSUSE:Factory 
checked in at 2020-08-18 12:24:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yesod (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-yesod.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-yesod"

Tue Aug 18 12:24:56 2020 rev:3 rq:825805 version:1.6.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yesod/ghc-yesod.changes      2020-07-09 
13:20:18.149446904 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-yesod.new.3399/ghc-yesod.changes    
2020-08-18 12:25:00.471821500 +0200
@@ -1,0 +2,8 @@
+Mon Aug 10 08:46:42 UTC 2020 - [email protected]
+
+- Update yesod to version 1.6.1.0.
+  ## 1.6.1.0
+
+  * `widgetFileReload` and `widgetFileNoReload` now use absolute paths via the 
new `globFilePackage` Q Exp which can provide absolute templates paths within 
the project [#1691](https://github.com/yesodweb/yesod/pull/1691)
+
+-------------------------------------------------------------------

Old:
----
  yesod-1.6.0.2.tar.gz

New:
----
  yesod-1.6.1.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-yesod.spec ++++++
--- /var/tmp/diff_new_pack.EdbX6P/_old  2020-08-18 12:25:01.615821977 +0200
+++ /var/tmp/diff_new_pack.EdbX6P/_new  2020-08-18 12:25:01.619821979 +0200
@@ -18,7 +18,7 @@
 
 %global pkg_name yesod
 Name:           ghc-%{pkg_name}
-Version:        1.6.0.2
+Version:        1.6.1.0
 Release:        0
 Summary:        Creation of type-safe, RESTful web applications
 License:        MIT
@@ -31,9 +31,9 @@
 BuildRequires:  ghc-data-default-class-devel
 BuildRequires:  ghc-directory-devel
 BuildRequires:  ghc-fast-logger-devel
+BuildRequires:  ghc-file-embed-devel
 BuildRequires:  ghc-monad-logger-devel
 BuildRequires:  ghc-rpm-macros
-BuildRequires:  ghc-semigroups-devel
 BuildRequires:  ghc-shakespeare-devel
 BuildRequires:  ghc-streaming-commons-devel
 BuildRequires:  ghc-template-haskell-devel

++++++ yesod-1.6.0.2.tar.gz -> yesod-1.6.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yesod-1.6.0.2/ChangeLog.md 
new/yesod-1.6.1.0/ChangeLog.md
--- old/yesod-1.6.0.2/ChangeLog.md      2020-06-26 18:55:21.000000000 +0200
+++ new/yesod-1.6.1.0/ChangeLog.md      2020-08-09 07:49:50.000000000 +0200
@@ -1,3 +1,7 @@
+## 1.6.1.0
+
+* `widgetFileReload` and `widgetFileNoReload` now use absolute paths via the 
new `globFilePackage` Q Exp which can provide absolute templates paths within 
the project [#1691](https://github.com/yesodweb/yesod/pull/1691)
+
 ## 1.6.0.2
 
 * Replace deprecated decodeFile with decodeFileEither. This should have no 
semantic impact, but silences a deprecation warning. 
[#1658](https://github.com/yesodweb/yesod/pull/1658)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yesod-1.6.0.2/Yesod/Default/Util.hs 
new/yesod-1.6.1.0/Yesod/Default/Util.hs
--- old/yesod-1.6.0.2/Yesod/Default/Util.hs     2018-08-01 03:09:20.000000000 
+0200
+++ new/yesod-1.6.1.0/Yesod/Default/Util.hs     2020-08-09 07:49:50.000000000 
+0200
@@ -5,6 +5,7 @@
 module Yesod.Default.Util
     ( addStaticContentExternal
     , globFile
+    , globFilePackage
     , widgetFileNoReload
     , widgetFileReload
     , TemplateLanguage (..)
@@ -15,6 +16,7 @@
     ) where
 
 import qualified Data.ByteString.Lazy as L
+import Data.FileEmbed (makeRelativeToProject)
 import Data.Text (Text, pack, unpack)
 import Yesod.Core -- purposely using complete import so that Haddock will see 
addStaticContent
 import Control.Monad (when, unless)
@@ -64,6 +66,11 @@
 globFile :: String -> String -> FilePath
 globFile kind x = "templates/" ++ x ++ "." ++ kind
 
+-- | `globFile` but returned path is absolute and within the package the Q Exp 
is evaluated
+-- @since 1.6.1.0
+globFilePackage :: String -> String -> Q FilePath
+globFilePackage = (makeRelativeToProject <$>) . globFile
+
 data TemplateLanguage = TemplateLanguage
     { tlRequiresToWidget :: Bool
     , tlExtension :: String
@@ -124,7 +131,7 @@
                  -> Bool -- ^ requires toWidget wrap
                  -> String -> (FilePath -> Q Exp) -> Q (Maybe Exp)
 warnUnlessExists shouldWarn x wrap glob f = do
-    let fn = globFile glob x
+    fn <- globFilePackage glob x
     e <- qRunIO $ doesFileExist fn
     when (shouldWarn && not e) $ qRunIO $ putStrLn $ "widget file not found: " 
++ fn
     if e
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yesod-1.6.0.2/yesod.cabal 
new/yesod-1.6.1.0/yesod.cabal
--- old/yesod-1.6.0.2/yesod.cabal       2020-06-26 18:59:14.000000000 +0200
+++ new/yesod-1.6.1.0/yesod.cabal       2020-08-09 07:49:50.000000000 +0200
@@ -1,5 +1,5 @@
 name:            yesod
-version:         1.6.0.2
+version:         1.6.1.0
 license:         MIT
 license-file:    LICENSE
 author:          Michael Snoyman <[email protected]>
@@ -25,8 +25,8 @@
                    , data-default-class
                    , directory
                    , fast-logger
+                   , file-embed
                    , monad-logger
-                   , semigroups
                    , shakespeare
                    , streaming-commons
                    , template-haskell


Reply via email to