[ANN] Pedestal 0.7.0

71 views
Skip to first unread message

Howard Lewis Ship

unread,
Jul 2, 2024, 8:22:28 PMJul 2
to clo...@googlegroups.com
Pedestal 0.7.0

Pedestal is a set of Clojure libraries that bring the core Clojure
principles - Simplicity, Power, and Focus - to server-side
development.

This release marks significant improvements to Pedestal, while laying
the cornerstones for further improvements.
The primary focus has been upgrading from Jetty 9 to Jetty 11 (and
from Servlet API 3.1 to 5); much additional effort
has been invested in improving the developer experience, rewriting
support for application observability,
enhancements to performance, deprecation of unused (or unsupported)
code, as well as an intense focus on documentation improvements.

Although this release does include unavoidable breaking changes, we
hope that for most applications, the upgrade process will
be as simple as changing the version number. Applications that made
direct use of Jetty APIs, or servlet APIs (using the javax.servlet
namespace),
will require additional scrutiny to upgrade, as will applications that
make extensive use of the (now deprecated)
observability functions provided by the io.pedestal/pedestal.log library.

GitHub: https://github.com/pedestal/pedestal
Documentation: http://pedestal.io/

*BREAKING CHANGES:*

- Library pedestal.jetty has been upgraded from Jetty 9 to Jetty 11
- Library pedestal.immutant has been removed
- Library pedestal.tomcat has been removed
- Library pedestal.aws has been removed
- Namespace `io.pedestal.http.jetty.websockets` has been removed, and
replaced with `io.pedestal.http.websockets`
- Namespace `io.pedestal.interceptor.error` has been moved to a new
library, io.pedestal/pedestal.error
- Library pedestal.service no longer has a dependency on
org.clojure/core.match; the new pedestal.error library has that
dependency
- Interceptors that attach an invalid :response value (not a map, for
example) will now cause an exception to be thrown
- Interceptors may now attach a partial :response map, containing just
a :status key

Other changes:
- When using `io.pedestal.http/dev-interceptors`, uncaught exceptions
are now formatted using org.clj-commons/pretty in the response sent to
the client
- Pedestal is now compatible with Clojure 1.10.1 and above
- In `io.pedestal.interceptor.chain`:
- New macros `bind` and `unbind` make it easier for interceptors
to manipulate dynamic variables exposed to following interceptors
- New function `on-enter-async` is used to register a callback
invoked when execution first goes asynchronous
- New function `queue` is used to peek at what interceptors remain
on the queue
- New function `add-observer` to add a callback after each
interceptor executes in each stage
- New function `io.pedestal.interceptor.chain.debug/debug-observer` to
observe and log changes to the context made by interceptors
- New function `io.pedestal.http/enable-debug-interceptor-observer` to
setup `debug-observer`
- New service map keys have been introduced:
- Support handling of uncaught exceptions
- May now specify an initial context map
- May now specify an interceptor responsible for request tracing
- There is now a clojure.spec specification for the structure of the
service map, and for the structure of the different route
specifications and the expanded routing table
- Added a deps-new template, io.pedestal/embedded, for creating a new
Pedestal project around embedded Jetty
- Use of many deprecated functions and macros now cause deprecation
warnings to be printed to stderr
- Metrics and tracing have been reimplemented from the ground up
around Open Telemetry (https://opentelemetry.io/)
- Libraries pedestal.log and pedestal.error contain clj-kondo
configuration files to inform clj-kondo about their macros
- New function `io.pedestal.http/respond-with` to streamline adding a
:response to the interceptor context
- Easier application configuration: logger, metrics, and tracing
configuration can occur inside a `pedestal-config.edn` file (or
`pedestal-test-config.edn` for tests), as well as via JVM system
properties and environment variables
- Improvements to REPL-based development, including printing the
expanded routing table at startup (when in development mode)

[Closed Issues](https://github.com/pedestal/pedestal/milestone/12?closed=1)

--
Howard M. Lewis Ship

Senior Staff Software Engineer at NuBank
Reply all
Reply to author
Forward
0 new messages