Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-call-stack for openSUSE:Factory checked in at 2021-06-01 10:38:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-call-stack (Old) and /work/SRC/openSUSE:Factory/.ghc-call-stack.new.1898 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-call-stack" Tue Jun 1 10:38:47 2021 rev:12 rq:896186 version:0.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-call-stack/ghc-call-stack.changes 2021-02-16 22:45:20.182333861 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-call-stack.new.1898/ghc-call-stack.changes 2021-06-01 10:40:25.725116129 +0200 @@ -1,0 +2,6 @@ +Sun May 16 11:13:52 UTC 2021 - [email protected] + +- Update call-stack to version 0.4.0. + Upstream does not provide a change log file. + +------------------------------------------------------------------- Old: ---- call-stack-0.3.0.tar.gz New: ---- call-stack-0.4.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-call-stack.spec ++++++ --- /var/tmp/diff_new_pack.giC9gH/_old 2021-06-01 10:40:26.117116796 +0200 +++ /var/tmp/diff_new_pack.giC9gH/_new 2021-06-01 10:40:26.121116804 +0200 @@ -19,7 +19,7 @@ %global pkg_name call-stack %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.3.0 +Version: 0.4.0 Release: 0 Summary: Use GHC call-stacks in a backward compatible way License: MIT @@ -29,6 +29,7 @@ BuildRequires: ghc-rpm-macros ExcludeArch: %{ix86} %if %{with tests} +BuildRequires: ghc-filepath-devel BuildRequires: ghc-nanospec-devel %endif ++++++ call-stack-0.3.0.tar.gz -> call-stack-0.4.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/call-stack-0.3.0/call-stack.cabal new/call-stack-0.4.0/call-stack.cabal --- old/call-stack-0.3.0/call-stack.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/call-stack-0.4.0/call-stack.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.3. +-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack name: call-stack -version: 0.3.0 +version: 0.4.0 synopsis: Use GHC call-stacks in a backward compatible way category: Data homepage: https://github.com/sol/call-stack#readme @@ -25,6 +25,10 @@ ghc-options: -Wall build-depends: base ==4.* + if os(windows) + cpp-options: -DWINDOWS + build-depends: + filepath exposed-modules: Data.CallStack other-modules: @@ -41,6 +45,7 @@ build-depends: base ==4.* , call-stack + , filepath , nanospec other-modules: Data.CallStackSpec diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/call-stack-0.3.0/src/Data/CallStack.hs new/call-stack-0.4.0/src/Data/CallStack.hs --- old/call-stack-0.3.0/src/Data/CallStack.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/call-stack-0.4.0/src/Data/CallStack.hs 2001-09-09 03:46:40.000000000 +0200 @@ -4,9 +4,9 @@ #if __GLASGOW_HASKELL__ >= 704 {-# LANGUAGE ConstraintKinds #-} -#define HCS HasCallStack => +#define HasCallStack_ HasCallStack => #else -#define HCS +#define HasCallStack_ #endif module Data.CallStack ( @@ -22,6 +22,10 @@ import Data.Maybe import Data.SrcLoc +#ifdef WINDOWS +import System.FilePath +#endif + #if MIN_VERSION_base(4,8,1) import qualified GHC.Stack as GHC #endif @@ -37,14 +41,30 @@ type CallStack = [(String, SrcLoc)] -callStack :: HCS CallStack +callStack :: HasCallStack_ CallStack +callStack = workaroundForIssue19236 $ #if MIN_VERSION_base(4,9,0) -callStack = drop 1 $ GHC.getCallStack GHC.callStack + drop 1 $ GHC.getCallStack GHC.callStack #elif MIN_VERSION_base(4,8,1) -callStack = drop 2 $ GHC.getCallStack ?callStack + drop 2 $ GHC.getCallStack ?callStack #else -callStack = [] + [] #endif -callSite :: HCS Maybe (String, SrcLoc) +callSite :: HasCallStack_ Maybe (String, SrcLoc) callSite = listToMaybe (reverse callStack) + +workaroundForIssue19236 :: CallStack -> CallStack -- https://gitlab.haskell.org/ghc/ghc/-/issues/19236 +workaroundForIssue19236 = +#ifdef WINDOWS + map (fmap fixSrcLoc) + where + fixSrcLoc :: SrcLoc -> SrcLoc + fixSrcLoc loc = loc { srcLocFile = fixPath $ srcLocFile loc } + + fixPath :: FilePath -> FilePath + fixPath = + joinPath . splitDirectories +#else + id +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/call-stack-0.3.0/test/Data/CallStackSpec.hs new/call-stack-0.4.0/test/Data/CallStackSpec.hs --- old/call-stack-0.3.0/test/Data/CallStackSpec.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/call-stack-0.4.0/test/Data/CallStackSpec.hs 2001-09-09 03:46:40.000000000 +0200 @@ -15,10 +15,10 @@ , SrcLoc { srcLocPackage = "main" , srcLocModule = "Example" - , srcLocFile = "test/Example.hs" - , srcLocStartLine = 17 + , srcLocFile = "test" </> "Example.hs" + , srcLocStartLine = 18 , srcLocStartCol = 7 - , srcLocEndLine = 17 + , srcLocEndLine = 18 , srcLocEndCol = 10 } ) @@ -26,10 +26,10 @@ , SrcLoc { srcLocPackage = "main" , srcLocModule = "Example" - , srcLocFile = "test/Example.hs" - , srcLocStartLine = 14 + , srcLocFile = "test" </> "Example.hs" + , srcLocStartLine = 15 , srcLocStartCol = 8 - , srcLocEndLine = 14 + , srcLocEndLine = 15 , srcLocEndCol = 11 } ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/call-stack-0.3.0/test/Example.hs new/call-stack-0.4.0/test/Example.hs --- old/call-stack-0.3.0/test/Example.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/call-stack-0.4.0/test/Example.hs 2001-09-09 03:46:40.000000000 +0200 @@ -2,10 +2,11 @@ #if __GLASGOW_HASKELL__ >= 704 {-# LANGUAGE ConstraintKinds #-} -#define HCS HasCallStack => +#define HasCallStack_ HasCallStack => #else -#define HCS +#define HasCallStack_ #endif + module Example where import Data.CallStack @@ -13,8 +14,8 @@ test :: CallStack test = foo -foo :: HCS CallStack +foo :: HasCallStack_ CallStack foo = bar -bar :: HCS CallStack +bar :: HasCallStack_ CallStack bar = callStack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/call-stack-0.3.0/test/Util.hs new/call-stack-0.4.0/test/Util.hs --- old/call-stack-0.3.0/test/Util.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/call-stack-0.4.0/test/Util.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,5 +1,7 @@ {-# LANGUAGE CPP #-} -module Util (SrcLoc(..), mapLocations) where +module Util (SrcLoc(..), mapLocations, (</>)) where + +import System.FilePath #if MIN_VERSION_base(4,8,1) && !MIN_VERSION_base(4,9,0) import qualified GHC.SrcLoc as GHC
