Skip to content

Lift Framework 3.3.0-M2

Pre-release
Pre-release
Compare
Choose a tag to compare
@farmdawgnation farmdawgnation released this 14 Apr 14:39
3.3.0-M2-release

The Lift Committers are pleased to announce the release of Lift 3.3.0-M2 on April 14th, 2018. This release is the second of three milestone releases for Lift 3.3.0. The next milestone release is tentatively scheduled for June 1st, 2018. As always, you can follow along with our progress in the GitHub Milestone View.

Please read below for the changes in this milestone.

Changes

BREAKING CHANGES

It is rare for Lift to decide to ship what amounts to a breaking change in a minor point release. However, during this release cycle we discovered a bug in the implementation of LAFuture that resulted in the aborted_? check method not working as users expect. Unbeknownst to us, the aborted_? check method was looking at the satisfied internal state setting instead of the aborted internal state setting. This meant that satisfied_? and aborted_? always returned the same result even though they were not the same internal state.

With a lot of consideration, we decided to correct the behavior in Lift 3.3.0 in Pull Request #1940, because it never worked as advertised and the expected impact to user code is that it starts working as the user intended. We are not going to backport this change to avoid user code behavior changing on a patch release.

New Features

(#1933) Configurable asset path for Lift-specific assets

By default, Lift will attempt to load an AJAX Spinner gif when doing certain server-to-client operations. Some folks turn this off, but it remains one of the niceties that folks can lean on when waiting on the server and the client to finish talking to each other. Historically, Lift has insisted that for this feature to work the ajax gif must be located at /images/ajax-loader.gif, however not everyone wants to lay out their application in that fashion.

There is a new lift rule located at LiftRules.assetRootPath that makes the location of your assets configurable. Its default value is /, which preserves the existing behavior. You can, however, make it whatever you like.

You could put your AJAX loader at /assets/images/ajax-loader.gif. You could put it between two slices of bread. You could put it on Amazon S3, instead. You'll be amazed at the places you can put this gif, if you only use your head.

Many thanks to @heharkon!

(#1939) Customizable Service Timers

Many folks using Lift are familiar with the classic timer log messages that appear by default to tell you how long each request in Lift is taking. By default they tend to look like this:

INFO net.liftweb.util.TimeHelpers - Service request (GET) / returned 200, took 455 Milliseconds

Lift now provides the ability to implement custom timing methods through the implementation of the ServiceRequestTimer trait. Using a ServiceRequestTimer you can:

  • Control how messages are timed.
  • Control where that timing information gets reported.

You could, for example, report all request timings to a metrics aggregator and graph the various percentiles of response times as a part of your monitoring. You could only time a subset of requests (those testing newer functionality, for example).

These changes provide a new LiftRules.installServiceRequestTimer function to install the timer of your choice. net.liftweb.http.StandardServiceTimer implements the current behavior. Further, the LiftRules.logServiceRequestTiming is now deprecated and will be removed in Lift 4 in favor of installServiceRequestTimer.

Many thanks to @andreak!

Improvements

  • (#1846) @Shadowfiend's much anticipated in-repo getting started tutorial is now in master! Check it out
  • (#1940) Correction to LAFuture.isAborted_? and a variable allocation cleanup. Thank you to @zhongsigang
  • (#1942, #1945) Deprecated our internal BCrypt implementation in lift-util in favor of using the publicly-available jBCrypt library. net.liftweb.util.BCrypt was just a copy/paste of version 0.3 of jBCrypt. It is now officially deprecated and is now simply a proxy class to org.mindrot.jbcrypt.BCrypt. net.liftweb.util.BCrypt will be removed in Lift 4.0. (h/t @eltimn)
  • (#1943) Upgraded the Mongo driver to 3.6.3 (h/t @eltimn)
  • (#1944) Some code gardening courtesy of @eltimn!

About Lift

The Lift Framework is a mature, advanced framework for the modern software engineer. There are Seven Things that set Lift apart from the other frameworks out there today: it's secure-by-default, developer-centric, scalable, capable of rich interactive behavior, modular, and designer-friendly. If you're new to Lift or interested in checking out what these things mean, we recommend checking out Simply Lift and The Lift Cookbook.

The Lift Mailing List is also a good resource for anyone to ask questions or just meet other Lift users. The Lift README is a good resource for figuring out how to use Lift in your project.