Deprecations

0.7.0

In most cases, Pedestal can now emit a warning the first time a deprecated function, macro, or other bit of functionality is used; these warnings are printed to the console (not logged).

Example:

WARNING: io.pedestal.http.route.definition/defroutes is deprecated and may be removed in a future release

The following sections are a non-exhaustive list of deprecations.

Interceptors

Release 0.7.0 saw the introduction of the routes-from macro, a new and preferred way of supporting live code changes at the REPL.

Previously, it was possible to convert a function call into an interceptor; the point of this was to defer invoking the function until when the route specification was converted to a router (which can happen on every request when in development mode); however, this relied on the use of eval, and is of no real utility with development mode and live REPL reloading and has been deprecated.

Normally, a function in an interceptor list is treated as a handler (rather than an interceptor). Alternately, a function with the :interceptor or :interceptorfn metadata would be invoked and expected to return an interceptor (or some other object that could convert to an interceptor). This is termed a deferred interceptor and has also been deprecated.

Handler functions are not deprecated, and are quite useful.

Service

The io.pedestal.http.request.lazy and io.pedestal.http.request.zerocopy namespaces have been deprecated; neither is used by Pedestal.

Service Tools

The entire pedestal/pedestal.service-tools library has been deprecated.

Interceptor Chain

The execute-only function has been deprecated; it is not believed this function is used outside of Pedestal’s test suite. Removing it opens up some options for optimizing chain execution in a later release.

Likewise, the newly added queue function replaces accessing the interceptor execution queue using the :io.pedestal.interceptor.chain/queue key; this will also allow future optimizations to chain execution.

Tracing and Metrics

The namespace io.pedestal.interceptor.trace was deprecated along with many related functions and protocols in the io.pedestal.log namespace related to metrics and tracing; these have been replaced with a new library, pedestal.telemetry.

0.6.0

The entire io.pedestal.interceptor.helpers namespace was deprecated; this had been retained since 2016 for backwards compatibility.