-
Notifications
You must be signed in to change notification settings - Fork 373
Detailed change list
snoyberg edited this page Mar 15, 2013
·
30 revisions
This page mostly focuses on detailed views of breaking changes, not necessarily covering new features. For a higher-level view, see Changelog.
- Removed a number of deprecated functions from Yesod.Widget. These can be replaced with
toWidget
,toWidgetHead
,toWidgetBody
, andtoWidgetMedia
.toWidgetMedia
was added in 1.2 and replacesaddLuciusMedia
andaddCassiusMedia
as a means of adding CSS that only applies to specific media types. - yesod-json has been deprecated. Its functionality has been folded into yesod-core itself.
- Felipe's newer, more efficient session code is the default. More information: https://github.com/yesodweb/yesod/issues/415#commit-ref-2009165
- Everything in Yesod.Handler now lives in a typeclass. All functions work in the master site by default, with a few functions provided to deal with subsites. The most important change here was getCurrentRoute, which now has much more sane behavior.
- Overhaul to the content/representation breakdown. RepHtml et al are deprecated. ChooseRep is gone. Now we have Content, TypedContent, and HasContentType. NOTE: This needs more explanation, I'll write a blog post about this and the YesodRequest/YesodResponse switch.
- yesod-default has been deprecated. Its functionality has been folded into the yesod package.
Changes on the experimental new-subsite branch:
- GHandler and GWidget are replaced entirely with HandlerT and WidgetT. We no longer have a modified
lift
function, since everything is a standard transformer. You need not (and in fact, can not) lift Handler function into a Widget. If you need to lift ResourceT actions into a Handler or Widget, use liftResourceT. - Subsite creation has been overhauled entirely. Need a blog post on this.
- Changed some Yesod typeclass functions: getLogger is now makeLogger. messageLogger, logLevel, gzipSettings have been removed.
- toWaiApp no longer applies any middlewares.
- MForm takes three arguments instead of 4 (no subsite). A typical
Form
type synonym in Foundation.hs would be: type Form x = Html -> MForm Handler (FormResult x, Widget)
- The Yesod ecosystem now supports conduit 1.0. This release of conduit is largely backwards compatible, and therefore most code will work with both conduit 0.5 and 1.0 (as is the case for Yesod itself). Little user modification should be necessary. For more information, see the blog post.
- wai 1.4 has been released, which adds a new field
requestBodyLength
to theRequest
datatype. - monad-logger 0.3 is out, which no longer provides instances for
IO
. As a result, in a few places you may need to explicitly use a transformer to deal with logging. This will most commonly occur in the scaffolding with the runMigration call. The simplest thing to do is importControl.Monad.Logger
and addrunNoLoggingT
to the beginning. For a more sophisticated approach, see the changes to the scaffolding.
- yesod-core 1.1.7 has introduced a new means of creating session backends (clientSessionBackend2) and deprecated the old one. Going forward, the old method will be removed, which will allow us some significant performance optimizations. See: https://github.com/yesodweb/yesod/pull/418
- hamlet 1.1.3.1 now gives you an error message when a class name contains a hash, to avoid the problem of IDs accidentally being slurped up by class names. See: https://github.com/yesodweb/shakespeare/issues/75