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.
Example:
WARNING: io.pedestal.interceptor.chain/execute-only is deprecated and may be removed in a future release
Call stack: ... clojure.test/test-var -> clojure.test/test-var/fn -> io.pedestal.interceptor-test/fn -> io.pedestal.interceptor.chain/execute-only
The warning is followed by the last few stack frames leading up to the deprecated function, to assist you in finding the code that needs to be changed.
This output is printed to the console (standard error), and is not logged.
The following sections are a non-exhaustive list of code and functionality deprecated in 0.7.0 that may be removed in 0.8.0 or a later release:
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 given the addition of development mode and live REPL reloading improcements, and
so 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 be converted 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.
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.