Commit Graph

5131 Commits

Author SHA1 Message Date
Jappie Klooster
827d9269b0 update changelog 2022-07-06 22:41:52 +02:00
Jappie Klooster
1487b121be Make catching exceptions configurable.
Fixes https://github.com/yesodweb/yesod/issues/1771

This is done by adding a function to Yesod
typeclass which can match on any exception
and tell the framework if it should rethrow
or not.

I used an overridable function because it seemed
more flexible then a whitelist.
A user can now for example choose to throw
everything, or catch everything as easily.

add docs

bump
2022-07-06 22:40:24 +02:00
Michael Snoyman
99c1fd49a3
Merge branch 'patch-1' of https://github.com/friedbrice/yesod 2022-05-11 14:44:27 +03:00
Michael Snoyman
50c439da56
Merge pull request #1768 from SupercedeTech/quote-in-test
Fix quote ' not matching in htmlContain* functions
2022-05-11 14:05:57 +03:00
Daniel P. Brice
b8de71c5ab
Update ChangeLog.md 2022-05-10 13:31:34 -07:00
Jappie Klooster
b88b1f430f Add link to PR 2022-05-10 16:27:28 -04:00
Daniel P. Brice
d5a194a7dd
Update yesod-test.cabal 2022-05-10 13:25:45 -07:00
Daniel P. Brice
8028f1defd
assertEq delegates to HUnit.assertEqual
HUnit.assertEqual gives a formatted diff, making it easier to see the differences between the two values at a glance.
2022-05-10 13:24:21 -07:00
Jappie Klooster
5f3e237c29 Bump version and add changes 2022-05-10 16:24:07 -04:00
Jappie Klooster
28fc2269b0 Fix quote ' not matching in any body
This sometimes occured in our code base when generating
names with the fakedata package, someone named o'conner
randomly fails a particular test.

Also add tests for the other matching function and fixed them.

Furthermore, I snuck in logging of the matches as well.
2022-05-10 16:20:35 -04:00
Michael Snoyman
0a273d5aae
Merge pull request #1766 from ivanbakel/fix-meta-typo
Fix typo in how description meta tags are laid out
2022-04-25 05:15:55 +03:00
Isaac van Bakel
032b906a73 Bump version to 1.6.23.1, update ChangeLog 2022-04-21 14:35:22 +01:00
Isaac van Bakel
1295f1c643 Fix typo in how description meta tags are laid out 2022-04-21 14:32:49 +01:00
Michael Snoyman
f338e519f2
Merge pull request #1765 from ivanbakel/idempotent-description
Add API for idempotent page description editing
2022-04-21 05:35:40 +03:00
Isaac van Bakel
04683ca58b Bump yesod-core version, update ChangeLog 2022-04-20 13:01:26 +01:00
Isaac van Bakel
b9fbdb3950 Add idempotent versions of setDescription API
`setDescription` and `setDescriptionI` present a similar API to
`setTitle` and `setTitleI`, but unlike those functions the description
functions are not idempotent - so calling them multiple times inserts
multiple `<meta/>` tags in HTML `<head/>`.

This adds explicitly idempotent versions of those functions which are
handled in a similar way to the title, so that calling them multiple
times has the effect of taking the final value specified.

Because the non-idempotent behaviour of setDescription is not obvious,
this also adds warnings for that behaviour to make it clear what the
effect of multiple calls will be. Unfortunately, setDescriptionIdemp
can't be made a drop-in replacement because developers may have defined
their own layouts which need to take pageDescription into account.
2022-04-20 12:54:23 +01:00
Isaac van Bakel
9c0b00190a Add test of setDescription idempotency
Like setTitle, this function should really be idempotent so developers
don't add multiple conflicting meta descriptions to the page. Unlike
setTitle, the function currently fails its idempotency test.
2022-04-20 12:01:34 +01:00
Michael Snoyman
4f962c9073
Merge pull request #1764 from parsonsmatt/matt/yesod-test-expose-sio
Expose SIO type
2022-04-18 09:09:09 +03:00
parsonsmatt
ef4178f4c8 Add runSIO, changelog, version bump 2022-04-14 08:50:41 -06:00
Michael Snoyman
b0e461c669
Merge pull request #1760 from parsonsmatt/matt/support-persistent-2.14
Support persistent-2.14
2022-04-14 05:53:19 +03:00
parsonsmatt
60d0748834 Expose SIO type 2022-04-13 16:27:01 -06:00
parsonsmatt
7bec27aa3c changelog link 2022-04-13 10:14:55 -06:00
parsonsmatt
d54c17ef27 changelog, version 2022-04-13 10:14:17 -06:00
parsonsmatt
5f71a49c0f Support persistent-2.14 2022-04-13 10:10:35 -06:00
Michael Snoyman
d831b9f108
Merge pull request #1756 from SupercedeTech/remove-sometimes-failing-test
Remove sometimes failing superfluous  test
2022-03-25 16:57:37 +03:00
Jappie Klooster
d54dbf5fd6 bump version number 2022-03-25 07:52:32 -04:00
Jappie Klooster
4daf1d2107 update changelog 2022-03-25 07:51:57 -04:00
Jappie Klooster
73f20b6285 Remove sometimes failing test
This test sometimes fails on nix builds.
I'm not sure why, but it should be superflous with
"thread killed = 500" test anyway.

They test both for async exceptions.
Just a different one.
2022-03-25 07:30:33 -04:00
Michael Snoyman
3d65a3bf16
Remove NumericUnderscores for older GHCs 2022-03-24 10:29:28 +02:00
Michael Snoyman
60111462de
Merge branch 'ghc-9.2-compat' of https://github.com/TeofilC/yesod 2022-03-24 05:25:39 +02:00
Michael Snoyman
53936c43a3
Merge branch 'fix-catch-async-exception-on-requst-threads' of https://github.com/SupercedeTech/yesod 2022-03-24 05:24:18 +02:00
Michael Snoyman
c74fc994ae
Merge pull request #1752 from lykahb/lykahb/content-void
Create instances for ToContent Void, ToTypedContent Void
2022-03-24 04:41:55 +02:00
Teo Camarasu
c6fab6f410 update yesod-bin changelog 2022-03-23 08:43:20 +00:00
Teo Camarasu
b117e5a4cd update yesod-core changelog 2022-03-23 08:43:20 +00:00
Teo Camarasu
87427c1290 bump yesod-bin 2022-03-23 08:43:20 +00:00
Teo Camarasu
3c2b50e08c bump yesod-core 2022-03-23 08:43:20 +00:00
Teo Camarasu
24d3ea9e53 Fix building yesod-bin with Cabal-3.6 2022-03-23 08:43:20 +00:00
Ryan Scott
9039df924d Allow building with template-haskell-2.18.0 2022-03-22 20:29:50 +00:00
Jappie Klooster
764fd94bc6 add changelog entry 2022-03-22 15:51:10 -04:00
Jappie Klooster
f48485e181 Bump version number 2022-03-22 15:46:47 -04:00
Jappie Klooster
5b96d94915 Fix it for async exceptions in the sessions as well 2022-03-22 15:45:20 -04:00
Jappie Klooster
e284a68a9f Remove the use of masks
I don't think these are neccisary.
If an exception get's delivered at these points,
we couldn't do anything about it anyway
2022-03-22 15:18:38 -04:00
Jappie Klooster
4c1719cb6e Disable the allocation limit within the test instead
I don't think we should add that to the function
seems odly specific
2022-03-22 15:15:49 -04:00
Jappie Klooster
eb7405765d Add async exception handling for basic runner. 2022-03-22 14:47:27 -04:00
Jappie Klooster
42abd9b666 add explicit exports 2022-03-22 14:20:46 -04:00
Jappie Klooster
08d37a1857 Add test showing the failures 2022-03-22 14:02:25 -04:00
Boris Lykah
7d44c38c91 Update changelog 2022-03-22 11:46:09 -06:00
Boris Lykah
8fb0cbb31a Bump version for yesod-core 2022-03-22 11:44:16 -06:00
Boris Lykah
d3808c3a97 Create instances for ToContent Void, ToTypedContent Void 2022-03-21 12:17:24 -06:00
Sergiu Starciuc
48d05fd6ab
Color field (#1748)
This PR adds a new colorField function to create an html color field (<input type="color">) as described at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input/color
2022-03-02 17:49:09 +01:00