Announcing Yesod 0.10
February 9, 2012
We are proud to announce the relase of Yesod 0.10 Please note that 0.10 < 1.0
The main purpose of this release was to switch to conduits. But while we were waiting for the conduit integration to mature, we added a log of great stuff.
Please see the upgrade guide for 0.10. This is a wiki page: please add your notes and improvements.
If you haven't upgraded to 0.9.4, please see the previous release announcement.
There were so many improvements to Persistent, that it needed its own release announcement: Persistent 0.8
Some quick highlights:
- New rawSql interface
- New MySQL backend, couchDB in the works
- Support for embedded records, maps, lists, and sets
For most users, only the initialization of Persistent in their site will be effected: persistent queries are still the same.
We now use the new addDependentFile for GHC 7.4 users. This means ghc will automatically recompile your shakespeare templates when they change. This takes a burden of dependency tracking away from yesod devel: for 7.4 its main utitlity is to automatically restart compilation.
Coffeescript compilation is now performed at compilation time. This pattern is now supported in the shakespeare library: if a template needs to execute an external program, that should be done once at compilation time. This finally makes Coffeescript a great, effortless option.
The big change is the move to conduits. There were also a lot of small bug fixes and performance improvements. The RequestLogger Interface was improved, and a bug in fast-logger that it uses was squashed. We are now experimenting with ways to make WAI a more powerful way to share code. One limiting factor was not being able to pass along arbitrary data. WAI now has a vault parameter for that purpose, which uses the vault package.
Again, the focus of this release was the switch to conduits. For a Yesod user this is mostly an implementation detail. This leaked in two main places: the scaffolding configuration (see upgrade guide), and exception handling. With the move to conduits we have completely removed the liftIOHandler exception handling hack.
Approot, the setting which generates urls is maturing, see the upgrade guide. You now have the option of changing the url based on request information.
The redirect system has been reworked to use the correct status and to remove redundancies. The need for RedirectTemporary has been removed, and instead we just default to the correct HTTP status codes. If you want to specify an HTTP status, use redirectWith.
Improved routing. While there were some bug fixes, the main improvement is a .scalable dispatcher. Most web framework routers dumbly check routes one-by-one until they find a match. Yesod now features an efficent dispatch. The literate haskell source explains the two main optimizations:
- Break up routes based on how many components they can match (slashes in a route). This lookup runs in constant time.
- Use a Map to reduce string comparisons for each route to logarithmic complexity.
We consider this to be a 1.0 release candidate. We want 1.0 to be very solid release, so we definitely needed this extra release cycle for the move to conduits. 1.0 for us means a stable API - now is your last chance to propose good API changes without getting a lot of pushback and requirements for maintaining deprecated APIs.
If you look at the 1.0 roadmap we posted, we have accomplished everything except easy testing integration and static html generation. However, we have pull requests for both of those waiting right now!
Thanks to everyone that helps improve Yesod. Please upgrade to 0.10 and let us know how to make it even better.