openSUSE Commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
September 2020
- 1 participants
- 2706 discussions
Hello community,
here is the log from the commit of package tigervnc for openSUSE:Factory checked in at 2020-09-30 19:54:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tigervnc (Old)
and /work/SRC/openSUSE:Factory/.tigervnc.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "tigervnc"
Wed Sep 30 19:54:00 2020 rev:71 rq:838621 version:1.10.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/tigervnc/tigervnc.changes 2020-09-29 18:59:22.289596236 +0200
+++ /work/SRC/openSUSE:Factory/.tigervnc.new.4249/tigervnc.changes 2020-09-30 19:54:15.000777126 +0200
@@ -4 +4,5 @@
-- U_0001-Properly-store-certificate-exceptions.patch,
+- CVE-2020-26117: Server certificates were stored as certiticate
+ authoritied, allowing malicious owners of these certificates
+ to impersonate any server after a client had added an exception
+ (boo#1176733)
+ U_0001-Properly-store-certificate-exceptions.patch,
@@ -6 +9,0 @@
- * Properly store certificate exceptions (boo#1176733)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
1
0
Hello community,
here is the log from the commit of package valgrind for openSUSE:Factory checked in at 2020-09-30 19:53:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/valgrind (Old)
and /work/SRC/openSUSE:Factory/.valgrind.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "valgrind"
Wed Sep 30 19:53:55 2020 rev:128 rq:838585 version:3.16.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/valgrind/valgrind.changes 2020-08-19 18:46:40.159523395 +0200
+++ /work/SRC/openSUSE:Factory/.valgrind.new.4249/valgrind.changes 2020-09-30 19:54:13.380775678 +0200
@@ -4 +4 @@
-- update to 3.16.1:
+- update to 3.16.1 (jsc#SLE-13769):
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
1
0
Hello community,
here is the log from the commit of package cvise for openSUSE:Factory checked in at 2020-09-30 19:53:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cvise (Old)
and /work/SRC/openSUSE:Factory/.cvise.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cvise"
Wed Sep 30 19:53:55 2020 rev:16 rq:838595 version:1.7.0+git.20200929.17345b8
Changes:
--------
--- /work/SRC/openSUSE:Factory/cvise/cvise.changes 2020-07-30 13:34:07.934753005 +0200
+++ /work/SRC/openSUSE:Factory/.cvise.new.4249/cvise.changes 2020-09-30 19:54:10.416773028 +0200
@@ -1,0 +2,19 @@
+Tue Sep 29 15:39:22 UTC 2020 - mliska(a)suse.cz
+
+- Update to version 1.7.0+git.20200929.17345b8:
+ * Bump to v1.7.0.
+
+-------------------------------------------------------------------
+Tue Sep 29 15:33:15 UTC 2020 - mliska(a)suse.cz
+
+- Update to version 1.6.0+git.20200929.a12db89:
+ * Fix psutil core count detection code.
+ * Add OBS image at the beginning.
+ * Add icon.
+ * Add OBS master following project.
+ * Update last update Creduce commit.
+ * build_and_test.sh: resolve bash via /usr/bin/env
+ * passes/ifs.py: fix infinite loop in IfPass
+ * Fix a small type.
+
+-------------------------------------------------------------------
Old:
----
cvise-1.6.0+git.20200728.98d731e.tar.xz
New:
----
cvise-1.7.0+git.20200929.17345b8.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cvise.spec ++++++
--- /var/tmp/diff_new_pack.9NwSKg/_old 2020-09-30 19:54:11.808774272 +0200
+++ /var/tmp/diff_new_pack.9NwSKg/_new 2020-09-30 19:54:11.812774276 +0200
@@ -17,7 +17,7 @@
Name: cvise
-Version: 1.6.0+git.20200728.98d731e
+Version: 1.7.0+git.20200929.17345b8
Release: 0
Summary: Super-parallel Python port of the C-Reduce
License: BSD-3-Clause
++++++ _service ++++++
--- /var/tmp/diff_new_pack.9NwSKg/_old 2020-09-30 19:54:11.852774312 +0200
+++ /var/tmp/diff_new_pack.9NwSKg/_new 2020-09-30 19:54:11.852774312 +0200
@@ -4,7 +4,7 @@
<param name="scm">git</param>
<param name="changesgenerate">enable</param>
<param name="filename">cvise</param>
- <param name="versionformat">1.6.0+git.%cd.%h</param>
+ <param name="versionformat">1.7.0+git.%cd.%h</param>
</service>
<service mode="disabled" name="recompress">
<param name="file">*.tar</param>
++++++ cvise-1.6.0+git.20200728.98d731e.tar.xz -> cvise-1.7.0+git.20200929.17345b8.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.6.0+git.20200728.98d731e/CMakeLists.txt new/cvise-1.7.0+git.20200929.17345b8/CMakeLists.txt
--- old/cvise-1.6.0+git.20200728.98d731e/CMakeLists.txt 2020-07-28 10:27:08.000000000 +0200
+++ new/cvise-1.7.0+git.20200929.17345b8/CMakeLists.txt 2020-09-29 17:35:22.000000000 +0200
@@ -122,11 +122,11 @@
set(cvise_PACKAGE "cvise")
set(cvise_PACKAGE_BUGREPORT "https://github.com/marxin/cvise/issues")
set(cvise_PACKAGE_NAME "cvise")
-set(cvise_PACKAGE_STRING "cvise 1.6.0")
+set(cvise_PACKAGE_STRING "cvise 1.7.0")
set(cvise_PACKAGE_TARNAME "cvise")
set(cvise_PACKAGE_URL "https://github.com/marxin/cvise/")
-set(cvise_PACKAGE_VERSION "1.6.0")
-set(cvise_VERSION "1.6.0")
+set(cvise_PACKAGE_VERSION "1.7.0")
+set(cvise_VERSION "1.7.0")
set(cvise_LLVM_VERSION "${LLVM_PACKAGE_VERSION}")
configure_file("cmake_config.h.in" "${PROJECT_BINARY_DIR}/config.h")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.6.0+git.20200728.98d731e/CREDUCE_MERGE new/cvise-1.7.0+git.20200929.17345b8/CREDUCE_MERGE
--- old/cvise-1.6.0+git.20200728.98d731e/CREDUCE_MERGE 2020-07-28 10:27:08.000000000 +0200
+++ new/cvise-1.7.0+git.20200929.17345b8/CREDUCE_MERGE 2020-09-29 17:35:22.000000000 +0200
@@ -1,2 +1,2 @@
Last cherry-picked git revision:
-274e1fe5210b379fbfdca9a565715d2db1df2d04
+c32c5c327758a047ae10e55a2465ba54293dfff9
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.6.0+git.20200728.98d731e/INSTALL.md new/cvise-1.7.0+git.20200929.17345b8/INSTALL.md
--- old/cvise-1.6.0+git.20200728.98d731e/INSTALL.md 2020-07-28 10:27:08.000000000 +0200
+++ new/cvise-1.7.0+git.20200929.17345b8/INSTALL.md 2020-09-29 17:35:22.000000000 +0200
@@ -3,7 +3,7 @@
## Using a Package Manager
Before compiling C-Vise yourself, you might want to see if your OS
-comes with a precompiled package for C-Vise.
+comes with a pre-compiled package for C-Vise.
### openSUSE Tumbleweed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.6.0+git.20200728.98d731e/README.md new/cvise-1.7.0+git.20200929.17345b8/README.md
--- old/cvise-1.6.0+git.20200728.98d731e/README.md 2020-07-28 10:27:08.000000000 +0200
+++ new/cvise-1.7.0+git.20200929.17345b8/README.md 2020-09-29 17:35:22.000000000 +0200
@@ -1,5 +1,6 @@
# C-Vise
+[![OBS master](https://build.opensuse.org/assets/favicon-ac48595b97f38c2425d7ea777…
[![Travis Build Status](https://travis-ci.com/marxin/cvise.svg?branch=master)](https://trav…
[![Total alerts](https://img.shields.io/lgtm/alerts/g/marxin/cvise.svg?logo=lgtm&log…
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/marxin/cvise.svg?logo=lg…
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.6.0+git.20200728.98d731e/build_and_test.sh new/cvise-1.7.0+git.20200929.17345b8/build_and_test.sh
--- old/cvise-1.6.0+git.20200728.98d731e/build_and_test.sh 2020-07-28 10:27:08.000000000 +0200
+++ new/cvise-1.7.0+git.20200929.17345b8/build_and_test.sh 2020-09-29 17:35:22.000000000 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/bash
+#!/usr/bin/env bash
BUILD_TYPE=$1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.6.0+git.20200728.98d731e/cvise/passes/ifs.py new/cvise-1.7.0+git.20200929.17345b8/cvise/passes/ifs.py
--- old/cvise-1.6.0+git.20200728.98d731e/cvise/passes/ifs.py 2020-07-28 10:27:08.000000000 +0200
+++ new/cvise-1.7.0+git.20200929.17345b8/cvise/passes/ifs.py 2020-09-29 17:35:22.000000000 +0200
@@ -39,10 +39,12 @@
def advance(self, test_case, state):
if state.value == 0:
+ state = state.copy()
state.value = 1
else:
- state.advance()
- state.value = 0
+ state = state.advance()
+ if state:
+ state.value = 0
return state
def advance_on_success(self, test_case, state):
@@ -63,12 +65,11 @@
if self.line_regex.search(line):
if state.index <= i and i < state.end():
- tmp_file.write('#if {0}\n'.format(state.value))
+ if self.__macro_continues(line):
+ in_multiline = True
+ line = '#if {0}\n'.format(state.value)
i += 1
- if self.__macro_continues(line):
- in_multiline = True
- else:
- tmp_file.write(line)
+ tmp_file.write(line)
cmd = [self.external_programs["unifdef"], "-B", "-x", "2", "-k", "-o", test_case, tmp_file.name]
stdout, stderr, returncode = process_event_notifier.run_process(cmd)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.6.0+git.20200728.98d731e/cvise/tests/test_ifs.py new/cvise-1.7.0+git.20200929.17345b8/cvise/tests/test_ifs.py
--- old/cvise-1.6.0+git.20200728.98d731e/cvise/tests/test_ifs.py 2020-07-28 10:27:08.000000000 +0200
+++ new/cvise-1.7.0+git.20200929.17345b8/cvise/tests/test_ifs.py 2020-09-29 17:35:22.000000000 +0200
@@ -25,3 +25,51 @@
os.unlink(tmp_file.name)
self.assertEqual(variant, "int a = 2;\n")
+
+ def test_two_steps(self):
+ self.maxDiff = None
+ in_contents = (
+ "#if FOO\nint foo = 1;\n#else\nint foo = 0;\n#endif\n" +
+ "#if BAR\nint bar = 1;\n#else\nint bar = 0;\n#endif\n"
+ )
+ expected_outs = [
+ # ix val chunk contents
+ # FOO=0 BAR=0
+ (0, 0, 2, 'int foo = 0;\nint bar = 0;\n'),
+ # FOO=1 BAR=1
+ (0, 1, 2, 'int foo = 1;\nint bar = 1;\n'),
+
+ # FOO=0
+ (0, 0, 1, ('int foo = 0;\n' +
+ '#if BAR\nint bar = 1;\n#else\nint bar = 0;\n#endif\n')),
+ # FOO=1
+ (0, 1, 1, ('int foo = 1;\n' +
+ '#if BAR\nint bar = 1;\n#else\nint bar = 0;\n#endif\n')),
+ # BAR=0
+ (1, 0, 1, ('#if FOO\nint foo = 1;\n#else\nint foo = 0;\n#endif\n' +
+ 'int bar = 0;\n')),
+ # BAR=1
+ (1, 1, 1, ('#if FOO\nint foo = 1;\n#else\nint foo = 0;\n#endif\n' +
+ 'int bar = 1;\n')),
+ ]
+
+ with tempfile.NamedTemporaryFile(mode="w", delete=False) as tf:
+ tf.write(in_contents)
+
+ outs = []
+
+ # perform all iterations. They should iterate through FOO/!FOO x BAR/!BAR.
+ state = self.pass_.new(tf.name)
+ while state:
+ with tempfile.NamedTemporaryFile(mode="w", delete=False) as tmp_file:
+ tmp_file.write(in_contents)
+
+ (_, state) = self.pass_.transform(tmp_file.name, state, self.process_event_notifier)
+ with open(tmp_file.name) as variant_file:
+ variant = variant_file.read()
+ outs.append(tuple([state.index, state.value, state.chunk, variant]))
+ os.unlink(tmp_file.name)
+ state = self.pass_.advance(tmp_file.name, state)
+
+ os.unlink(tf.name)
+ self.assertEqual(expected_outs, outs)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cvise-1.6.0+git.20200728.98d731e/cvise.py new/cvise-1.7.0+git.20200929.17345b8/cvise.py
--- old/cvise-1.6.0+git.20200728.98d731e/cvise.py 2020-07-28 10:27:08.000000000 +0200
+++ new/cvise-1.7.0+git.20200929.17345b8/cvise.py 2020-09-29 17:35:22.000000000 +0200
@@ -134,10 +134,14 @@
# in order to speed up parallel execution
core_count = psutil.cpu_count(logical=False)
if not core_count:
- psutil.cpu_count(logical=True)
+ core_count = psutil.cpu_count(logical=True)
# respect affinity
affinity = len(psutil.Process().cpu_affinity())
- core_count = min(core_count, affinity)
+ assert affinity >= 1
+ if core_count:
+ core_count = min(core_count, affinity)
+ else:
+ core_count = affinity
except NotImplementedError:
core_count = 1
1
0
Hello community,
here is the log from the commit of package texmath for openSUSE:Factory checked in at 2020-09-30 19:53:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/texmath (Old)
and /work/SRC/openSUSE:Factory/.texmath.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "texmath"
Wed Sep 30 19:53:53 2020 rev:38 rq:838502 version:0.12.0.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/texmath/texmath.changes 2020-08-28 21:42:28.664911561 +0200
+++ /work/SRC/openSUSE:Factory/.texmath.new.4249/texmath.changes 2020-09-30 19:54:01.552765104 +0200
@@ -1,0 +2,8 @@
+Tue Sep 22 09:33:28 UTC 2020 - psimons(a)suse.com
+
+- Update texmath to version 0.12.0.3.
+ texmath (0.12.0.3)
+
+ * Allow pandoc-types 1.22.
+
+-------------------------------------------------------------------
Old:
----
texmath-0.12.0.2.tar.gz
New:
----
texmath-0.12.0.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ texmath.spec ++++++
--- /var/tmp/diff_new_pack.sjpIJc/_old 2020-09-30 19:54:03.424766778 +0200
+++ /var/tmp/diff_new_pack.sjpIJc/_new 2020-09-30 19:54:03.428766781 +0200
@@ -19,7 +19,7 @@
%global pkg_name texmath
%bcond_with tests
Name: %{pkg_name}
-Version: 0.12.0.2
+Version: 0.12.0.3
Release: 0
Summary: Conversion between formats used to represent mathematics
License: GPL-2.0-or-later
++++++ texmath-0.12.0.2.tar.gz -> texmath-0.12.0.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texmath-0.12.0.2/changelog new/texmath-0.12.0.3/changelog
--- old/texmath-0.12.0.2/changelog 2020-04-19 17:11:21.000000000 +0200
+++ new/texmath-0.12.0.3/changelog 2020-09-19 19:19:52.000000000 +0200
@@ -1,3 +1,7 @@
+texmath (0.12.0.3)
+
+ * Allow pandoc-types 1.22.
+
texmath (0.12.0.2)
* Allow pandoc-types 1.21.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texmath-0.12.0.2/texmath.cabal new/texmath-0.12.0.3/texmath.cabal
--- old/texmath-0.12.0.2/texmath.cabal 2020-04-19 17:10:17.000000000 +0200
+++ new/texmath-0.12.0.3/texmath.cabal 2020-09-19 19:19:39.000000000 +0200
@@ -1,5 +1,5 @@
Name: texmath
-Version: 0.12.0.2
+Version: 0.12.0.3
Cabal-Version: >= 1.10
Build-type: Simple
Synopsis: Conversion between formats used to represent mathematics.
@@ -87,7 +87,7 @@
Library
Build-depends: base >= 4.8 && < 5, syb >= 0.4.2 && < 0.8, xml, parsec >= 3, containers,
- pandoc-types >= 1.20 && < 1.22, mtl, text
+ pandoc-types >= 1.20 && < 1.23, mtl, text
Exposed-modules: Text.TeXMath,
Text.TeXMath.Types,
@@ -130,7 +130,7 @@
if flag(executable)
Buildable: True
Build-Depends: base >= 4.8 && < 5, texmath, xml,
- pandoc-types >= 1.20 && < 1.22,
+ pandoc-types >= 1.20 && < 1.23,
aeson, bytestring, text
else
Buildable: False
1
0
Hello community,
here is the log from the commit of package liquidhaskell for openSUSE:Factory checked in at 2020-09-30 19:53:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/liquidhaskell (Old)
and /work/SRC/openSUSE:Factory/.liquidhaskell.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "liquidhaskell"
Wed Sep 30 19:53:51 2020 rev:3 rq:838501 version:0.8.10.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/liquidhaskell/liquidhaskell.changes 2020-09-27 11:49:14.032008371 +0200
+++ /work/SRC/openSUSE:Factory/.liquidhaskell.new.4249/liquidhaskell.changes 2020-09-30 19:53:56.076760209 +0200
@@ -1,0 +2,6 @@
+Sat Sep 19 02:00:44 UTC 2020 - psimons(a)suse.com
+
+- Update liquidhaskell to version 0.8.10.2 revision 1.
+ Upstream has revised the Cabal build instructions on Hackage.
+
+-------------------------------------------------------------------
New:
----
liquidhaskell.cabal
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ liquidhaskell.spec ++++++
--- /var/tmp/diff_new_pack.cjAgxB/_old 2020-09-30 19:53:57.628761595 +0200
+++ /var/tmp/diff_new_pack.cjAgxB/_new 2020-09-30 19:53:57.628761595 +0200
@@ -25,6 +25,7 @@
License: BSD-3-Clause
URL: https://hackage.haskell.org/package/%{name}
Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.t…
+Source1: https://hackage.haskell.org/package/%{name}-%{version}/revision/1.cabal#/%{…
Patch1: fix-build-with-diff-0.4.x-part-1.patch
Patch2: fix-build-with-diff-0.4.x-part-2.patch
BuildRequires: chrpath
++++++ liquidhaskell.cabal ++++++
cabal-version: 2.4
name: liquidhaskell
version: 0.8.10.2
x-revision: 1
synopsis: Liquid Types for Haskell
description: Liquid Types for Haskell.
license: BSD-3-Clause
license-file: LICENSE
copyright: 2010-19 Ranjit Jhala & Niki Vazou & Eric L. Seidel, University of California, San Diego.
author: Ranjit Jhala, Niki Vazou, Eric Seidel
maintainer: Ranjit Jhala <jhala(a)cs.ucsd.edu>
category: Language
homepage: https://github.com/ucsd-progsys/liquidhaskell
build-type: Simple
tested-with: GHC == 8.6.5, GHC == 8.10.1
extra-source-files: CHANGES.md
README.md
devel/Paths_liquidhaskell.hs
tests/pos/*.hs
tests/neg/*.hs
tests/import/lib/*.hs
tests/import/client/*.hs
tests/errors/*.hs
tests/pos/*.hquals
tests/ffi-include/foo.c
tests/ffi-include/foo.h
data-files: include/*.hquals
include/*.hs
include/*.spec
include/CoreToLogic.lg
include/Control/*.spec
include/Control/Parallel/*.spec
include/Data/*.hquals
include/Data/*.spec
include/Data/Text/*.spec
include/Data/Text/Fusion/*.spec
include/Data/Text/Lazy/*.spec
include/Data/ByteString/*.spec
include/Foreign/*.spec
include/Foreign/C/*.spec
include/Foreign/Marshal/*.spec
include/GHC/*.hquals
include/GHC/*.spec
include/GHC/IO/*.spec
include/Language/Haskell/Liquid/*.hs
include/Language/Haskell/Liquid/Synthesize/*.hs
include/Language/Haskell/Liquid/*.pred
include/System/*.spec
include/710/Data/*.spec
syntax/liquid.css
-- Remove the lines above once we switch to the source plugin.
include/*.hs
include/Language/Haskell/Liquid/*.hs
include/Language/Haskell/Liquid/*.pred
-- Needed for the mirror-modules helper
mirror-modules/templates/MirrorModule.mustache
source-repository head
type: git
location: https://github.com/ucsd-progsys/liquidhaskell/
flag include
default: False
description: use in-tree include directory
flag deterministic-profiling
default: False
description: Support building against GHC with <https://phabricator.haskell.org/D4388>
backported
flag no-plugin
default: False
manual: True
description: Use the legacy executable for testing.
flag mirror-modules-helper
default: False
manual: True
description: Build the "mirror-modules" helper executable.
library
autogen-modules: Paths_liquidhaskell
exposed-modules: Gradual.Concretize
Gradual.GUI
Gradual.GUI.Annotate
Gradual.GUI.Misc
Gradual.GUI.Types
Gradual.Misc
Gradual.PrettyPrinting
Gradual.Refinements
Gradual.Trivial
Gradual.Types
Gradual.Uniquify
Language.Haskell.Liquid.Cabal
Language.Haskell.Liquid.Bare
Language.Haskell.Liquid.Bare.Axiom
Language.Haskell.Liquid.Bare.Check
Language.Haskell.Liquid.Bare.Class
Language.Haskell.Liquid.Bare.DataType
Language.Haskell.Liquid.Bare.Expand
Language.Haskell.Liquid.Bare.Laws
Language.Haskell.Liquid.Bare.Measure
Language.Haskell.Liquid.Bare.Misc
Language.Haskell.Liquid.Bare.Plugged
Language.Haskell.Liquid.Bare.Resolve
Language.Haskell.Liquid.Bare.ToBare
Language.Haskell.Liquid.Bare.Types
Language.Haskell.Liquid.Constraint.Constraint
Language.Haskell.Liquid.Constraint.Env
Language.Haskell.Liquid.Constraint.Fresh
Language.Haskell.Liquid.Constraint.Generate
Language.Haskell.Liquid.Constraint.Init
Language.Haskell.Liquid.Constraint.Monad
Language.Haskell.Liquid.Constraint.Qualifier
Language.Haskell.Liquid.Constraint.Split
Language.Haskell.Liquid.Constraint.ToFixpoint
Language.Haskell.Liquid.Constraint.Types
Language.Haskell.Liquid.GHC.API
Language.Haskell.Liquid.GHC.GhcMonadLike
Language.Haskell.Liquid.GHC.Interface
Language.Haskell.Liquid.GHC.Logging
Language.Haskell.Liquid.GHC.Misc
Language.Haskell.Liquid.GHC.Play
Language.Haskell.Liquid.GHC.Resugar
Language.Haskell.Liquid.GHC.SpanStack
Language.Haskell.Liquid.GHC.Types
Language.Haskell.Liquid.GHC.TypeRep
Language.Haskell.Liquid.Interactive.Handler
Language.Haskell.Liquid.Interactive.Types
Language.Haskell.Liquid.LawInstances
Language.Haskell.Liquid.Liquid
Language.Haskell.Liquid.Measure
Language.Haskell.Liquid.Misc
Language.Haskell.Liquid.Parse
Language.Haskell.Liquid.Synthesize.GHC
Language.Haskell.Liquid.Synthesize.Termination
Language.Haskell.Liquid.Synthesize.Monad
Language.Haskell.Liquid.Synthesize.Misc
Language.Haskell.Liquid.Synthesize.Generate
Language.Haskell.Liquid.Synthesize.Check
Language.Haskell.Liquid.Synthesize.Env
Language.Haskell.Liquid.Termination.Structural
Language.Haskell.Liquid.Transforms.ANF
Language.Haskell.Liquid.Transforms.CoreToLogic
Language.Haskell.Liquid.Transforms.Rec
Language.Haskell.Liquid.Transforms.RefSplit
Language.Haskell.Liquid.Transforms.Rewrite
Language.Haskell.Liquid.Transforms.Simplify
Language.Haskell.Liquid.Types
Language.Haskell.Liquid.Types.Bounds
Language.Haskell.Liquid.Types.Dictionaries
Language.Haskell.Liquid.Types.Equality
Language.Haskell.Liquid.Types.Errors
Language.Haskell.Liquid.Types.Fresh
Language.Haskell.Liquid.Types.Generics
Language.Haskell.Liquid.Types.Literals
Language.Haskell.Liquid.Types.Meet
Language.Haskell.Liquid.Types.Names
Language.Haskell.Liquid.Types.PredType
Language.Haskell.Liquid.Types.PrettyPrint
Language.Haskell.Liquid.Types.RefType
Language.Haskell.Liquid.Types.Specs
Language.Haskell.Liquid.Types.Types
Language.Haskell.Liquid.Types.Variance
Language.Haskell.Liquid.Types.Visitors
Language.Haskell.Liquid.Synthesize
Language.Haskell.Liquid.UX.ACSS
Language.Haskell.Liquid.UX.Annotate
Language.Haskell.Liquid.UX.CTags
Language.Haskell.Liquid.UX.CmdLine
Language.Haskell.Liquid.UX.Config
Language.Haskell.Liquid.UX.DiffCheck
Language.Haskell.Liquid.UX.Errors
Language.Haskell.Liquid.UX.QuasiQuoter
Language.Haskell.Liquid.UX.Tidy
Language.Haskell.Liquid.WiredIn
LiquidHaskell
Paths_liquidhaskell
-- FIXME: Temporary measure to ensure that if the source plugin is available, then:
-- 1. we compile it;
-- 2. We don't rely on the \"liquid-prelude\" Haskell files previously shipped as part of LH itself.
-- Once the source plugin is out, we should also removed the duplicate \"liquid-prelude\" files from
-- the \"include\" directory.
if impl(ghc >= 8.10)
exposed-modules: Language.Haskell.Liquid.GHC.Plugin
Language.Haskell.Liquid.GHC.Plugin.Tutorial
other-modules: Language.Haskell.Liquid.GHC.Plugin.SpecFinder
Language.Haskell.Liquid.GHC.Plugin.Types
Language.Haskell.Liquid.GHC.Plugin.Util
hs-source-dirs: src
else
hs-source-dirs: src include
exposed-modules: Language.Haskell.Liquid.RTick
Language.Haskell.Liquid.Prelude
Language.Haskell.Liquid.Foreign
Language.Haskell.Liquid.RTick.Combinators
Language.Haskell.Liquid.String
Language.Haskell.Liquid.List
Language.Haskell.Liquid.Equational
Language.Haskell.Liquid.Bag
Language.Haskell.Liquid.ProofCombinators
KMeansHelper
build-depends: base >= 4.11.1.0 && < 5
, Diff >= 0.3 && < 0.4
, aeson
, binary
, bytestring >= 0.10
, Cabal < 3.3
, cereal
, cmdargs >= 0.10
, containers >= 0.5
, data-default >= 0.5
, deepseq >= 1.3
, directory >= 1.2
, filepath >= 1.3
, fingertree >= 0.1
, ghc
, ghc-boot
, ghc-paths >= 0.1
, ghc-prim
, gitrev
, hashable >= 1.3
, hscolour >= 1.22
, liquid-fixpoint >= 0.8.10.1 && < 0.8.10.2.1
, mtl >= 2.1
, optics >= 0.2
, optparse-applicative < 0.16.0.0
, optparse-simple
, githash
, parsec >= 3.1
, pretty >= 1.1
, split
, syb >= 0.4.4
, template-haskell >= 2.9
, temporary >= 1.2
, text >= 1.2
, time >= 1.4
, time
, transformers >= 0.3
, unordered-containers >= 0.2
, vector >= 0.10
, extra
default-language: Haskell98
default-extensions: PatternGuards, RecordWildCards, DoAndIfThenElse
ghc-options: -W -fwarn-missing-signatures
if flag(include)
hs-source-dirs: devel
if flag(deterministic-profiling)
cpp-options: -DDETERMINISTIC_PROFILING
if impl(ghc < 8.10) || flag(no-plugin)
cpp-options: -DLIQUID_NO_PLUGIN
-- This is the (legacy) 'liquid' executable which uses the old GHC Interface.
executable liquid
main-is: exe/Liquid.hs
build-depends: base >= 4.9.1.0 && < 5, liquidhaskell
default-language: Haskell98
default-extensions: PatternGuards
ghc-options: -W -threaded -fdefer-typed-holes
test-suite test
type: exitcode-stdio-1.0
main-is: test.hs
other-modules: Paths_liquidhaskell
hs-source-dirs: tests
build-depends: base >= 4.8.1.0 && < 5
, containers >= 0.5
, directory >= 1.2
, filepath >= 1.3
, mtl >= 2.1
, optparse-applicative >= 0.11
, process >= 1.2
, stm >= 2.4
, string-conv >= 0.1
, tagged >= 0.7.3
, tasty >= 0.10 && < 1.3
, tasty-ant-xml
, tasty-golden >= 2.0.0
, tasty-hunit >= 0.9
, tasty-rerun >= 1.1
, text
, transformers >= 0.3
default-language: Haskell98
ghc-options: -W -threaded
if !flag(no-plugin)
cpp-options: -DUSE_NEW_EXECUTABLE
test-suite liquidhaskell-parser
type: exitcode-stdio-1.0
main-is: Parser.hs
other-modules: Paths_liquidhaskell
hs-source-dirs: tests
build-depends: base >= 4.8.1.0 && < 5
, liquid-fixpoint >= 0.8.10.1 && < 0.8.10.2.1
, liquidhaskell
, parsec
, syb
, tasty >= 0.10
, tasty-ant-xml
, tasty-hunit >= 0.9
default-language: Haskell2010
ghc-options: -W
test-suite synthesis
type: exitcode-stdio-1.0
main-is: Synthesis.hs
other-modules: Paths_liquidhaskell
hs-source-dirs: tests
build-depends: base >= 4.8.1.0 && < 5
, liquid-fixpoint >= 0.8.10.1 && < 0.8.10.2.1
, liquidhaskell
, tasty >= 0.7
, tasty-hunit
, process
, filepath
, text
, directory
, ghc
, extra
default-language: Haskell2010
ghc-options: -W
-- This executable can be used to generate modules for mirror-packages.
executable mirror-modules
main-is: Main.hs
hs-source-dirs: mirror-modules
other-modules: CLI
Paths_liquidhaskell
if flag(mirror-modules-helper)
build-depends: base >= 4.9.1.0 && < 5
, shelly < 1.10
, text < 1.3
, filepath < 1.5
, containers < 0.7
, mustache < 2.4
, optparse-applicative < 0.16.1.0
buildable: True
else
buildable: False
default-language: Haskell2010
default-extensions:
OverloadedStrings
RecordWildCards
MultiWayIf
LambdaCase
ghc-options: -W -threaded
1
0
Hello community,
here is the log from the commit of package hpack for openSUSE:Factory checked in at 2020-09-30 19:53:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hpack (Old)
and /work/SRC/openSUSE:Factory/.hpack.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hpack"
Wed Sep 30 19:53:49 2020 rev:19 rq:838500 version:0.34.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/hpack/hpack.changes 2020-08-28 21:42:18.736907905 +0200
+++ /work/SRC/openSUSE:Factory/.hpack.new.4249/hpack.changes 2020-09-30 19:53:53.868758234 +0200
@@ -1,0 +2,27 @@
+Tue Sep 29 09:33:30 UTC 2020 - psimons(a)suse.com
+
+- Update hpack to version 0.34.2.
+ ## Changes in 0.34.2
+ - Accept subcomponents as dependencies (close #382)
+
+ ## Changes in 0.34.1
+ - Fix a bug in `github: ...` introduced with `0.34.0`
+ (f63eb19b956517b4dd8e28dc5785be5889a99298)
+
+ ## Changes in 0.34.0 (deprecated)
+ - Use `PreferNoHash` as default `GenerateHashStrategy`
+ - Add support for library `visibility` (see #382)
+ - Reject URLs for `github`
+
+ ## Changes in 0.33.1
+ - Add `GenerateHashStrategy`. The default is `PreferHash` for `0.33.0` and
+ will change to `PreferNoHash` with `0.34.0`. See
+ https://github.com/sol/hpack/pull/390) for details.
+
+ - Add command-line options `--hash` and `--no-hash`
+
+ ## Changes in 0.33.0.1
+ - Silently ignore missing hash when the cabal file content didn't change at
+ all (for forward compatibility with #390)
+
+-------------------------------------------------------------------
Old:
----
_constraints
hpack-0.33.0.tar.gz
New:
----
hpack-0.34.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ hpack.spec ++++++
--- /var/tmp/diff_new_pack.kSuTYw/_old 2020-09-30 19:53:54.452758756 +0200
+++ /var/tmp/diff_new_pack.kSuTYw/_new 2020-09-30 19:53:54.456758761 +0200
@@ -19,7 +19,7 @@
%global pkg_name hpack
%bcond_with tests
Name: %{pkg_name}
-Version: 0.33.0
+Version: 0.34.2
Release: 0
Summary: A modern format for Haskell packages
License: MIT
@@ -78,7 +78,7 @@
This package provides the Haskell %{name} library development files.
%prep
-%setup -q
+%autosetup
%build
%ghc_lib_build
++++++ hpack-0.33.0.tar.gz -> hpack-0.34.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hpack-0.33.0/CHANGELOG.md new/hpack-0.34.2/CHANGELOG.md
--- old/hpack-0.33.0/CHANGELOG.md 2019-10-11 15:27:22.000000000 +0200
+++ new/hpack-0.34.2/CHANGELOG.md 2020-06-02 13:30:52.000000000 +0200
@@ -1,3 +1,26 @@
+## Changes in 0.34.2
+ - Accept subcomponents as dependencies (close #382)
+
+## Changes in 0.34.1
+ - Fix a bug in `github: ...` introduced with `0.34.0`
+ (f63eb19b956517b4dd8e28dc5785be5889a99298)
+
+## Changes in 0.34.0 (deprecated)
+ - Use `PreferNoHash` as default `GenerateHashStrategy`
+ - Add support for library `visibility` (see #382)
+ - Reject URLs for `github`
+
+## Changes in 0.33.1
+ - Add `GenerateHashStrategy`. The default is `PreferHash` for `0.33.0` and
+ will change to `PreferNoHash` with `0.34.0`. See
+ https://github.com/sol/hpack/pull/390) for details.
+
+ - Add command-line options `--hash` and `--no-hash`
+
+## Changes in 0.33.0.1
+ - Silently ignore missing hash when the cabal file content didn't change at
+ all (for forward compatibility with #390)
+
## Changes in 0.33.0
- Support GHC 8.8.1: `fail` is no longer a part of `Monad`. Instead, it lives
in the `MonadFail` class. Adapting our code to this change meant changing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hpack-0.33.0/hpack.cabal new/hpack-0.34.2/hpack.cabal
--- old/hpack-0.33.0/hpack.cabal 2019-10-11 15:27:22.000000000 +0200
+++ new/hpack-0.34.2/hpack.cabal 2020-06-02 13:30:52.000000000 +0200
@@ -1,13 +1,11 @@
cabal-version: 1.12
--- This file has been generated from package.yaml by hpack version 0.32.0.
+-- This file has been generated from package.yaml by hpack version 0.34.2.
--
-- see: https://github.com/sol/hpack
---
--- hash: dc706425edd9fa60b9662cefde8da5d890fb9cf19c8f0f9e01733b763bfcd06a
name: hpack
-version: 0.33.0
+version: 0.34.2
synopsis: A modern format for Haskell packages
description: See README at <https://github.com/sol/hpack#readme>
category: Development
@@ -29,7 +27,7 @@
src
ghc-options: -Wall
build-depends:
- Cabal >=2.2
+ Cabal >=3.0.0.0
, Glob >=0.9.0
, aeson >=1.4.3.0
, base >=4.9 && <5
@@ -85,7 +83,7 @@
driver
ghc-options: -Wall
build-depends:
- Cabal >=2.2
+ Cabal >=3.0.0.0
, Glob >=0.9.0
, aeson >=1.4.3.0
, base >=4.9 && <5
@@ -121,7 +119,7 @@
ghc-options: -Wall
cpp-options: -DTEST
build-depends:
- Cabal >=2.2
+ Cabal >=3.0.0.0
, Glob >=0.9.0
, HUnit >=1.6.0.0
, QuickCheck
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hpack-0.33.0/src/Hpack/CabalFile.hs new/hpack-0.34.2/src/Hpack/CabalFile.hs
--- old/hpack-0.33.0/src/Hpack/CabalFile.hs 2019-10-11 15:27:22.000000000 +0200
+++ new/hpack-0.34.2/src/Hpack/CabalFile.hs 2020-06-02 13:30:52.000000000 +0200
@@ -16,7 +16,8 @@
makeVersion v = Version v []
data CabalFile = CabalFile {
- cabalFileHpackVersion :: Maybe Version
+ cabalFileCabalVersion :: [String]
+, cabalFileHpackVersion :: Maybe Version
, cabalFileHash :: Maybe Hash
, cabalFileContents :: [String]
} deriving (Eq, Show)
@@ -25,13 +26,13 @@
readCabalFile cabalFile = fmap parse <$> tryReadFile cabalFile
where
parse :: String -> CabalFile
- parse (splitHeader -> (h, c)) = CabalFile (extractVersion h) (extractHash h) c
+ parse (splitHeader -> (cabalVersion, h, c)) = CabalFile cabalVersion (extractVersion h) (extractHash h) c
- splitHeader :: String -> ([String], [String])
+ splitHeader :: String -> ([String], [String], [String])
splitHeader (removeGitConflictMarkers . lines -> c) =
case span (not . isComment) c of
(cabalVersion, xs) -> case span isComment xs of
- (header, body) -> (header, cabalVersion ++ dropWhile null body)
+ (header, body) -> (cabalVersion, header, dropWhile null body)
isComment = ("--" `isPrefixOf`)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hpack-0.33.0/src/Hpack/Config.hs new/hpack-0.34.2/src/Hpack/Config.hs
--- old/hpack-0.33.0/src/Hpack/Config.hs 2019-10-11 15:27:22.000000000 +0200
+++ new/hpack-0.34.2/src/Hpack/Config.hs 2020-06-02 13:30:52.000000000 +0200
@@ -39,6 +39,7 @@
, section
, Package(..)
, Dependencies(..)
+, DependencyInfo(..)
, VersionConstraint(..)
, DependencyVersion(..)
, SourceDependency(..)
@@ -195,6 +196,7 @@
data LibrarySection = LibrarySection {
librarySectionExposed :: Maybe Bool
+, librarySectionVisibility :: Maybe String
, librarySectionExposedModules :: Maybe (List String)
, librarySectionGeneratedExposedModules :: Maybe (List String)
, librarySectionOtherModules :: Maybe (List String)
@@ -204,12 +206,13 @@
} deriving (Eq, Show, Generic, FromValue)
instance Monoid LibrarySection where
- mempty = LibrarySection Nothing Nothing Nothing Nothing Nothing Nothing Nothing
+ mempty = LibrarySection Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing
mappend = (<>)
instance Semigroup LibrarySection where
a <> b = LibrarySection {
librarySectionExposed = librarySectionExposed b <|> librarySectionExposed a
+ , librarySectionVisibility = librarySectionVisibility b <|> librarySectionVisibility a
, librarySectionExposedModules = librarySectionExposedModules a <> librarySectionExposedModules b
, librarySectionGeneratedExposedModules = librarySectionGeneratedExposedModules a <> librarySectionGeneratedExposedModules b
, librarySectionOtherModules = librarySectionOtherModules a <> librarySectionOtherModules b
@@ -531,7 +534,7 @@
, packageConfigExtraDocFiles :: Maybe (List FilePath)
, packageConfigDataFiles :: Maybe (List FilePath)
, packageConfigDataDir :: Maybe FilePath
-, packageConfigGithub :: Maybe Text
+, packageConfigGithub :: Maybe GitHub
, packageConfigGit :: Maybe String
, packageConfigCustomSetup :: Maybe CustomSetupSection
, packageConfigLibrary :: Maybe library
@@ -542,6 +545,20 @@
, packageConfigBenchmarks :: Maybe (Map String executable)
} deriving Generic
+data GitHub = GitHub {
+ _gitHubOwner :: String
+, _gitHubRepo :: String
+, _gitHubSubdir :: Maybe String
+}
+
+instance FromValue GitHub where
+ fromValue v = do
+ input <- fromValue v
+ case map T.unpack $ T.splitOn "/" input of
+ [owner, repo, subdir] -> return $ GitHub owner repo (Just subdir)
+ [owner, repo] -> return $ GitHub owner repo Nothing
+ _ -> fail $ "expected owner/repo or owner/repo/subdir, but encountered " ++ show input
+
data DefaultsConfig = DefaultsConfig {
defaultsConfigDefaults :: Maybe (List Defaults)
} deriving (Generic, FromValue)
@@ -689,15 +706,14 @@
libraryCabalVersion :: Section Library -> Maybe Version
libraryCabalVersion sect = maximum [
- makeVersion [1,22] <$ guard hasReexportedModules
- , makeVersion [2,0] <$ guard hasSignatures
- , makeVersion [2,0] <$ guard hasGeneratedModules
+ makeVersion [1,22] <$ guard (has libraryReexportedModules)
+ , makeVersion [2,0] <$ guard (has librarySignatures)
+ , makeVersion [2,0] <$ guard (has libraryGeneratedModules)
+ , makeVersion [3,0] <$ guard (has libraryVisibility)
, sectionCabalVersion sect
]
where
- hasReexportedModules = any (not . null . libraryReexportedModules) sect
- hasSignatures = any (not . null . librarySignatures) sect
- hasGeneratedModules = any (not . null . libraryGeneratedModules) sect
+ has field = any (not . null . field) sect
internalLibsCabalVersion :: Map String (Section Library) -> Maybe Version
internalLibsCabalVersion internalLibraries
@@ -723,6 +739,7 @@
makeVersion [2,2] <$ guard (sectionSatisfies (not . null . sectionCxxSources) sect)
, makeVersion [2,2] <$ guard (sectionSatisfies (not . null . sectionCxxOptions) sect)
, makeVersion [2,0] <$ guard (sectionSatisfies (any hasMixins . unDependencies . sectionDependencies) sect)
+ , makeVersion [3,0] <$ guard (sectionSatisfies (any hasSubcomponents . Map.keys . unDependencies . sectionDependencies) sect)
] ++ map versionFromSystemBuildTool systemBuildTools
where
versionFromSystemBuildTool name
@@ -782,6 +799,9 @@
hasMixins :: DependencyInfo -> Bool
hasMixins (DependencyInfo mixins _) = not (null mixins)
+ hasSubcomponents :: String -> Bool
+ hasSubcomponents = elem ':'
+
decodeValue :: FromValue a => ProgramName -> FilePath -> Value -> Warnings (Errors IO) a
decodeValue (ProgramName programName) file value = do
(r, unknown) <- lift . ExceptT . return $ first (prefix ++) (Config.decodeValue value)
@@ -851,6 +871,7 @@
data Library = Library {
libraryExposed :: Maybe Bool
+, libraryVisibility :: Maybe String
, libraryExposedModules :: [String]
, libraryOtherModules :: [String]
, libraryGeneratedModules :: [String]
@@ -1146,13 +1167,10 @@
sourceRepository = github <|> (`SourceRepository` Nothing) <$> packageConfigGit
github :: Maybe SourceRepository
- github = parseGithub <$> packageConfigGithub
+ github = toSourceRepository <$> packageConfigGithub
where
- parseGithub :: Text -> SourceRepository
- parseGithub input = case map T.unpack $ T.splitOn "/" input of
- [owner, repo, subdir] ->
- SourceRepository (githubBaseUrl ++ owner ++ "/" ++ repo) (Just subdir)
- _ -> SourceRepository (githubBaseUrl ++ T.unpack input) Nothing
+ toSourceRepository :: GitHub -> SourceRepository
+ toSourceRepository (GitHub owner repo subdir) = SourceRepository (githubBaseUrl ++ owner ++ "/" ++ repo) subdir
homepage :: Maybe String
homepage = case packageConfigHomepage of
@@ -1217,7 +1235,7 @@
traverseConditionals = traverse . traverse . traverseSectionAndConditionals fConditionals fConditionals
getMentionedLibraryModules :: LibrarySection -> [String]
-getMentionedLibraryModules (LibrarySection _ exposedModules generatedExposedModules otherModules generatedOtherModules _ _)
+getMentionedLibraryModules (LibrarySection _ _ exposedModules generatedExposedModules otherModules generatedOtherModules _ _)
= fromMaybeList (exposedModules <> generatedExposedModules <> otherModules <> generatedOtherModules)
listModules :: FilePath -> Section a -> IO [String]
@@ -1254,7 +1272,7 @@
getLibraryModules Library{..} = libraryExposedModules ++ libraryOtherModules
fromLibrarySectionTopLevel pathsModule inferableModules LibrarySection{..} =
- Library librarySectionExposed exposedModules otherModules generatedModules reexportedModules signatures
+ Library librarySectionExposed librarySectionVisibility exposedModules otherModules generatedModules reexportedModules signatures
where
(exposedModules, otherModules, generatedModules) =
determineModules pathsModule inferableModules librarySectionExposedModules librarySectionGeneratedExposedModules librarySectionOtherModules librarySectionGeneratedOtherModules
@@ -1270,7 +1288,7 @@
others = maybe ((inferable \\ exposed) ++ pathsModule) fromList mOther ++ fromMaybeList mGeneratedOther
fromLibrarySectionInConditional :: [String] -> LibrarySection -> Library
-fromLibrarySectionInConditional inferableModules lib@(LibrarySection _ exposedModules _ otherModules _ _ _) =
+fromLibrarySectionInConditional inferableModules lib@(LibrarySection _ _ exposedModules _ otherModules _ _ _) =
case (exposedModules, otherModules) of
(Nothing, Nothing) -> addToOtherModules inferableModules (fromLibrarySectionPlain lib)
_ -> fromLibrarySectionPlain lib
@@ -1280,6 +1298,7 @@
fromLibrarySectionPlain :: LibrarySection -> Library
fromLibrarySectionPlain LibrarySection{..} = Library {
libraryExposed = librarySectionExposed
+ , libraryVisibility = librarySectionVisibility
, libraryExposedModules = fromMaybeList (librarySectionExposedModules <> librarySectionGeneratedExposedModules)
, libraryOtherModules = fromMaybeList (librarySectionOtherModules <> librarySectionGeneratedOtherModules)
, libraryGeneratedModules = fromMaybeList (librarySectionGeneratedOtherModules <> librarySectionGeneratedExposedModules)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hpack-0.33.0/src/Hpack/License.hs new/hpack-0.34.2/src/Hpack/License.hs
--- old/hpack-0.33.0/src/Hpack/License.hs 2019-10-11 15:27:22.000000000 +0200
+++ new/hpack-0.34.2/src/Hpack/License.hs 2020-06-02 13:30:52.000000000 +0200
@@ -10,11 +10,7 @@
import Distribution.Version (mkVersion)
import qualified Distribution.License as Cabal
import qualified Distribution.SPDX.License as SPDX
-#if MIN_VERSION_Cabal(3,0,0)
import Distribution.Parsec (eitherParsec)
-#else
-import Distribution.Parsec.Class (eitherParsec)
-#endif
import qualified Data.License.Infer as Infer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hpack-0.33.0/src/Hpack/Options.hs new/hpack-0.34.2/src/Hpack/Options.hs
--- old/hpack-0.33.0/src/Hpack/Options.hs 2019-10-11 15:27:22.000000000 +0200
+++ new/hpack-0.34.2/src/Hpack/Options.hs 2020-06-02 13:30:52.000000000 +0200
@@ -1,6 +1,9 @@
{-# LANGUAGE LambdaCase #-}
module Hpack.Options where
+import Control.Applicative
+import Control.Monad
+import Data.Maybe
import System.FilePath
import System.Directory
@@ -16,6 +19,7 @@
data ParseOptions = ParseOptions {
parseOptionsVerbose :: Verbose
, parseOptionsForce :: Force
+, parseOptionsHash :: Maybe Bool
, parseOptionsToStdout :: Bool
, parseOptionsTarget :: FilePath
} deriving (Eq, Show)
@@ -30,18 +34,30 @@
file <- expandTarget defaultTarget target
let
options
- | toStdout = ParseOptions NoVerbose Force toStdout file
- | otherwise = ParseOptions verbose force toStdout file
+ | toStdout = ParseOptions NoVerbose Force hash toStdout file
+ | otherwise = ParseOptions verbose force hash toStdout file
return (Run options)
Left err -> return err
where
silentFlag = "--silent"
forceFlags = ["--force", "-f"]
+ hashFlag = "--hash"
+ noHashFlag = "--no-hash"
- flags = silentFlag : forceFlags
+ flags = hashFlag : noHashFlag : silentFlag : forceFlags
+ verbose :: Verbose
verbose = if silentFlag `elem` args then NoVerbose else Verbose
+
+ force :: Force
force = if any (`elem` args) forceFlags then Force else NoForce
+
+ hash :: Maybe Bool
+ hash = listToMaybe . reverse $ mapMaybe parse args
+ where
+ parse :: String -> Maybe Bool
+ parse t = True <$ guard (t == hashFlag) <|> False <$ guard (t == noHashFlag)
+
ys = filter (`notElem` flags) args
targets :: Either ParseResult (Maybe FilePath, Bool)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hpack-0.33.0/src/Hpack/Render.hs new/hpack-0.34.2/src/Hpack/Render.hs
--- old/hpack-0.33.0/src/Hpack/Render.hs 2019-10-11 15:27:22.000000000 +0200
+++ new/hpack-0.34.2/src/Hpack/Render.hs 2020-06-02 13:30:52.000000000 +0200
@@ -45,7 +45,6 @@
import Hpack.Config
import Hpack.Render.Hints
import Hpack.Render.Dsl
-import Hpack.Syntax.Dependencies
renderPackage :: [String] -> Package -> String
renderPackage oldCabalFile = renderPackageWith settings alignment formattingHintsFieldOrder formattingHintsSectionsFieldOrder
@@ -207,7 +206,8 @@
renderLibraryFields :: Library -> [Element]
renderLibraryFields Library{..} =
- maybe [] (return . renderExposed) libraryExposed ++ [
+ maybe [] (return . renderExposed) libraryExposed ++
+ maybe [] (return . renderVisibility) libraryVisibility ++ [
renderExposedModules libraryExposedModules
, renderOtherModules libraryOtherModules
, renderGeneratedModules libraryGeneratedModules
@@ -218,6 +218,9 @@
renderExposed :: Bool -> Element
renderExposed = Field "exposed" . Literal . show
+renderVisibility :: String -> Element
+renderVisibility = Field "visibility" . Literal
+
renderSection :: (a -> [Element]) -> [Element] -> [Element] -> Section a -> [Element]
renderSection renderSectionData extraFieldsStart extraFieldsEnd Section{..} = addVerbatim sectionVerbatim $
extraFieldsStart
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hpack-0.33.0/src/Hpack/Syntax/Dependencies.hs new/hpack-0.34.2/src/Hpack/Syntax/Dependencies.hs
--- old/hpack-0.33.0/src/Hpack/Syntax/Dependencies.hs 2019-10-11 15:27:22.000000000 +0200
+++ new/hpack-0.34.2/src/Hpack/Syntax/Dependencies.hs 2020-06-02 13:30:52.000000000 +0200
@@ -9,9 +9,12 @@
import qualified Control.Monad.Fail as Fail
import Data.Text (Text)
+import Data.List
import qualified Data.Text as T
import Data.Semigroup (Semigroup(..))
import qualified Distribution.Package as D
+import qualified Distribution.Types.LibraryName as D
+import Distribution.Pretty (prettyShow)
import Data.Map.Lazy (Map)
import qualified Data.Map.Lazy as Map
import GHC.Exts
@@ -64,4 +67,10 @@
parseDependency subject = fmap fromCabal . cabalParse subject . T.unpack
where
fromCabal :: D.Dependency -> (String, DependencyVersion)
- fromCabal d = (D.unPackageName $ D.depPkgName d, DependencyVersion Nothing . versionConstraintFromCabal $ D.depVerRange d)
+ fromCabal d = (toName (D.depPkgName d) (toList $ D.depLibraries d), DependencyVersion Nothing . versionConstraintFromCabal $ D.depVerRange d)
+
+ toName :: D.PackageName -> [D.LibraryName] -> String
+ toName package components = prettyShow package <> case components of
+ [D.LMainLibName] -> ""
+ [D.LSubLibName lib] -> ":" <> prettyShow lib
+ xs -> ":{" <> (intercalate "," $ map prettyShow [name | D.LSubLibName name <- xs]) <> "}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hpack-0.33.0/src/Hpack/Syntax/DependencyVersion.hs new/hpack-0.34.2/src/Hpack/Syntax/DependencyVersion.hs
--- old/hpack-0.33.0/src/Hpack/Syntax/DependencyVersion.hs 2019-10-11 15:27:22.000000000 +0200
+++ new/hpack-0.34.2/src/Hpack/Syntax/DependencyVersion.hs 2020-06-02 13:30:52.000000000 +0200
@@ -36,13 +36,8 @@
import Distribution.Version (VersionRangeF(..))
import qualified Distribution.Version as D
-#if MIN_VERSION_Cabal(3,0,0)
import qualified Distribution.Parsec as D
import qualified Distribution.Pretty as D
-#else
-import qualified Distribution.Parsec.Class as D
-import qualified Distribution.Text as D
-#endif
import Data.Aeson.Config.FromValue
@@ -156,11 +151,7 @@
versionConstraintFromCabal range
| D.isAnyVersion range = AnyVersion
| otherwise = VersionRange . renderStyle style .
-#if MIN_VERSION_Cabal(3,0,0)
D.pretty
-#else
- D.disp
-#endif
$ toPreCabal2VersionRange range
where
style = Style OneLineMode 0 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hpack-0.33.0/src/Hpack.hs new/hpack-0.34.2/src/Hpack.hs
--- old/hpack-0.33.0/src/Hpack.hs 2019-10-11 15:27:22.000000000 +0200
+++ new/hpack-0.34.2/src/Hpack.hs 2020-06-02 13:30:52.000000000 +0200
@@ -1,4 +1,5 @@
{-# LANGUAGE CPP #-}
+{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE RecordWildCards #-}
module Hpack (
-- | /__NOTE:__/ This module is exposed to allow integration of Hpack into
@@ -32,10 +33,12 @@
, Verbose(..)
, Options(..)
, Force(..)
+, GenerateHashStrategy(..)
#ifdef TEST
, hpackResultWithVersion
, header
+, renderCabalFile
#endif
) where
@@ -47,6 +50,7 @@
import System.Exit
import System.IO (stderr)
import Data.Aeson (Value)
+import Data.Maybe
import Paths_hpack (version)
import Hpack.Options
@@ -56,31 +60,35 @@
import Hpack.Utf8 as Utf8
import Hpack.CabalFile
-programVersion :: Version -> String
-programVersion v = "hpack version " ++ Version.showVersion v
+programVersion :: Maybe Version -> String
+programVersion Nothing = "hpack"
+programVersion (Just v) = "hpack version " ++ Version.showVersion v
-header :: FilePath -> Version -> Hash -> String
-header p v hash = unlines [
+header :: FilePath -> Maybe Version -> (Maybe Hash) -> [String]
+header p v hash = [
"-- This file has been generated from " ++ takeFileName p ++ " by " ++ programVersion v ++ "."
, "--"
, "-- see: https://github.com/sol/hpack"
- , "--"
- , "-- hash: " ++ hash
- , ""
- ]
+ ] ++ case hash of
+ Just h -> ["--" , "-- hash: " ++ h, ""]
+ Nothing -> [""]
data Options = Options {
optionsDecodeOptions :: DecodeOptions
, optionsForce :: Force
+, optionsGenerateHashStrategy :: GenerateHashStrategy
, optionsToStdout :: Bool
}
+data GenerateHashStrategy = ForceHash | ForceNoHash | PreferHash | PreferNoHash
+ deriving (Eq, Show)
+
getOptions :: FilePath -> [String] -> IO (Maybe (Verbose, Options))
getOptions defaultPackageConfig args = do
result <- parseOptions defaultPackageConfig args
case result of
PrintVersion -> do
- putStrLn (programVersion version)
+ putStrLn (programVersion $ Just version)
return Nothing
PrintNumericVersion -> do
putStrLn (Version.showVersion version)
@@ -88,9 +96,12 @@
Help -> do
printHelp
return Nothing
- Run options -> case options of
- ParseOptions verbose force toStdout file -> do
- return $ Just (verbose, Options defaultDecodeOptions {decodeOptionsTarget = file} force toStdout)
+ Run (ParseOptions verbose force hash toStdout file) -> do
+ let generateHash = case hash of
+ Just True -> ForceHash
+ Just False -> ForceNoHash
+ Nothing -> PreferNoHash
+ return $ Just (verbose, Options defaultDecodeOptions {decodeOptionsTarget = file} force generateHash toStdout)
ParseError -> do
printHelp
exitFailure
@@ -99,7 +110,7 @@
printHelp = do
name <- getProgName
Utf8.hPutStrLn stderr $ unlines [
- "Usage: " ++ name ++ " [ --silent ] [ --force | -f ] [ PATH ] [ - ]"
+ "Usage: " ++ name ++ " [ --silent ] [ --force | -f ] [ --[no-]hash ] [ PATH ] [ - ]"
, " " ++ name ++ " --version"
, " " ++ name ++ " --numeric-version"
, " " ++ name ++ " --help"
@@ -109,7 +120,7 @@
hpack verbose options = hpackResult options >>= printResult verbose
defaultOptions :: Options
-defaultOptions = Options defaultDecodeOptions NoForce False
+defaultOptions = Options defaultDecodeOptions NoForce PreferNoHash False
setTarget :: FilePath -> Options -> Options
setTarget target options@Options{..} =
@@ -154,41 +165,76 @@
printWarnings :: [String] -> IO ()
printWarnings = mapM_ $ Utf8.hPutStrLn stderr . ("WARNING: " ++)
-mkStatus :: [String] -> Version -> CabalFile -> Status
-mkStatus new v (CabalFile mOldVersion mHash old) = case (mOldVersion, mHash) of
- (Nothing, _) -> ExistingCabalFileWasModifiedManually
- (Just oldVersion, _) | oldVersion < makeVersion [0, 20, 0] -> Generated
- (_, Nothing) -> ExistingCabalFileWasModifiedManually
- (Just oldVersion, Just hash)
- | old == new -> OutputUnchanged
- | v < oldVersion -> AlreadyGeneratedByNewerHpack
- | sha256 (unlines old) /= hash -> ExistingCabalFileWasModifiedManually
- | otherwise -> Generated
+mkStatus :: CabalFile -> CabalFile -> Status
+mkStatus new@(CabalFile _ mNewVersion mNewHash _) existing@(CabalFile _ mExistingVersion _ _)
+ | new `hasSameContent` existing = OutputUnchanged
+ | otherwise = case mExistingVersion of
+ Nothing -> ExistingCabalFileWasModifiedManually
+ Just _
+ | mNewVersion < mExistingVersion -> AlreadyGeneratedByNewerHpack
+ | isJust mNewHash && hashMismatch existing -> ExistingCabalFileWasModifiedManually
+ | otherwise -> Generated
+
+hasSameContent :: CabalFile -> CabalFile -> Bool
+hasSameContent (CabalFile cabalVersionA _ _ a) (CabalFile cabalVersionB _ _ b) = cabalVersionA == cabalVersionB && a == b
+
+hashMismatch :: CabalFile -> Bool
+hashMismatch cabalFile = case cabalFileHash cabalFile of
+ Nothing -> False
+ Just hash -> hash /= calculateHash cabalFile
+
+calculateHash :: CabalFile -> Hash
+calculateHash (CabalFile cabalVersion _ _ body) = sha256 (unlines $ cabalVersion ++ body)
hpackResult :: Options -> IO Result
hpackResult = hpackResultWithVersion version
hpackResultWithVersion :: Version -> Options -> IO Result
-hpackResultWithVersion v (Options options force toStdout) = do
- DecodeResult pkg cabalVersion cabalFile warnings <- readPackageConfig options >>= either die return
- oldCabalFile <- readCabalFile cabalFile
- let
- body = renderPackage (maybe [] cabalFileContents oldCabalFile) pkg
- withoutHeader = cabalVersion ++ body
+hpackResultWithVersion v (Options options force generateHashStrategy toStdout) = do
+ DecodeResult pkg (lines -> cabalVersion) cabalFileName warnings <- readPackageConfig options >>= either die return
+ mExistingCabalFile <- readCabalFile cabalFileName
let
+ newCabalFile = makeCabalFile generateHashStrategy mExistingCabalFile cabalVersion v pkg
+
status = case force of
Force -> Generated
- NoForce -> maybe Generated (mkStatus (lines withoutHeader) v) oldCabalFile
+ NoForce -> maybe Generated (mkStatus newCabalFile) mExistingCabalFile
+
case status of
- Generated -> do
- let hash = sha256 withoutHeader
- out = cabalVersion ++ header (decodeOptionsTarget options) v hash ++ body
- if toStdout
- then Utf8.putStr out
- else Utf8.writeFile cabalFile out
+ Generated -> writeCabalFile options toStdout cabalFileName newCabalFile
_ -> return ()
+
return Result {
- resultWarnings = warnings
- , resultCabalFile = cabalFile
- , resultStatus = status
- }
+ resultWarnings = warnings
+ , resultCabalFile = cabalFileName
+ , resultStatus = status
+ }
+
+writeCabalFile :: DecodeOptions -> Bool -> FilePath -> CabalFile -> IO ()
+writeCabalFile options toStdout name cabalFile = do
+ write . unlines $ renderCabalFile (decodeOptionsTarget options) cabalFile
+ where
+ write = if toStdout then Utf8.putStr else Utf8.writeFile name
+
+makeCabalFile :: GenerateHashStrategy -> Maybe CabalFile -> [String] -> Version -> Package -> CabalFile
+makeCabalFile strategy mExistingCabalFile cabalVersion v pkg = cabalFile
+ where
+ cabalFile = CabalFile cabalVersion (Just v) hash body
+
+ hash
+ | shouldGenerateHash mExistingCabalFile strategy = Just $ calculateHash cabalFile
+ | otherwise = Nothing
+
+ body = lines $ renderPackage (maybe [] cabalFileContents mExistingCabalFile) pkg
+
+shouldGenerateHash :: Maybe CabalFile -> GenerateHashStrategy -> Bool
+shouldGenerateHash mExistingCabalFile strategy = case (strategy, mExistingCabalFile) of
+ (ForceHash, _) -> True
+ (ForceNoHash, _) -> False
+ (PreferHash, Nothing) -> True
+ (PreferNoHash, Nothing) -> False
+ (_, Just CabalFile {cabalFileHash = Nothing}) -> False
+ (_, Just CabalFile {cabalFileHash = Just _}) -> True
+
+renderCabalFile :: FilePath -> CabalFile -> [String]
+renderCabalFile file (CabalFile cabalVersion hpackVersion hash body) = cabalVersion ++ header file hpackVersion hash ++ body
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hpack-0.33.0/test/EndToEndSpec.hs new/hpack-0.34.2/test/EndToEndSpec.hs
--- old/hpack-0.33.0/test/EndToEndSpec.hs 2019-10-11 15:27:22.000000000 +0200
+++ new/hpack-0.34.2/test/EndToEndSpec.hs 2020-06-02 13:30:52.000000000 +0200
@@ -63,7 +63,6 @@
it "fails on unsupported spec-version" $ do
[i|
spec-version: 25.0
- dependencies: foo == bar
|] `shouldFailWith` ("The file package.yaml requires version 25.0 of the Hpack package specification, however this version of hpack only supports versions up to " ++ showVersion Hpack.version ++ ". Upgrading to the latest version of hpack may resolve this issue.")
it "fails on unsupported spec-version from defaults" $ do
@@ -111,13 +110,13 @@
describe "github" $ do
it "accepts owner/repo" $ do
[i|
- github: hspec/hspec
+ github: sol/hpack
|] `shouldRenderTo` package [i|
- homepage: https://github.com/hspec/hspec#readme
- bug-reports: https://github.com/hspec/hspec/issues
+ homepage: https://github.com/sol/hpack#readme
+ bug-reports: https://github.com/sol/hpack/issues
source-repository head
type: git
- location: https://github.com/hspec/hspec
+ location: https://github.com/sol/hpack
|]
it "accepts owner/repo/path" $ do
@@ -132,6 +131,11 @@
subdir: hspec-core
|]
+ it "rejects URLs" $ do
+ [i|
+ github: https://github.com/sol/hpack/issues/365
+ |] `shouldFailWith` "package.yaml: Error while parsing $.github - expected owner/repo or owner/repo/subdir, but encountered \"https://github.com/sol/hpack/issues/365\""
+
describe "homepage" $ do
it "accepts homepage URL" $ do
[i|
@@ -606,6 +610,15 @@
base
|]
+ it "accepts dependencies with subcomponents" $ do
+ [i|
+ executable:
+ dependencies: foo:bar
+ |] `shouldRenderTo` (executable_ "foo" [i|
+ build-depends:
+ foo:bar
+ |]) {packageCabalVersion = "3.0"}
+
it "accepts list of dependencies" $ do
[i|
executable:
@@ -1134,14 +1147,14 @@
internal-libraries:
bar:
source-dirs: src
- |] `shouldRenderTo` internalLibrary "bar" [i|
- exposed-modules:
- Foo
- other-modules:
- Paths_foo
- hs-source-dirs:
- src
- |]
+ |] `shouldRenderTo` internalLibrary "bar" [i|
+ exposed-modules:
+ Foo
+ other-modules:
+ Paths_foo
+ hs-source-dirs:
+ src
+ |]
it "warns on unknown fields" $ do
[i|
@@ -1159,6 +1172,17 @@
source-dirs: src
|] `shouldWarn` pure "Specified source-dir \"src\" does not exist"
+ it "accepts visibility" $ do
+ [i|
+ internal-libraries:
+ bar:
+ visibility: public
+ |] `shouldRenderTo` (internalLibrary "bar" [i|
+ visibility: public
+ other-modules:
+ Paths_foo
+ |]) {packageCabalVersion = "3.0"}
+
describe "executables" $ do
it "accepts arbitrary entry points as main" $ do
touch "src/Foo.hs"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hpack-0.33.0/test/Hpack/CabalFileSpec.hs new/hpack-0.34.2/test/Hpack/CabalFileSpec.hs
--- old/hpack-0.33.0/test/Hpack/CabalFileSpec.hs 2019-10-11 15:27:22.000000000 +0200
+++ new/hpack-0.34.2/test/Hpack/CabalFileSpec.hs 2020-06-02 13:30:52.000000000 +0200
@@ -9,9 +9,15 @@
import Paths_hpack (version)
+import Hpack.Util (Hash)
+import Data.Version (Version)
import Hpack (header)
+
import Hpack.CabalFile
+mkHeader :: FilePath -> Version -> Hash -> String
+mkHeader p v hash = unlines $ header p (Just v) (Just hash)
+
spec :: Spec
spec = do
describe "readCabalFile" $ do
@@ -21,13 +27,13 @@
it "includes hash" $ do
inTempDirectory $ do
- writeFile file $ header "package.yaml" version hash
- readCabalFile file `shouldReturn` Just (CabalFile (Just version) (Just hash) [])
+ writeFile file $ mkHeader "package.yaml" version hash
+ readCabalFile file `shouldReturn` Just (CabalFile [] (Just version) (Just hash) [])
it "accepts cabal-version at the beginning of the file" $ do
inTempDirectory $ do
- writeFile file $ ("cabal-version: 2.2\n" ++ header "package.yaml" version hash)
- readCabalFile file `shouldReturn` Just (CabalFile (Just version) (Just hash) ["cabal-version: 2.2"])
+ writeFile file $ ("cabal-version: 2.2\n" ++ mkHeader "package.yaml" version hash)
+ readCabalFile file `shouldReturn` Just (CabalFile ["cabal-version: 2.2"] (Just version) (Just hash) [])
describe "extractVersion" $ do
it "extracts Hpack version from a cabal file" $ do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hpack-0.33.0/test/Hpack/ConfigSpec.hs new/hpack-0.34.2/test/Hpack/ConfigSpec.hs
--- old/hpack-0.33.0/test/Hpack/ConfigSpec.hs 2019-10-11 15:27:22.000000000 +0200
+++ new/hpack-0.34.2/test/Hpack/ConfigSpec.hs 2020-06-02 13:30:52.000000000 +0200
@@ -54,7 +54,7 @@
executable main_ = Executable (Just main_) ["Paths_foo"] []
library :: Library
-library = Library Nothing [] ["Paths_foo"] [] [] []
+library = Library Nothing Nothing [] ["Paths_foo"] [] [] []
testDecodeOptions :: FilePath -> DecodeOptions
testDecodeOptions file = defaultDecodeOptions {decodeOptionsTarget = file, decodeOptionsUserDataDir = Just undefined}
@@ -90,6 +90,7 @@
let
sect = LibrarySection {
librarySectionExposed = Nothing
+ , librarySectionVisibility = Nothing
, librarySectionExposedModules = Nothing
, librarySectionGeneratedExposedModules = Nothing
, librarySectionOtherModules = Nothing
@@ -99,6 +100,7 @@
}
lib = Library {
libraryExposed = Nothing
+ , libraryVisibility = Nothing
, libraryExposedModules = []
, libraryOtherModules = []
, libraryGeneratedModules = []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hpack-0.33.0/test/Hpack/LicenseSpec.hs new/hpack-0.34.2/test/Hpack/LicenseSpec.hs
--- old/hpack-0.33.0/test/Hpack/LicenseSpec.hs 2019-10-11 15:27:22.000000000 +0200
+++ new/hpack-0.34.2/test/Hpack/LicenseSpec.hs 2020-06-02 13:30:52.000000000 +0200
@@ -7,11 +7,7 @@
import Data.String.Interpolate
import Distribution.Pretty (prettyShow)
-#if MIN_VERSION_Cabal(3,0,0)
import Distribution.Parsec (simpleParsec)
-#else
-import Distribution.Parsec.Class (simpleParsec)
-#endif
import qualified Distribution.License as Cabal
import Hpack.License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hpack-0.33.0/test/Hpack/OptionsSpec.hs new/hpack-0.34.2/test/Hpack/OptionsSpec.hs
--- old/hpack-0.33.0/test/Hpack/OptionsSpec.hs 2019-10-11 15:27:22.000000000 +0200
+++ new/hpack-0.34.2/test/Hpack/OptionsSpec.hs 2020-06-02 13:30:52.000000000 +0200
@@ -18,10 +18,10 @@
context "by default" $ do
it "returns Run" $ do
- parseOptions defaultTarget [] `shouldReturn` Run (ParseOptions Verbose NoForce False defaultTarget)
+ parseOptions defaultTarget [] `shouldReturn` Run (ParseOptions Verbose NoForce Nothing False defaultTarget)
it "includes target" $ do
- parseOptions defaultTarget ["foo.yaml"] `shouldReturn` Run (ParseOptions Verbose NoForce False "foo.yaml")
+ parseOptions defaultTarget ["foo.yaml"] `shouldReturn` Run (ParseOptions Verbose NoForce Nothing False "foo.yaml")
context "with superfluous arguments" $ do
it "returns ParseError" $ do
@@ -29,19 +29,31 @@
context "with --silent" $ do
it "sets optionsVerbose to NoVerbose" $ do
- parseOptions defaultTarget ["--silent"] `shouldReturn` Run (ParseOptions NoVerbose NoForce False defaultTarget)
+ parseOptions defaultTarget ["--silent"] `shouldReturn` Run (ParseOptions NoVerbose NoForce Nothing False defaultTarget)
context "with --force" $ do
it "sets optionsForce to Force" $ do
- parseOptions defaultTarget ["--force"] `shouldReturn` Run (ParseOptions Verbose Force False defaultTarget)
+ parseOptions defaultTarget ["--force"] `shouldReturn` Run (ParseOptions Verbose Force Nothing False defaultTarget)
context "with -f" $ do
it "sets optionsForce to Force" $ do
- parseOptions defaultTarget ["-f"] `shouldReturn` Run (ParseOptions Verbose Force False defaultTarget)
+ parseOptions defaultTarget ["-f"] `shouldReturn` Run (ParseOptions Verbose Force Nothing False defaultTarget)
+
+ context "when determining parseOptionsHash" $ do
+
+ it "assumes True on --hash" $ do
+ parseOptions defaultTarget ["--hash"] `shouldReturn` Run (ParseOptions Verbose NoForce (Just True) False defaultTarget)
+
+ it "assumes False on --no-hash" $ do
+ parseOptions defaultTarget ["--no-hash"] `shouldReturn` Run (ParseOptions Verbose NoForce (Just False) False defaultTarget)
+
+ it "gives last occurrence precedence" $ do
+ parseOptions defaultTarget ["--no-hash", "--hash"] `shouldReturn` Run (ParseOptions Verbose NoForce (Just True) False defaultTarget)
+ parseOptions defaultTarget ["--hash", "--no-hash"] `shouldReturn` Run (ParseOptions Verbose NoForce (Just False) False defaultTarget)
context "with -" $ do
it "sets optionsToStdout to True, implies Force and NoVerbose" $ do
- parseOptions defaultTarget ["-"] `shouldReturn` Run (ParseOptions NoVerbose Force True defaultTarget)
+ parseOptions defaultTarget ["-"] `shouldReturn` Run (ParseOptions NoVerbose Force Nothing True defaultTarget)
it "rejects - for target" $ do
parseOptions defaultTarget ["-", "-"] `shouldReturn` ParseError
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hpack-0.33.0/test/Hpack/RenderSpec.hs new/hpack-0.34.2/test/Hpack/RenderSpec.hs
--- old/hpack-0.33.0/test/Hpack/RenderSpec.hs 2019-10-11 15:27:22.000000000 +0200
+++ new/hpack-0.34.2/test/Hpack/RenderSpec.hs 2020-06-02 13:30:52.000000000 +0200
@@ -10,10 +10,9 @@
import Hpack.Config hiding (package)
import Hpack.Render.Dsl
import Hpack.Render
-import Hpack.Syntax.Dependencies
library :: Library
-library = Library Nothing [] [] [] [] []
+library = Library Nothing Nothing [] [] [] [] []
executable :: Section Executable
executable = section (Executable (Just "Main.hs") [] [])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hpack-0.33.0/test/Hpack/Syntax/DependenciesSpec.hs new/hpack-0.34.2/test/Hpack/Syntax/DependenciesSpec.hs
--- old/hpack-0.33.0/test/Hpack/Syntax/DependenciesSpec.hs 2019-10-11 15:27:22.000000000 +0200
+++ new/hpack-0.34.2/test/Hpack/Syntax/DependenciesSpec.hs 2020-06-02 13:30:52.000000000 +0200
@@ -1,5 +1,6 @@
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE OverloadedLists #-}
+{-# LANGUAGE OverloadedStrings #-}
module Hpack.Syntax.DependenciesSpec (spec) where
import Helper
@@ -18,6 +19,16 @@
spec :: Spec
spec = do
+ describe "parseDependency" $ do
+ it "accepts dependencies" $ do
+ parseDependency "dependency" "foo" `shouldReturn` ("foo", DependencyVersion Nothing AnyVersion)
+
+ it "accepts dependencies with a subcomponent" $ do
+ parseDependency "dependency" "foo:bar" `shouldReturn` ("foo:bar", DependencyVersion Nothing AnyVersion)
+
+ it "accepts dependencies with multiple subcomponents" $ do
+ parseDependency "dependency" "foo:{bar,baz}" `shouldReturn` ("foo:{bar,baz}", DependencyVersion Nothing AnyVersion)
+
describe "fromValue" $ do
context "when parsing Dependencies" $ do
context "with a scalar" $ do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hpack-0.33.0/test/HpackSpec.hs new/hpack-0.34.2/test/HpackSpec.hs
--- old/hpack-0.33.0/test/HpackSpec.hs 2019-10-11 15:27:22.000000000 +0200
+++ new/hpack-0.34.2/test/HpackSpec.hs 2020-06-02 13:30:52.000000000 +0200
@@ -16,87 +16,139 @@
spec :: Spec
spec = do
- describe "hpackResult" $ do
- context "with existing cabal file" $ around_ inTempDirectory $ before_ (writeFile packageConfig "name: foo") $ do
- let
- file = "foo.cabal"
-
- hpackWithVersion v = hpackResultWithVersion v defaultOptions
- hpack = hpackResult defaultOptions
- hpackForce = hpackResult defaultOptions {optionsForce = Force}
-
- generated = Result [] file Generated
- modifiedManually = Result [] file ExistingCabalFileWasModifiedManually
- outputUnchanged = Result [] file OutputUnchanged
- alreadyGeneratedByNewerHpack = Result [] file AlreadyGeneratedByNewerHpack
-
- context "when cabal file was created manually" $ do
- it "does not overwrite existing cabal file" $ do
- let existing = "some existing cabal file"
- writeFile file existing
- hpack `shouldReturn` modifiedManually
+ describe "header" $ do
+ it "generates header" $ do
+ header "foo.yaml" Nothing Nothing `shouldBe` [
+ "-- This file has been generated from foo.yaml by hpack."
+ , "--"
+ , "-- see: https://github.com/sol/hpack"
+ , ""
+ ]
+
+ context "with hpack version" $ do
+ it "includes hpack version" $ do
+ header "foo.yaml" (Just $ makeVersion [0,34,0]) Nothing `shouldBe` [
+ "-- This file has been generated from foo.yaml by hpack version 0.34.0."
+ , "--"
+ , "-- see: https://github.com/sol/hpack"
+ , ""
+ ]
+
+ context "with hash" $ do
+ it "includes hash" $ do
+ header "foo.yaml" Nothing (Just "some-hash") `shouldBe` [
+ "-- This file has been generated from foo.yaml by hpack."
+ , "--"
+ , "-- see: https://github.com/sol/hpack"
+ , "--"
+ , "-- hash: some-hash"
+ , ""
+ ]
+
+ describe "renderCabalFile" $ do
+ it "is inverse to readCabalFile" $ do
+ expected <- lines <$> readFile "hpack.cabal"
+ Just c <- readCabalFile "hpack.cabal"
+ renderCabalFile "package.yaml" c `shouldBe` expected
+
+ describe "hpackResult" $ around_ inTempDirectory $ before_ (writeFile packageConfig "name: foo") $ do
+ let
+ file = "foo.cabal"
+
+ hpackWithVersion v = hpackResultWithVersion (makeVersion v) defaultOptions
+ hpackWithStrategy strategy = hpackResult defaultOptions { optionsGenerateHashStrategy = strategy }
+ hpackForce = hpackResult defaultOptions {optionsForce = Force}
+
+ generated = Result [] file Generated
+ modifiedManually = Result [] file ExistingCabalFileWasModifiedManually
+ outputUnchanged = Result [] file OutputUnchanged
+ alreadyGeneratedByNewerHpack = Result [] file AlreadyGeneratedByNewerHpack
+
+ modifyPackageConfig = writeFile packageConfig $ unlines [
+ "name: foo"
+ , "version: 0.1.0"
+ ]
+
+ modifyCabalFile = do
+ xs <- readFile file
+ writeFile file $ xs ++ "foo\n"
+
+ manuallyCreateCabalFile = do
+ writeFile file "some existing cabal file"
+
+ doesNotGenerateHash :: HasCallStack => GenerateHashStrategy -> Spec
+ doesNotGenerateHash strategy = do
+ it "does not generate hash" $ do
+ hpackWithStrategy strategy `shouldReturn` generated
+ readFile file >>= (`shouldNotContain` "hash")
+
+ generatesHash :: HasCallStack => GenerateHashStrategy -> Spec
+ generatesHash strategy = do
+ it "generates hash" $ do
+ hpackWithStrategy strategy `shouldReturn` generated
+ readFile file >>= (`shouldContain` "hash")
+
+ doesNotOverwrite :: HasCallStack => GenerateHashStrategy -> Spec
+ doesNotOverwrite strategy = do
+ it "does not overwrite cabal file" $ do
+ existing <- readFile file
+ hpackWithStrategy strategy `shouldReturn` modifiedManually
readFile file `shouldReturn` existing
+ with strategy item = context ("with " ++ show strategy) $ item strategy
+
+ context "without an existing cabal file" $ do
+ with ForceHash generatesHash
+ with PreferHash generatesHash
+ with ForceNoHash doesNotGenerateHash
+ with PreferNoHash doesNotGenerateHash
+
+ context "with an existing cabal file" $ do
+ context "without a hash" $ before_ (hpackWithStrategy ForceNoHash >> modifyPackageConfig) $ do
+ with ForceHash generatesHash
+ with PreferHash doesNotGenerateHash
+ with ForceNoHash doesNotGenerateHash
+ with PreferNoHash doesNotGenerateHash
+
+ context "with a hash" $ before_ (hpackWithStrategy ForceHash >> modifyPackageConfig) $ do
+ with ForceHash generatesHash
+ with PreferHash generatesHash
+ with ForceNoHash doesNotGenerateHash
+ with PreferNoHash generatesHash
+
+ context "with manual modifications" $ before_ modifyCabalFile $ do
+ with ForceHash doesNotOverwrite
+ with PreferHash doesNotOverwrite
+ with ForceNoHash doesNotGenerateHash
+ with PreferNoHash doesNotOverwrite
+
+ context "when created manually" $ before_ manuallyCreateCabalFile $ do
+ with ForceHash doesNotOverwrite
+ with PreferHash doesNotOverwrite
+ with ForceNoHash doesNotOverwrite
+ with PreferNoHash doesNotOverwrite
+
context "with --force" $ do
- it "overwrites existing cabal file" $ do
- _ <- hpack
- expected <- readFile file
- writeFile file "some existing cabal file"
+ it "overwrites cabal file" $ do
hpackForce `shouldReturn` generated
- readFile file `shouldReturn` expected
- context "when cabal file was created with hpack < 0.20.0" $ do
- it "overwrites existing cabal file" $ do
- _ <- hpack
- expected <- readFile file
- writeFile file "-- This file has been generated from package.yaml by hpack version 0.19.3."
- hpack `shouldReturn` generated
- readFile file `shouldReturn` expected
-
- context "when cabal file was created with hpack >= 0.20.0" $ do
- context "when hash is missing" $ do
- it "does not overwrite existing cabal file" $ do
- let existing = "-- This file has been generated from package.yaml by hpack version 0.20.0."
- writeFile file existing
- hpack `shouldReturn` modifiedManually
- readFile file `shouldReturn` existing
-
- context "when hash is present" $ do
- context "when exsting cabal file was generated with a newer version of hpack" $ do
- it "does not overwrite existing cabal file" $ do
- writeFile packageConfig $ unlines [
- "name: foo"
- , "version: 0.1.0"
- ]
- _ <- hpackWithVersion (makeVersion [0,22,0])
- old <- readFile file
-
- writeFile packageConfig $ unlines [
- "name: foo"
- , "version: 0.2.0"
- ]
-
- hpackWithVersion (makeVersion [0,20,0]) `shouldReturn` alreadyGeneratedByNewerHpack
- readFile file `shouldReturn` old
-
- context "when cabal file was modified manually" $ do
- it "does not overwrite existing cabal file" $ do
- _ <- hpack
- old <- readFile file
- let modified = old ++ "foo\n"
- writeFile file modified
- _ <- hpack
- readFile file `shouldReturn` modified
-
- context "when only the hpack version in the cabal file header changed" $ do
- it "does not overwrite existing cabal file" $ do
- _ <- hpackWithVersion (makeVersion [0,20,0])
- old <- readFile file
- hpack `shouldReturn` outputUnchanged
- readFile file `shouldReturn` old
-
- it "does not complain if it's newer" $ do
- _ <- hpackWithVersion (makeVersion [999,999,0])
- old <- readFile file
- hpack `shouldReturn` outputUnchanged
- readFile file `shouldReturn` old
+ context "when generated with a newer version of hpack" $ do
+ it "does not overwrite cabal file" $ do
+ _ <- hpackWithVersion [0,22,0]
+ old <- readFile file
+ modifyPackageConfig
+ hpackWithVersion [0,20,0] `shouldReturn` alreadyGeneratedByNewerHpack
+ readFile file `shouldReturn` old
+
+ context "when only the hpack version in the cabal file header changed" $ do
+ it "does not overwrite cabal file" $ do
+ _ <- hpackWithVersion [0,22,0]
+ old <- readFile file
+ hpackWithVersion [0,30,0] `shouldReturn` outputUnchanged
+ readFile file `shouldReturn` old
+
+ it "does not complain if it's newer" $ do
+ _ <- hpackWithVersion [0,22,0]
+ old <- readFile file
+ hpackWithVersion [0,20,0] `shouldReturn` outputUnchanged
+ readFile file `shouldReturn` old
1
0
Hello community,
here is the log from the commit of package ghc-yesod-core for openSUSE:Factory checked in at 2020-09-30 19:53:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yesod-core (Old)
and /work/SRC/openSUSE:Factory/.ghc-yesod-core.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-yesod-core"
Wed Sep 30 19:53:48 2020 rev:4 rq:838498 version:1.6.18.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yesod-core/ghc-yesod-core.changes 2020-09-07 22:04:42.510130386 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-yesod-core.new.4249/ghc-yesod-core.changes 2020-09-30 19:53:51.308755946 +0200
@@ -1,0 +2,20 @@
+Thu Sep 24 02:00:45 UTC 2020 - psimons(a)suse.com
+
+- Update yesod-core to version 1.6.18.4.
+ ## 1.6.18.4
+
+ * Fixed a bug where `mkYesod` and other TH functions didn't work for datatypes with explicitly stated type variables, including the case with typeclass constraints. [https://github.com/yesodweb/yesod/pull/1697](#1697)
+
+ ## 1.6.18.3
+
+ * Remove mention of an oudated Yesod type (`GHandler`) from the docs for `handlerToIO`. [https://github.com/yesodweb/yesod/pull/1695](#1695)
+
+ ## 1.6.18.2
+
+ * Recommends `.yesodroutes` as the file extension for Yesod routes files. [#1686](https://github.com/yesodweb/yesod/pull/1686)
+
+ ## 1.6.18.1
+
+ * Increase the size of CSRF token
+
+-------------------------------------------------------------------
Old:
----
yesod-core-1.6.18.tar.gz
yesod-core.cabal
New:
----
yesod-core-1.6.18.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-yesod-core.spec ++++++
--- /var/tmp/diff_new_pack.tKANfn/_old 2020-09-30 19:53:51.976756543 +0200
+++ /var/tmp/diff_new_pack.tKANfn/_new 2020-09-30 19:53:51.980756546 +0200
@@ -19,13 +19,12 @@
%global pkg_name yesod-core
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 1.6.18
+Version: 1.6.18.4
Release: 0
Summary: Creation of type-safe, RESTful web applications
License: MIT
URL: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{ve…
-Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal…
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-aeson-devel
BuildRequires: ghc-auto-update-devel
@@ -90,7 +89,6 @@
%prep
%autosetup -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
++++++ yesod-core-1.6.18.tar.gz -> yesod-core-1.6.18.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.6.18/ChangeLog.md new/yesod-core-1.6.18.4/ChangeLog.md
--- old/yesod-core-1.6.18/ChangeLog.md 2020-03-31 15:21:34.000000000 +0200
+++ new/yesod-core-1.6.18.4/ChangeLog.md 2020-09-22 16:30:38.000000000 +0200
@@ -1,5 +1,21 @@
# ChangeLog for yesod-core
+## 1.6.18.4
+
+* Fixed a bug where `mkYesod` and other TH functions didn't work for datatypes with explicitly stated type variables, including the case with typeclass constraints. [https://github.com/yesodweb/yesod/pull/1697](#1697)
+
+## 1.6.18.3
+
+* Remove mention of an oudated Yesod type (`GHandler`) from the docs for `handlerToIO`. [https://github.com/yesodweb/yesod/pull/1695](#1695)
+
+## 1.6.18.2
+
+* Recommends `.yesodroutes` as the file extension for Yesod routes files. [#1686](https://github.com/yesodweb/yesod/pull/1686)
+
+## 1.6.18.1
+
+* Increase the size of CSRF token
+
## 1.6.18
* Add functions for setting description and OG meta [#1663](https://github.com/yesodweb/yesod/pull/1663)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.6.18/src/Yesod/Core/Class/Yesod.hs new/yesod-core-1.6.18.4/src/Yesod/Core/Class/Yesod.hs
--- old/yesod-core-1.6.18/src/Yesod/Core/Class/Yesod.hs 2020-01-18 18:38:53.000000000 +0100
+++ new/yesod-core-1.6.18.4/src/Yesod/Core/Class/Yesod.hs 2020-09-22 16:35:10.000000000 +0200
@@ -531,8 +531,8 @@
=> WidgetFor site ()
-> HandlerFor site (PageContent (Route site))
widgetToPageContent w = do
- jsAttrs <- jsAttributesHandler
- HandlerFor $ \hd -> do
+ jsAttrs <- jsAttributesHandler
+ HandlerFor $ \hd -> do
master <- unHandlerFor getYesod hd
ref <- newIORef mempty
unWidgetFor w WidgetData
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.6.18/src/Yesod/Core/Handler.hs new/yesod-core-1.6.18.4/src/Yesod/Core/Handler.hs
--- old/yesod-core-1.6.18/src/Yesod/Core/Handler.hs 2020-02-11 07:44:48.000000000 +0100
+++ new/yesod-core-1.6.18.4/src/Yesod/Core/Handler.hs 2020-09-22 16:36:23.000000000 +0200
@@ -9,6 +9,7 @@
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE TemplateHaskell #-}
---------------------------------------------------------
--
-- Module : Yesod.Handler
@@ -369,10 +370,10 @@
getCurrentRoute :: MonadHandler m => m (Maybe (Route (HandlerSite m)))
getCurrentRoute = rheRoute <$> askHandlerEnv
--- | Returns a function that runs 'HandlerT' actions inside @IO@.
+-- | Returns a function that runs 'HandlerFor' actions inside @IO@.
--
--- Sometimes you want to run an inner 'HandlerT' action outside
--- the control flow of an HTTP request (on the outer 'HandlerT'
+-- Sometimes you want to run an inner 'HandlerFor' action outside
+-- the control flow of an HTTP request (on the outer 'HandlerFor'
-- action). For example, you may want to spawn a new thread:
--
-- @
@@ -380,30 +381,30 @@
-- getFooR = do
-- runInnerHandler <- handlerToIO
-- liftIO $ forkIO $ runInnerHandler $ do
--- /Code here runs inside GHandler but on a new thread./
--- /This is the inner GHandler./
+-- /Code here runs inside HandlerFor but on a new thread./
+-- /This is the inner HandlerFor./
-- ...
-- /Code here runs inside the request's control flow./
--- /This is the outer GHandler./
+-- /This is the outer HandlerFor./
-- ...
-- @
--
-- Another use case for this function is creating a stream of
--- server-sent events using 'GHandler' actions (see
+-- server-sent events using 'HandlerFor' actions (see
-- @yesod-eventsource@).
--
--- Most of the environment from the outer 'GHandler' is preserved
--- on the inner 'GHandler', however:
+-- Most of the environment from the outer 'HandlerFor' is preserved
+-- on the inner 'HandlerFor', however:
--
-- * The request body is cleared (otherwise it would be very
-- difficult to prevent huge memory leaks).
--
--- * The cache is cleared (see 'CacheKey').
+-- * The cache is cleared (see 'cached').
--
--- Changes to the response made inside the inner 'GHandler' are
+-- Changes to the response made inside the inner 'HandlerFor' are
-- ignored (e.g., session variables, cookies, response headers).
--- This allows the inner 'GHandler' to outlive the outer
--- 'GHandler' (e.g., on the @forkIO@ example above, a response
+-- This allows the inner 'HandlerFor' to outlive the outer
+-- 'HandlerFor' (e.g., on the @forkIO@ example above, a response
-- may be sent to the client without killing the new thread).
handlerToIO :: MonadIO m => HandlerFor site (HandlerFor site a -> m a)
handlerToIO =
@@ -428,7 +429,7 @@
-- xx From this point onwards, no references to oldHandlerData xx
liftIO $ evaluate (newReq `seq` oldEnv `seq` newState `seq` ())
- -- Return GHandler running function.
+ -- Return HandlerFor running function.
return $ \(HandlerFor f) ->
liftIO $
runResourceT $ withInternalState $ \resState -> do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.6.18/src/Yesod/Core/Internal/Request.hs new/yesod-core-1.6.18.4/src/Yesod/Core/Internal/Request.hs
--- old/yesod-core-1.6.18/src/Yesod/Core/Internal/Request.hs 2020-01-18 18:38:53.000000000 +0100
+++ new/yesod-core-1.6.18.4/src/Yesod/Core/Internal/Request.hs 2020-06-24 09:26:46.000000000 +0200
@@ -129,7 +129,7 @@
-- Already have a token, use it.
Just bs -> Left $ Just $ decodeUtf8With lenientDecode bs
-- Don't have a token, get a random generator and make a new one.
- Nothing -> Right $ fmap Just . randomString 10
+ Nothing -> Right $ fmap Just . randomString 40
| otherwise = Left Nothing
textQueryString :: W.Request -> [(Text, Text)]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.6.18/src/Yesod/Core/Internal/TH.hs new/yesod-core-1.6.18.4/src/Yesod/Core/Internal/TH.hs
--- old/yesod-core-1.6.18/src/Yesod/Core/Internal/TH.hs 2020-01-18 18:38:53.000000000 +0100
+++ new/yesod-core-1.6.18.4/src/Yesod/Core/Internal/TH.hs 2020-09-22 16:30:38.000000000 +0200
@@ -141,9 +141,12 @@
let name = mkName namestr
-- Generate as many variable names as the arity indicates
vns <- replicateM (arity - length mtys) $ newName "t"
- -- Base type (site type with variables)
+ -- types that you apply to get a concrete site name
let argtypes = fmap nameToType mtys ++ fmap VarT vns
- site = foldl' AppT (ConT name) argtypes
+ -- typevars that should appear in synonym head
+ let argvars = (fmap mkName . filter isTvar) mtys ++ vns
+ -- Base type (site type with variables)
+ let site = foldl' AppT (ConT name) argtypes
res = map (fmap (parseType . dropBracket)) resS
renderRouteDec <- mkRenderRouteInstance appCxt site res
routeAttrsDec <- mkRouteAttrsInstance appCxt site res
@@ -160,7 +163,7 @@
, renderRouteDec
, [routeAttrsDec]
, resourcesDec
- , if isSub then [] else masterTypeSyns vns site
+ , if isSub then [] else masterTypeSyns argvars site
]
return (dataDec, dispatchDec)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.6.18/src/Yesod/Routes/Parse.hs new/yesod-core-1.6.18.4/src/Yesod/Routes/Parse.hs
--- old/yesod-core-1.6.18/src/Yesod/Routes/Parse.hs 2020-02-11 07:44:48.000000000 +0100
+++ new/yesod-core-1.6.18.4/src/Yesod/Routes/Parse.hs 2020-09-22 16:30:38.000000000 +0200
@@ -11,6 +11,7 @@
, TypeTree (..)
, dropBracket
, nameToType
+ , isTvar
) where
import Language.Haskell.TH.Syntax
@@ -35,9 +36,15 @@
[] -> lift res
z -> error $ unlines $ "Overlapping routes: " : map show z
+-- | Same as 'parseRoutes', but uses an external file instead of quasiquotation.
+--
+-- The recommended file extension is @.yesodroutes@.
parseRoutesFile :: FilePath -> Q Exp
parseRoutesFile = parseRoutesFileWith parseRoutes
+-- | Same as 'parseRoutesNoCheck', but uses an external file instead of quasiquotation.
+--
+-- The recommended file extension is @.yesodroutes@.
parseRoutesFileNoCheck :: FilePath -> Q Exp
parseRoutesFileNoCheck = parseRoutesFileWith parseRoutesNoCheck
@@ -258,8 +265,13 @@
ttToType (TTList t) = ListT `AppT` ttToType t
nameToType :: String -> Type
-nameToType t@(h:_) | isLower h = VarT $ mkName t
-nameToType t = ConT $ mkName t
+nameToType t = if isTvar t
+ then VarT $ mkName t
+ else ConT $ mkName t
+
+isTvar :: String -> Bool
+isTvar (h:_) = isLower h
+isTvar _ = False
pieceFromString :: String -> Either (CheckOverlap, String) (CheckOverlap, Piece String)
pieceFromString ('#':'!':x) = Right $ (False, Dynamic $ dropBracket x)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.6.18/test/RouteSpec.hs new/yesod-core-1.6.18.4/test/RouteSpec.hs
--- old/yesod-core-1.6.18/test/RouteSpec.hs 2020-01-18 18:38:53.000000000 +0100
+++ new/yesod-core-1.6.18.4/test/RouteSpec.hs 2020-08-01 09:07:41.000000000 +0200
@@ -227,7 +227,7 @@
describe "routing table parsing" $ do
it "recognizes trailing backslashes as line continuation directives" $ do
let routes :: [ResourceTree String]
- routes = $(parseRoutesFile "test/fixtures/routes_with_line_continuations")
+ routes = $(parseRoutesFile "test/fixtures/routes_with_line_continuations.yesodroutes")
length routes @?= 3
describe "overlap checking" $ do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.6.18/test/YesodCoreTest/ParameterizedSite/Compat.hs new/yesod-core-1.6.18.4/test/YesodCoreTest/ParameterizedSite/Compat.hs
--- old/yesod-core-1.6.18/test/YesodCoreTest/ParameterizedSite/Compat.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/yesod-core-1.6.18.4/test/YesodCoreTest/ParameterizedSite/Compat.hs 2020-09-22 16:30:38.000000000 +0200
@@ -0,0 +1,27 @@
+{-# LANGUAGE
+ TypeFamilies, QuasiQuotes, TemplateHaskell, MultiParamTypeClasses
+ , OverloadedStrings, StandaloneDeriving, FlexibleInstances
+ #-}
+module YesodCoreTest.ParameterizedSite.Compat
+ ( Compat (..)
+ ) where
+
+import Yesod.Core
+
+-- | Parameterized without constraints, and we call mkYesod without type vars,
+-- like people used to do before the last 3 commits
+data Compat a b = Compat a b
+
+mkYesod "Compat" [parseRoutes|
+/ HomeR GET
+|]
+
+instance Yesod (Compat a b)
+
+getHomeR :: Handler a b Html
+getHomeR = defaultLayout
+ [whamlet|
+ <p>
+ Stub
+ |]
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.6.18/test/YesodCoreTest/ParameterizedSite/PolyAny.hs new/yesod-core-1.6.18.4/test/YesodCoreTest/ParameterizedSite/PolyAny.hs
--- old/yesod-core-1.6.18/test/YesodCoreTest/ParameterizedSite/PolyAny.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/yesod-core-1.6.18.4/test/YesodCoreTest/ParameterizedSite/PolyAny.hs 2020-09-22 16:30:38.000000000 +0200
@@ -0,0 +1,26 @@
+{-# LANGUAGE
+ TypeFamilies, QuasiQuotes, TemplateHaskell, MultiParamTypeClasses
+ , OverloadedStrings, StandaloneDeriving, FlexibleInstances
+ #-}
+module YesodCoreTest.ParameterizedSite.PolyAny
+ ( PolyAny (..)
+ ) where
+
+import Yesod.Core
+
+-- | Parameterized without constraints
+data PolyAny a = PolyAny a
+
+mkYesod "PolyAny a" [parseRoutes|
+/ HomeR GET
+|]
+
+instance Yesod (PolyAny a)
+
+getHomeR :: Handler a Html
+getHomeR = defaultLayout
+ [whamlet|
+ <p>
+ Stub
+ |]
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.6.18/test/YesodCoreTest/ParameterizedSite/PolyShow.hs new/yesod-core-1.6.18.4/test/YesodCoreTest/ParameterizedSite/PolyShow.hs
--- old/yesod-core-1.6.18/test/YesodCoreTest/ParameterizedSite/PolyShow.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/yesod-core-1.6.18.4/test/YesodCoreTest/ParameterizedSite/PolyShow.hs 2020-09-22 16:30:38.000000000 +0200
@@ -0,0 +1,28 @@
+{-# LANGUAGE
+ TypeFamilies, QuasiQuotes, TemplateHaskell, MultiParamTypeClasses
+ , OverloadedStrings, StandaloneDeriving, FlexibleInstances
+ #-}
+module YesodCoreTest.ParameterizedSite.PolyShow
+ ( PolyShow (..)
+ ) where
+
+import Yesod.Core
+
+-- | Parameterized with 'Show' constraint
+data PolyShow a = PolyShow a
+
+mkYesod "(Show a) => PolyShow a" [parseRoutes|
+/ HomeR GET
+|]
+
+instance Show a => Yesod (PolyShow a)
+
+getHomeR :: Show a => Handler a Html
+getHomeR = do
+ PolyShow x <- getYesod
+ defaultLayout
+ [whamlet|
+ <p>
+ Stub #{show x}
+ |]
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.6.18/test/YesodCoreTest/ParameterizedSite.hs new/yesod-core-1.6.18.4/test/YesodCoreTest/ParameterizedSite.hs
--- old/yesod-core-1.6.18/test/YesodCoreTest/ParameterizedSite.hs 1970-01-01 01:00:00.000000000 +0100
+++ new/yesod-core-1.6.18.4/test/YesodCoreTest/ParameterizedSite.hs 2020-09-22 16:30:38.000000000 +0200
@@ -0,0 +1,37 @@
+{-# LANGUAGE OverloadedStrings #-}
+module YesodCoreTest.ParameterizedSite
+ ( parameterizedSiteTest
+ ) where
+
+import Data.ByteString.Lazy (ByteString)
+import Network.Wai.Test (runSession, request, defaultRequest, assertBodyContains)
+import Test.Hspec (Spec, describe, it)
+import Yesod.Core (YesodDispatch)
+import Yesod.Core.Dispatch (toWaiApp)
+
+import YesodCoreTest.ParameterizedSite.PolyAny (PolyAny (..))
+import YesodCoreTest.ParameterizedSite.PolyShow (PolyShow (..))
+import YesodCoreTest.ParameterizedSite.Compat (Compat (..))
+
+-- These are actually tests for template haskell. So if it compiles, it works
+parameterizedSiteTest :: Spec
+parameterizedSiteTest = describe "Polymorphic Yesod sites" $ do
+ it "Polymorphic unconstrained stub" $ runStub (PolyAny ())
+ it "Polymorphic stub with Show" $ runStub' "1337" (PolyShow 1337)
+ it "Polymorphic unconstrained stub, old-style" $ runStub (Compat () ())
+
+runStub :: YesodDispatch a => a -> IO ()
+runStub stub =
+ let actions = do
+ res <- request defaultRequest
+ assertBodyContains "Stub" res
+ in toWaiApp stub >>= runSession actions
+
+
+runStub' :: YesodDispatch a => ByteString -> a -> IO ()
+runStub' body stub =
+ let actions = do
+ res <- request defaultRequest
+ assertBodyContains "Stub" res
+ assertBodyContains body res
+ in toWaiApp stub >>= runSession actions
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.6.18/test/YesodCoreTest.hs new/yesod-core-1.6.18.4/test/YesodCoreTest.hs
--- old/yesod-core-1.6.18/test/YesodCoreTest.hs 2020-01-18 18:38:53.000000000 +0100
+++ new/yesod-core-1.6.18.4/test/YesodCoreTest.hs 2020-09-22 16:30:38.000000000 +0200
@@ -11,6 +11,7 @@
import YesodCoreTest.InternalRequest
import YesodCoreTest.ErrorHandling
import YesodCoreTest.Cache
+import YesodCoreTest.ParameterizedSite
import qualified YesodCoreTest.WaiSubsite as WaiSubsite
import qualified YesodCoreTest.Redirect as Redirect
import qualified YesodCoreTest.JsLoader as JsLoader
@@ -43,6 +44,7 @@
internalRequestTest
errorHandlingTest
cacheTest
+ parameterizedSiteTest
WaiSubsite.specs
Redirect.specs
JsLoader.specs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.6.18/test/fixtures/routes_with_line_continuations new/yesod-core-1.6.18.4/test/fixtures/routes_with_line_continuations
--- old/yesod-core-1.6.18/test/fixtures/routes_with_line_continuations 2020-01-18 18:38:53.000000000 +0100
+++ new/yesod-core-1.6.18.4/test/fixtures/routes_with_line_continuations 1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
--- This fixture to test line continuations is in a separate file
--- because when I put it in an in-line quasi-quotation, the compiler
--- performed the line continuations processing itself.
-
-/foo1 \
- Foo1
-/foo2 Foo2
-/foo3 \
- Foo3 \
- GET POST \
- !foo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.6.18/test/fixtures/routes_with_line_continuations.yesodroutes new/yesod-core-1.6.18.4/test/fixtures/routes_with_line_continuations.yesodroutes
--- old/yesod-core-1.6.18/test/fixtures/routes_with_line_continuations.yesodroutes 1970-01-01 01:00:00.000000000 +0100
+++ new/yesod-core-1.6.18.4/test/fixtures/routes_with_line_continuations.yesodroutes 2020-08-01 09:07:41.000000000 +0200
@@ -0,0 +1,11 @@
+-- This fixture to test line continuations is in a separate file
+-- because when I put it in an in-line quasi-quotation, the compiler
+-- performed the line continuations processing itself.
+
+/foo1 \
+ Foo1
+/foo2 Foo2
+/foo3 \
+ Foo3 \
+ GET POST \
+ !foo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yesod-core-1.6.18/yesod-core.cabal new/yesod-core-1.6.18.4/yesod-core.cabal
--- old/yesod-core-1.6.18/yesod-core.cabal 2020-03-31 15:21:34.000000000 +0200
+++ new/yesod-core-1.6.18.4/yesod-core.cabal 2020-09-22 16:35:45.000000000 +0200
@@ -1,5 +1,5 @@
name: yesod-core
-version: 1.6.18
+version: 1.6.18.4
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael(a)snoyman.com>
@@ -8,7 +8,7 @@
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
+cabal-version: >= 1.10
build-type: Simple
homepage: http://www.yesodweb.com/
extra-source-files:
@@ -17,11 +17,12 @@
test/YesodCoreTest/JsLoaderSites/Bottom.hs
test/en.msg
test/test.hs
- test/fixtures/routes_with_line_continuations
+ test/fixtures/routes_with_line_continuations.yesodroutes
ChangeLog.md
README.md
library
+ default-language: Haskell2010
hs-source-dirs: src
build-depends: base >= 4.10 && < 5
@@ -46,7 +47,7 @@
, parsec >= 2 && < 3.2
, path-pieces >= 0.1.2 && < 0.3
, primitive >= 0.6
- , random >= 1.0.0.2 && < 1.2
+ , random >= 1.0.0.2 && < 1.3
, resourcet >= 1.2
, shakespeare >= 2.0
, template-haskell >= 2.11
@@ -97,14 +98,12 @@
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
+ other-extensions: TemplateHaskell
test-suite test-routes
+ default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: RouteSpec.hs
hs-source-dirs: test, src
@@ -121,7 +120,7 @@
Yesod.Routes.TH.Types
-- Workaround for: http://ghc.haskell.org/trac/ghc/ticket/8443
- extensions: TemplateHaskell
+ other-extensions: TemplateHaskell
build-depends: base
, hspec
@@ -134,6 +133,7 @@
, HUnit
test-suite tests
+ default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: test.hs
hs-source-dirs: test
@@ -156,6 +156,10 @@
YesodCoreTest.MediaData
YesodCoreTest.NoOverloadedStrings
YesodCoreTest.NoOverloadedStringsSub
+ YesodCoreTest.ParameterizedSite
+ YesodCoreTest.ParameterizedSite.Compat
+ YesodCoreTest.ParameterizedSite.PolyAny
+ YesodCoreTest.ParameterizedSite.PolyShow
YesodCoreTest.RawResponse
YesodCoreTest.Redirect
YesodCoreTest.Reps
@@ -197,9 +201,10 @@
, warp
, yesod-core
ghc-options: -Wall -threaded
- extensions: TemplateHaskell
+ other-extensions: TemplateHaskell
benchmark widgets
+ default-language: Haskell2010
type: exitcode-stdio-1.0
hs-source-dirs: bench
build-depends: base
1
0
Hello community,
here is the log from the commit of package ghc-wai-extra for openSUSE:Factory checked in at 2020-09-30 19:53:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-wai-extra (Old)
and /work/SRC/openSUSE:Factory/.ghc-wai-extra.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-wai-extra"
Wed Sep 30 19:53:43 2020 rev:3 rq:838497 version:3.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-wai-extra/ghc-wai-extra.changes 2020-08-28 21:41:07.084881515 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-wai-extra.new.4249/ghc-wai-extra.changes 2020-09-30 19:53:49.440754276 +0200
@@ -1,0 +2,21 @@
+Tue Sep 22 09:35:49 UTC 2020 - psimons(a)suse.com
+
+- Update wai-extra to version 3.1.0.
+ Upstream has edited the change log file since the last release in
+ a non-trivial way, i.e. they did more than just add a new entry
+ at the top. You can review the file at:
+ http://hackage.haskell.org/package/wai-extra-3.1.0/src/ChangeLog.md
+
+-------------------------------------------------------------------
+Fri Sep 18 02:00:38 UTC 2020 - psimons(a)suse.com
+
+- Update wai-extra to version 3.0.31.
+ ## 3.0.31
+
+ * Undo WaiTestFailure change in previous release
+
+ ## 3.0.30
+
+ * `Network.Wai.Test`: Add support source locations to assertion primitives [#812](https://github.com/yesodweb/wai/pull/812)
+
+-------------------------------------------------------------------
Old:
----
wai-extra-3.0.29.2.tar.gz
New:
----
wai-extra-3.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-wai-extra.spec ++++++
--- /var/tmp/diff_new_pack.VdpOPs/_old 2020-09-30 19:53:50.196754952 +0200
+++ /var/tmp/diff_new_pack.VdpOPs/_new 2020-09-30 19:53:50.200754955 +0200
@@ -19,17 +19,19 @@
%global pkg_name wai-extra
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 3.0.29.2
+Version: 3.1.0
Release: 0
Summary: Provides some basic WAI handlers and middleware
License: MIT
URL: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{ve…
BuildRequires: ghc-Cabal-devel
+BuildRequires: ghc-HUnit-devel
BuildRequires: ghc-aeson-devel
BuildRequires: ghc-ansi-terminal-devel
BuildRequires: ghc-base64-bytestring-devel
BuildRequires: ghc-bytestring-devel
+BuildRequires: ghc-call-stack-devel
BuildRequires: ghc-case-insensitive-devel
BuildRequires: ghc-containers-devel
BuildRequires: ghc-cookie-devel
@@ -57,7 +59,6 @@
BuildRequires: ghc-word8-devel
BuildRequires: ghc-zlib-devel
%if %{with tests}
-BuildRequires: ghc-HUnit-devel
BuildRequires: ghc-hspec-devel
%endif
++++++ wai-extra-3.0.29.2.tar.gz -> wai-extra-3.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wai-extra-3.0.29.2/ChangeLog.md new/wai-extra-3.1.0/ChangeLog.md
--- old/wai-extra-3.0.29.2/ChangeLog.md 2020-05-26 05:33:27.000000000 +0200
+++ new/wai-extra-3.1.0/ChangeLog.md 2020-09-21 12:43:49.000000000 +0200
@@ -1,5 +1,21 @@
# Changelog for wai-extra
+## 3.1.0
+
+* `Network.Wai.Test`: Add support for source locations to assertion primitives [#817](https://github.com/yesodweb/wai/pull/817)
+
+## 3.0.32
+
+* Undo previous two release, restore code from 3.0.29.2
+
+## 3.0.31
+
+* Undo WaiTestFailure change in previous release
+
+## 3.0.30
+
+* `Network.Wai.Test`: Add support for source locations to assertion primitives [#812](https://github.com/yesodweb/wai/pull/812)
+
## 3.0.29.2
* flush SSE headers early [#804](https://github.com/yesodweb/wai/pull/804)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wai-extra-3.0.29.2/Network/Wai/Test.hs new/wai-extra-3.1.0/Network/Wai/Test.hs
--- old/wai-extra-3.0.29.2/Network/Wai/Test.hs 2020-02-17 08:07:12.000000000 +0100
+++ new/wai-extra-3.1.0/Network/Wai/Test.hs 2020-09-21 12:43:49.000000000 +0200
@@ -29,7 +29,6 @@
, assertClientCookieExists
, assertNoClientCookieExists
, assertClientCookieValue
- , WaiTestFailure (..)
) where
#if __GLASGOW_HASKELL__ < 710
@@ -62,6 +61,8 @@
import qualified Data.Text.Encoding as TE
import Data.IORef
import Data.Time.Clock (getCurrentTime)
+import qualified Test.HUnit as HUnit
+import Data.CallStack (HasCallStack)
-- |
--
@@ -206,20 +207,16 @@
where
(s, h, withBody) = responseToStream res
-assertBool :: String -> Bool -> Session ()
+assertBool :: HasCallStack => String -> Bool -> Session ()
assertBool s b = unless b $ assertFailure s
-assertString :: String -> Session ()
+assertString :: HasCallStack => String -> Session ()
assertString s = unless (null s) $ assertFailure s
-assertFailure :: String -> Session ()
-assertFailure msg = msg `deepseq` liftIO (throwIO (WaiTestFailure msg))
+assertFailure :: HasCallStack => String -> Session ()
+assertFailure = liftIO . HUnit.assertFailure
-data WaiTestFailure = WaiTestFailure String
- deriving (Show, Eq, Typeable)
-instance Exception WaiTestFailure
-
-assertContentType :: ByteString -> SResponse -> Session ()
+assertContentType :: HasCallStack => ByteString -> SResponse -> Session ()
assertContentType ct SResponse{simpleHeaders = h} =
case lookup "content-type" h of
Nothing -> assertString $ concat
@@ -236,7 +233,7 @@
where
go = S8.takeWhile (/= ';')
-assertStatus :: Int -> SResponse -> Session ()
+assertStatus :: HasCallStack => Int -> SResponse -> Session ()
assertStatus i SResponse{simpleStatus = s} = assertBool (concat
[ "Expected status code "
, show i
@@ -246,7 +243,7 @@
where
sc = H.statusCode s
-assertBody :: L.ByteString -> SResponse -> Session ()
+assertBody :: HasCallStack => L.ByteString -> SResponse -> Session ()
assertBody lbs SResponse{simpleBody = lbs'} = assertBool (concat
[ "Expected response body "
, show $ L8.unpack lbs
@@ -254,7 +251,7 @@
, show $ L8.unpack lbs'
]) $ lbs == lbs'
-assertBodyContains :: L.ByteString -> SResponse -> Session ()
+assertBodyContains :: HasCallStack => L.ByteString -> SResponse -> Session ()
assertBodyContains lbs SResponse{simpleBody = lbs'} = assertBool (concat
[ "Expected response body to contain "
, show $ L8.unpack lbs
@@ -264,7 +261,7 @@
where
strict = S.concat . L.toChunks
-assertHeader :: CI ByteString -> ByteString -> SResponse -> Session ()
+assertHeader :: HasCallStack => CI ByteString -> ByteString -> SResponse -> Session ()
assertHeader header value SResponse{simpleHeaders = h} =
case lookup header h of
Nothing -> assertString $ concat
@@ -283,7 +280,7 @@
, show value'
]) (value == value')
-assertNoHeader :: CI ByteString -> SResponse -> Session ()
+assertNoHeader :: HasCallStack => CI ByteString -> SResponse -> Session ()
assertNoHeader header SResponse{simpleHeaders = h} =
case lookup header h of
Nothing -> return ()
@@ -297,7 +294,7 @@
-- |
--
-- Since 3.0.6
-assertClientCookieExists :: String -> ByteString -> Session ()
+assertClientCookieExists :: HasCallStack => String -> ByteString -> Session ()
assertClientCookieExists s cookieName = do
cookies <- getClientCookies
assertBool s $ Map.member cookieName cookies
@@ -305,7 +302,7 @@
-- |
--
-- Since 3.0.6
-assertNoClientCookieExists :: String -> ByteString -> Session ()
+assertNoClientCookieExists :: HasCallStack => String -> ByteString -> Session ()
assertNoClientCookieExists s cookieName = do
cookies <- getClientCookies
assertBool s $ not $ Map.member cookieName cookies
@@ -313,7 +310,7 @@
-- |
--
-- Since 3.0.6
-assertClientCookieValue :: String -> ByteString -> ByteString -> Session ()
+assertClientCookieValue :: HasCallStack => String -> ByteString -> ByteString -> Session ()
assertClientCookieValue s cookieName cookieValue = do
cookies <- getClientCookies
case Map.lookup cookieName cookies of
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wai-extra-3.0.29.2/wai-extra.cabal new/wai-extra-3.1.0/wai-extra.cabal
--- old/wai-extra-3.0.29.2/wai-extra.cabal 2020-05-26 05:33:27.000000000 +0200
+++ new/wai-extra-3.1.0/wai-extra.cabal 2020-09-21 12:43:49.000000000 +0200
@@ -1,5 +1,5 @@
Name: wai-extra
-Version: 3.0.29.2
+Version: 3.1.0
Synopsis: Provides some basic WAI handlers and middleware.
description:
Provides basic WAI handler and middleware functionality:
@@ -87,7 +87,7 @@
default: False
Library
- Build-Depends: base >= 4.8 && < 5
+ Build-Depends: base >= 4.10 && < 5
, bytestring >= 0.10.4
, wai >= 3.0.3.0 && < 3.3
, old-locale >= 1.0.0.2 && < 1.1
@@ -116,6 +116,8 @@
, aeson
, iproute
, http2
+ , HUnit
+ , call-stack
if os(windows)
cpp-options: -DWINDOWS
1
0
Hello community,
here is the log from the commit of package ghc-wai-app-static for openSUSE:Factory checked in at 2020-09-30 19:53:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-wai-app-static (Old)
and /work/SRC/openSUSE:Factory/.ghc-wai-app-static.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-wai-app-static"
Wed Sep 30 19:53:37 2020 rev:3 rq:838496 version:3.1.7.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-wai-app-static/ghc-wai-app-static.changes 2020-08-28 21:41:05.372880885 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-wai-app-static.new.4249/ghc-wai-app-static.changes 2020-09-30 19:53:45.340750611 +0200
@@ -1,0 +2,6 @@
+Tue Sep 22 12:28:11 UTC 2020 - psimons(a)suse.com
+
+- Update wai-app-static to version 3.1.7.2 revision 1.
+ Upstream has revised the Cabal build instructions on Hackage.
+
+-------------------------------------------------------------------
New:
----
wai-app-static.cabal
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-wai-app-static.spec ++++++
--- /var/tmp/diff_new_pack.1XxfCN/_old 2020-09-30 19:53:48.932753822 +0200
+++ /var/tmp/diff_new_pack.1XxfCN/_new 2020-09-30 19:53:48.932753822 +0200
@@ -25,6 +25,7 @@
License: MIT
URL: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{ve…
+Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal…
BuildRequires: chrpath
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-blaze-html-devel
@@ -75,6 +76,7 @@
%prep
%autosetup -n %{pkg_name}-%{version}
+cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
++++++ wai-app-static.cabal ++++++
name: wai-app-static
version: 3.1.7.2
x-revision: 1
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael(a)snoyman.com>
maintainer: Michael Snoyman <michael(a)snoyman.com>, Greg Weber <greg(a)gregweber.info>
synopsis: WAI application for static serving
description: API docs and the README are available at <http://www.stackage.org/package/wai-app-static>.
category: Web, Yesod
stability: Stable
cabal-version: >= 1.10
build-type: Simple
homepage: http://www.yesodweb.com/book/web-application-interface
Extra-source-files:
images/folder.png
images/haskell.png
test/*.hs
test/a/b
tests.hs
README.md
ChangeLog.md
Flag print
Description: print debug info
Default: False
library
default-language: Haskell2010
build-depends: base >= 4 && < 5
, wai >= 3.0 && < 3.3
, bytestring >= 0.10.4
, http-types >= 0.7
, transformers >= 0.2.2
, unix-compat >= 0.2
, directory >= 1.0.1
, containers >= 0.2
, time >= 1.1.4
, old-locale >= 1.0.0.2
, file-embed >= 0.0.3.1
, text >= 0.7
, cryptonite >= 0.6
, memory >= 0.7
, http-date
, blaze-html >= 0.5
, blaze-markup >= 0.5.1
, mime-types >= 0.1 && < 0.2
, unordered-containers >= 0.2
, template-haskell >= 2.7
, zlib >= 0.5
, filepath
, wai-extra >= 3.0 && < 3.2
, optparse-applicative >= 0.7
, warp >= 3.0.11 && < 3.4
exposed-modules: Network.Wai.Application.Static
WaiAppStatic.Storage.Filesystem
WaiAppStatic.Storage.Embedded
WaiAppStatic.Listing
WaiAppStatic.Types
WaiAppStatic.CmdLine
other-modules: Util
WaiAppStatic.Storage.Embedded.Runtime
WaiAppStatic.Storage.Embedded.TH
ghc-options: -Wall
if flag(print)
cpp-options: -DPRINT
Executable warp
default-language: Haskell2010
Main-is: warp-static.hs
hs-source-dirs: app
Build-depends: base >= 4 && < 5
, wai-app-static
, directory >= 1.0
, containers >= 0.2
, bytestring >= 0.10.4
, text >= 0.7
, mime-types >= 0.1 && < 0.2
test-suite runtests
default-language: Haskell2010
hs-source-dirs: test
main-is: ../tests.hs
type: exitcode-stdio-1.0
build-depends: base >= 4 && < 5
, hspec >= 1.3
, unix-compat
, time
, old-locale
, http-date
, wai-app-static
, wai-extra
, wai
, http-types
, network
, bytestring
, text
, transformers
, mime-types
, zlib
, filepath
, temporary
, mockery
-- , containers
ghc-options: -Wall
source-repository head
type: git
location: git://github.com/yesodweb/wai.git
1
0
Hello community,
here is the log from the commit of package ghc-http-date for openSUSE:Factory checked in at 2020-09-30 19:53:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-http-date (Old)
and /work/SRC/openSUSE:Factory/.ghc-http-date.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-http-date"
Wed Sep 30 19:53:33 2020 rev:3 rq:838494 version:0.0.9
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-http-date/ghc-http-date.changes 2020-08-28 21:33:45.088677566 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-http-date.new.4249/ghc-http-date.changes 2020-09-30 19:53:38.856744813 +0200
@@ -1,0 +2,6 @@
+Fri Sep 25 02:00:58 UTC 2020 - psimons(a)suse.com
+
+- Update http-date to version 0.0.9.
+ Upstream does not provide a change log file.
+
+-------------------------------------------------------------------
Old:
----
http-date-0.0.8.tar.gz
New:
----
http-date-0.0.9.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-http-date.spec ++++++
--- /var/tmp/diff_new_pack.vSlhmO/_old 2020-09-30 19:53:42.976748498 +0200
+++ /var/tmp/diff_new_pack.vSlhmO/_new 2020-09-30 19:53:42.984748505 +0200
@@ -19,7 +19,7 @@
%global pkg_name http-date
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.0.8
+Version: 0.0.9
Release: 0
Summary: HTTP Date parser/formatter
License: BSD-3-Clause
++++++ http-date-0.0.8.tar.gz -> http-date-0.0.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-date-0.0.8/Network/HTTP/Date/Converter.hs new/http-date-0.0.9/Network/HTTP/Date/Converter.hs
--- old/http-date-0.0.8/Network/HTTP/Date/Converter.hs 2018-07-26 06:04:25.000000000 +0200
+++ new/http-date-0.0.9/Network/HTTP/Date/Converter.hs 2020-09-25 03:36:29.000000000 +0200
@@ -4,8 +4,6 @@
, utcToHTTPDate
) where
-import Control.Applicative
-import Data.ByteString.Internal
import Data.Time
import Data.Time.Calendar.WeekDate
import Data.Word
@@ -13,7 +11,7 @@
import Foreign.Ptr
import Foreign.Storable
import Network.HTTP.Date.Types
-import System.IO.Unsafe (unsafePerformIO)
+import System.IO.Unsafe (unsafeDupablePerformIO, unsafePerformIO)
import System.Posix.Types
{-|
@@ -94,10 +92,10 @@
isLeap year = year `rem` 4 == 0
&& (year `rem` 400 == 0 ||
year `rem` 100 /= 0)
- (months, daysArr) = if isLeap yy
+ (mnths, daysArr) = if isLeap yy
then (leapMonth, leapDayInMonth)
else (normalMonth, normalDayInMonth)
- findMonth n = inlinePerformIO $ (,) <$> (peekElemOff months n) <*> (peekElemOff daysArr n)
+ findMonth n = unsafeDupablePerformIO $ (,) <$> (peekElemOff mnths n) <*> (peekElemOff daysArr n)
----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-date-0.0.8/http-date.cabal new/http-date-0.0.9/http-date.cabal
--- old/http-date-0.0.8/http-date.cabal 2018-07-26 06:04:25.000000000 +0200
+++ new/http-date-0.0.9/http-date.cabal 2020-09-25 03:36:29.000000000 +0200
@@ -1,5 +1,5 @@
Name: http-date
-Version: 0.0.8
+Version: 0.0.9
Author: Kazu Yamamoto <kazu(a)iij.ad.jp>
Maintainer: Kazu Yamamoto <kazu(a)iij.ad.jp>
License: BSD3
@@ -7,10 +7,11 @@
Synopsis: HTTP Date parser/formatter
Description: Fast parser and formatter for HTTP Date
Category: Network, Web
-Cabal-Version: >= 1.8
+Cabal-Version: >= 1.10
Build-Type: Simple
Library
+ Default-Language: Haskell2010
GHC-Options: -Wall
Exposed-Modules: Network.HTTP.Date
Other-Modules: Network.HTTP.Date.Converter
@@ -24,6 +25,7 @@
, time
Test-Suite spec
+ Default-Language: Haskell2010
Type: exitcode-stdio-1.0
HS-Source-Dirs: test
Main-Is: Spec.hs
@@ -37,6 +39,7 @@
, time
Test-Suite doctests
+ Default-Language: Haskell2010
Type: exitcode-stdio-1.0
HS-Source-Dirs: test
Ghc-Options: -threaded
1
0