Hello community,
here is the log from the commit of package ghc-microlens-aeson for
openSUSE:Factory checked in at 2016-11-10 13:25:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-microlens-aeson (Old)
and /work/SRC/openSUSE:Factory/.ghc-microlens-aeson.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-microlens-aeson"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-microlens-aeson/ghc-microlens-aeson.changes
2016-11-02 12:36:07.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.ghc-microlens-aeson.new/ghc-microlens-aeson.changes
2016-11-10 13:25:09.000000000 +0100
@@ -1,0 +2,5 @@
+Thu Sep 15 06:52:49 UTC 2016 - [email protected]
+
+- Update to version 2.1.1.1 revision 0 with cabal2obs.
+
+-------------------------------------------------------------------
Old:
----
microlens-aeson-2.1.1.tar.gz
New:
----
microlens-aeson-2.1.1.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-microlens-aeson.spec ++++++
--- /var/tmp/diff_new_pack.CwbiwC/_old 2016-11-10 13:25:10.000000000 +0100
+++ /var/tmp/diff_new_pack.CwbiwC/_new 2016-11-10 13:25:10.000000000 +0100
@@ -19,15 +19,14 @@
%global pkg_name microlens-aeson
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 2.1.1
+Version: 2.1.1.1
Release: 0
Summary: Law-abiding lenses for Aeson, using microlens
License: MIT
-Group: System/Libraries
+Group: Development/Languages/Other
Url: https://hackage.haskell.org/package/%{pkg_name}
Source0:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
BuildRequires: ghc-Cabal-devel
-# Begin cabal-rpm deps:
BuildRequires: ghc-aeson-devel
BuildRequires: ghc-attoparsec-devel
BuildRequires: ghc-bytestring-devel
@@ -39,14 +38,9 @@
BuildRequires: ghc-vector-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{with tests}
-BuildRequires: ghc-directory-devel
-BuildRequires: ghc-doctest-devel
-BuildRequires: ghc-filepath-devel
-BuildRequires: ghc-generic-deriving-devel
-BuildRequires: ghc-semigroups-devel
-BuildRequires: ghc-simple-reflect-devel
+BuildRequires: ghc-tasty-devel
+BuildRequires: ghc-tasty-hunit-devel
%endif
-# End cabal-rpm deps
%description
Law-abiding lenses for Aeson, using microlens.
@@ -66,20 +60,14 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-
%build
%ghc_lib_build
-
%install
%ghc_lib_install
-
%check
-%if %{with tests}
-%{cabal} test
-%endif
-
+%cabal_test
%post devel
%ghc_pkg_recache
++++++ microlens-aeson-2.1.1.tar.gz -> microlens-aeson-2.1.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/microlens-aeson-2.1.1/.travis.yml
new/microlens-aeson-2.1.1.1/.travis.yml
--- old/microlens-aeson-2.1.1/.travis.yml 2016-02-10 01:22:38.000000000
+0100
+++ new/microlens-aeson-2.1.1.1/.travis.yml 2016-08-09 06:41:52.000000000
+0200
@@ -13,8 +13,7 @@
# The different configurations we want to test. You could also do things like
# change flags or use --stack-yaml to point to a different file.
env:
-- ARGS="--resolver lts-5.2"
-- ARGS="--resolver nightly-2015-12-16"
+- ARGS="--resolver nightly-2016-08-01"
before_install:
# Download and unpack the stack executable
@@ -25,7 +24,11 @@
# This line does all of the work: installs GHC if necessary, build the library,
# executables, and test suites, and runs the test suites. --no-terminal works
# around some quirks in Travis's terminal implementation.
-script: stack $ARGS --no-terminal --install-ghc test
+script: stack $ARGS --no-terminal --install-ghc test --coverage
+
+after_script:
+ - travis_retry curl -L
https://github.com/rubik/stack-hpc-coveralls/releases/download/v0.0.4.0/shc-linux-x64-8.0.1.tar.bz2
| tar -xj
+ - ./shc microlens-aeson microlens-aeson-test
# Caching so the next build will be fast too.
cache:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/microlens-aeson-2.1.1/README.md
new/microlens-aeson-2.1.1.1/README.md
--- old/microlens-aeson-2.1.1/README.md 2015-12-30 17:43:36.000000000 +0100
+++ new/microlens-aeson-2.1.1.1/README.md 2016-08-09 06:54:51.000000000
+0200
@@ -2,6 +2,10 @@
===============
[](https://travis-ci.org/fosskers/microlens-aeson)
+[](https://coveralls.io/github/fosskers/microlens-aeson?branch=master)
+[](https://hackage.haskell.org/package/microlens-aeson)
+[](http://stackage.org/nightly/package/microlens-aeson)
+[](http://stackage.org/lts/package/microlens-aeson)
`microlens-aeson` provides Traversals for the
[Aeson](http://hackage.haskell.org/package/aeson) library's `Value` type,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/microlens-aeson-2.1.1/Setup.hs
new/microlens-aeson-2.1.1.1/Setup.hs
--- old/microlens-aeson-2.1.1/Setup.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/microlens-aeson-2.1.1.1/Setup.hs 2016-08-09 05:55:22.000000000
+0200
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/microlens-aeson-2.1.1/Setup.lhs
new/microlens-aeson-2.1.1.1/Setup.lhs
--- old/microlens-aeson-2.1.1/Setup.lhs 2015-12-29 08:21:06.000000000 +0100
+++ new/microlens-aeson-2.1.1.1/Setup.lhs 1970-01-01 01:00:00.000000000
+0100
@@ -1,55 +0,0 @@
-#!/usr/bin/runhaskell
-\begin{code}
-{-# OPTIONS_GHC -Wall #-}
-module Main (main) where
-
-import Data.List ( nub )
-import Data.Version ( showVersion )
-import Distribution.Package ( PackageName(PackageName), Package, PackageId,
InstalledPackageId, packageVersion, packageName )
-import Distribution.PackageDescription ( PackageDescription(), TestSuite(..) )
-import Distribution.Simple ( defaultMainWithHooks, UserHooks(..),
simpleUserHooks )
-import Distribution.Simple.Utils ( rewriteFile,
createDirectoryIfMissingVerbose, copyFiles )
-import Distribution.Simple.BuildPaths ( autogenModulesDir )
-import Distribution.Simple.Setup ( BuildFlags(buildVerbosity), Flag(..),
fromFlag, HaddockFlags(haddockDistPref))
-import Distribution.Simple.LocalBuildInfo ( withLibLBI, withTestLBI,
LocalBuildInfo(), ComponentLocalBuildInfo(componentPackageDeps) )
-import Distribution.Text ( display )
-import Distribution.Verbosity ( Verbosity, normal )
-import System.FilePath ( (</>) )
-
-main :: IO ()
-main = defaultMainWithHooks simpleUserHooks
- { buildHook = \pkg lbi hooks flags -> do
- generateBuildModule (fromFlag (buildVerbosity flags)) pkg lbi
- buildHook simpleUserHooks pkg lbi hooks flags
- , postHaddock = \args flags pkg lbi -> do
- copyFiles normal (haddockOutputDir flags pkg) []
- postHaddock simpleUserHooks args flags pkg lbi
- }
-
-haddockOutputDir :: Package p => HaddockFlags -> p -> FilePath
-haddockOutputDir flags pkg = destDir where
- baseDir = case haddockDistPref flags of
- NoFlag -> "."
- Flag x -> x
- destDir = baseDir </> "doc" </> "html" </> display (packageName pkg)
-
-generateBuildModule :: Verbosity -> PackageDescription -> LocalBuildInfo -> IO
()
-generateBuildModule verbosity pkg lbi = do
- let dir = autogenModulesDir lbi
- createDirectoryIfMissingVerbose verbosity True dir
- withLibLBI pkg lbi $ \_ libcfg -> do
- withTestLBI pkg lbi $ \suite suitecfg -> do
- rewriteFile (dir </> "Build_" ++ testName suite ++ ".hs") $ unlines
- [ "module Build_" ++ testName suite ++ " where"
- , "deps :: [String]"
- , "deps = " ++ (show $ formatdeps (testDeps libcfg suitecfg))
- ]
- where
- formatdeps = map (formatone . snd)
- formatone p = case packageName p of
- PackageName n -> n ++ "-" ++ showVersion (packageVersion p)
-
-testDeps :: ComponentLocalBuildInfo -> ComponentLocalBuildInfo ->
[(InstalledPackageId, PackageId)]
-testDeps xs ys = nub $ componentPackageDeps xs ++ componentPackageDeps ys
-
-\end{code}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/microlens-aeson-2.1.1/microlens-aeson.cabal
new/microlens-aeson-2.1.1.1/microlens-aeson.cabal
--- old/microlens-aeson-2.1.1/microlens-aeson.cabal 2016-02-10
01:21:18.000000000 +0100
+++ new/microlens-aeson-2.1.1.1/microlens-aeson.cabal 2016-08-09
16:29:30.000000000 +0200
@@ -1,6 +1,6 @@
name: microlens-aeson
category: Numeric
-version: 2.1.1
+version: 2.1.1.1
license: MIT
cabal-version: >= 1.8
license-file: LICENSE
@@ -13,7 +13,7 @@
Copyright (C) 2012 Paul Wilson
Copyright (C) 2013 Edward A. Kmett
Copyright (C) 2015 Colin Woodbury
-build-type: Custom
+build-type: Simple
synopsis: Law-abiding lenses for Aeson, using microlens.
description: Law-abiding lenses for Aeson, using microlens.
@@ -31,14 +31,9 @@
type: git
location: git://github.com/fosskers/microlens-aeson.git
--- You can disable the doctests test suite with -f-test-doctests
-flag test-doctests
- default: True
- manual: True
-
library
build-depends:
- aeson >= 0.7.0.5 && < 0.12
+ aeson >= 0.7.0.5 && < 1.1
, attoparsec >= 0.10 && < 0.14
, base >= 4.5 && < 5
, bytestring >= 0.9 && < 0.11
@@ -57,20 +52,21 @@
ghc-options: -Wall -fwarn-tabs -O2
hs-source-dirs: src
-test-suite doctests
- type: exitcode-stdio-1.0
- main-is: doctests.hs
- ghc-options: -Wall -threaded
- hs-source-dirs: tests
-
- if !flag(test-doctests)
- buildable: False
- else
- build-depends:
- base
- , directory >= 1.0
- , doctest >= 0.9.1
- , filepath
- , generic-deriving
- , semigroups >= 0.9
- , simple-reflect >= 0.3.1
+test-suite microlens-aeson-test
+ type: exitcode-stdio-1.0
+
+ build-depends: base >=4.9 && <4.10
+ , tasty >= 0.10.1.2
+ , tasty-hunit >= 0.9.2
+ , text >=1.2 && <1.3
+ , microlens-aeson
+ , microlens
+ , bytestring
+ , vector
+ , aeson
+ , unordered-containers
+
+ hs-source-dirs: test
+ main-is: Test.hs
+ default-language: Haskell2010
+ ghc-options: -Wall -threaded
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/microlens-aeson-2.1.1/test/Test.hs
new/microlens-aeson-2.1.1.1/test/Test.hs
--- old/microlens-aeson-2.1.1/test/Test.hs 1970-01-01 01:00:00.000000000
+0100
+++ new/microlens-aeson-2.1.1.1/test/Test.hs 2016-08-09 06:35:24.000000000
+0200
@@ -0,0 +1,64 @@
+--{-# LANGUAGE OverloadedStrings #-}
+
+module Main where
+
+import Data.Aeson
+import Data.ByteString.Char8 as Strict.Char8
+import Data.ByteString.Lazy.Char8 as Lazy
+import qualified Data.Vector as Vector
+import Lens.Micro
+import Lens.Micro.Aeson
+import Test.Tasty
+import Test.Tasty.HUnit
+import qualified Data.HashMap.Strict as HMS
+import qualified Data.Text as T
+
+---
+
+main :: IO ()
+main = defaultMain suite
+
+suite :: TestTree
+suite = testGroup "Unit Tests"
+ [ testGroup "Scientific Traversals"
+ [ testCase "" $ ("[1, \"x\"]" ^? nth 0 . _Number) @?= Just 1.0
+ , testCase "" $ ("[1, \"x\"]" ^? nth 1 . _Number) @?= Nothing
+ , testCase "" $ ("[10.2]" ^? nth 0 . _Double) @?= Just 10.2
+ , testCase "" $ ("[10]" ^? nth 0 . _Integer) @?= Just 10
+ , testCase "" $ ("[10.5]" ^? nth 0 . _Integer) @?= Just 10
+ , testCase "" $ ("42" ^? _Integer) @?= Just 42
+ ]
+ , testGroup "Conversion Traversals"
+ [ testCase "" $ ("[10]" ^? nth 0 . _Integral) @?= Just 10
+ , testCase "" $ ("[10.5]" ^? nth 0 . _Integral) @?= Just 10
+ ]
+ , testGroup "Nulls and Primitives"
+ [ testCase "" $ ("[1, \"x\", null, true, false]" ^? nth 0 . _Primitive)
@?= Just (NumberPrim 1.0)
+ , testCase "" $ ("[1, \"x\", null, true, false]" ^? nth 1 . _Primitive)
@?= Just (StringPrim $ T.pack "x")
+ , testCase "" $ ("[1, \"x\", null, true, false]" ^? nth 2 . _Primitive)
@?= Just NullPrim
+ , testCase "" $ ("[1, \"x\", null, true, false]" ^? nth 3 . _Primitive)
@?= Just (BoolPrim True)
+ , testCase "" $ ("[1, \"x\", null, true, false]" ^? nth 4 . _Primitive)
@?= Just (BoolPrim False)
+ , testCase "" $ ("{\"a\": \"xyz\", \"b\": true}" ^? key (T.pack "a") .
_String) @?= Just (T.pack "xyz")
+ , testCase "" $ ("{\"a\": \"xyz\", \"b\": true}" ^? key (T.pack "b") .
_String) @?= Nothing
+ , testCase "" $ ("{\"a\": \"xyz\", \"b\": true}" ^? key (T.pack "b") .
_Bool) @?= Just True
+ , testCase "" $ ("{\"a\": \"xyz\", \"b\": true}" ^? key (T.pack "a") .
_Bool) @?= Nothing
+ , testCase "" $ ("{\"a\": \"xyz\", \"b\": null}" ^? key (T.pack "b") .
_Null) @?= Just ()
+ , testCase "" $ ("{\"a\": \"xyz\", \"b\": null}" ^? key (T.pack "a") .
_Null) @?= Nothing
+ , testCase "" $ ("{\"a\": \"xyz\", \"b\": null}" ^? key (T.pack "a") .
nonNull) @?= Just (String $ T.pack "xyz")
+ , testCase "" $ ("{\"a\": {}, \"b\": null}" ^? key (T.pack "a") . nonNull)
@?= Just (Object (HMS.fromList []))
+ , testCase "" $ ("{\"a\": \"xyz\", \"b\": null}" ^? key (T.pack "b") .
nonNull) @?= Nothing
+ ]
+ , testGroup "Non-primitive Traversals"
+ [ testCase "" $ ("{\"a\": {}, \"b\": null}" ^? key (T.pack "a") . _Object)
@?= Just (HMS.fromList [])
+ , testCase "" $ ("{\"a\": {}, \"b\": null}" ^? key (T.pack "b") . _Object)
@?= Nothing
+ , testCase "" $ ("{\"a\": 100, \"b\": 200}" ^? key (T.pack "a")) @?= Just
(Number 100.0)
+ , testCase "" $ ("[1,2,3]" ^? key (T.pack "a")) @?= Nothing
+ , testCase "" $ ("{\"a\": 4, \"b\": 7}" ^.. members) @?= [Number
4.0,Number 7.0]
+ , testCase "" $ ("{\"a\": 4, \"b\": 7}" & members . _Number %~ (* 10)) @?=
"{\"a\":40,\"b\":70}"
+ , testCase "" $ ("[1,2,3]" ^? nth 1) @?= Just (Number 2.0)
+ , testCase "" $ ("{\"a\": 100, \"b\": 200}" ^? nth 1) @?= Nothing
+ , testCase "" $ ("[1,2,3]" & nth 1 .~ Number 20) @?= "[1,20,3]"
+ , testCase "" $ ("[1,2,3]" ^.. values) @?= [Number 1.0,Number 2.0,Number
3.0]
+ , testCase "" $ ("[1,2,3]" & values . _Number %~ (* 10)) @?= "[10,20,30]"
+ ]
+ ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/microlens-aeson-2.1.1/tests/doctests.hsc
new/microlens-aeson-2.1.1.1/tests/doctests.hsc
--- old/microlens-aeson-2.1.1/tests/doctests.hsc 2015-12-22
15:50:36.000000000 +0100
+++ new/microlens-aeson-2.1.1.1/tests/doctests.hsc 1970-01-01
01:00:00.000000000 +0100
@@ -1,73 +0,0 @@
-{-# LANGUAGE CPP #-}
-{-# LANGUAGE ForeignFunctionInterface #-}
------------------------------------------------------------------------------
--- |
--- Module : Main (doctests)
--- Copyright : (C) 2012-13 Edward Kmett
--- License : BSD-style (see the file LICENSE)
--- Maintainer : Edward Kmett <[email protected]>
--- Stability : provisional
--- Portability : portable
---
--- This module provides doctests for a project based on the actual versions
--- of the packages it was built with. It requires a corresponding Setup.lhs
--- to be added to the project
------------------------------------------------------------------------------
-module Main where
-
-import Build_doctests (deps)
-import Control.Applicative
-import Control.Monad
-import Data.List
-import System.Directory
-import System.FilePath
-import Test.DocTest
-
-##if defined(mingw32_HOST_OS)
-##if defined(i386_HOST_ARCH)
-##define USE_CP
-import Control.Applicative
-import Control.Exception
-import Foreign.C.Types
-foreign import stdcall "windows.h SetConsoleCP" c_SetConsoleCP :: CUInt -> IO
Bool
-foreign import stdcall "windows.h GetConsoleCP" c_GetConsoleCP :: IO CUInt
-##elif defined(x86_64_HOST_ARCH)
-##define USE_CP
-import Control.Applicative
-import Control.Exception
-import Foreign.C.Types
-foreign import ccall "windows.h SetConsoleCP" c_SetConsoleCP :: CUInt -> IO
Bool
-foreign import ccall "windows.h GetConsoleCP" c_GetConsoleCP :: IO CUInt
-##endif
-##endif
-
--- | Run in a modified codepage where we can print UTF-8 values on Windows.
-withUnicode :: IO a -> IO a
-##ifdef USE_CP
-withUnicode m = do
- cp <- c_GetConsoleCP
- (c_SetConsoleCP 65001 >> m) `finally` c_SetConsoleCP cp
-##else
-withUnicode m = m
-##endif
-
-main :: IO ()
-main = withUnicode $ getSources >>= \sources -> doctest $
- "-isrc"
- : "-idist/build/autogen"
- : "-optP-include"
- : "-optPdist/build/autogen/cabal_macros.h"
- : "-hide-all-packages"
- : map ("-package="++) deps ++ sources
-
-getSources :: IO [FilePath]
-getSources = filter (isSuffixOf ".hs") <$> go "src"
- where
- go dir = do
- (dirs, files) <- getFilesAndDirectories dir
- (files ++) . concat <$> mapM go dirs
-
-getFilesAndDirectories :: FilePath -> IO ([FilePath], [FilePath])
-getFilesAndDirectories dir = do
- c <- map (dir </>) . filter (`notElem` ["..", "."]) <$> getDirectoryContents
dir
- (,) <$> filterM doesDirectoryExist c <*> filterM doesFileExist c