releases

hlship 2025-07-17T17:44:52.138969Z

io.pedestal/pedestal 0.8.0-beta-2 Pedestal is a set of Clojure libraries that bring the core Clojure principles - Simplicity, Power, and Focus - to server-side development. https://github.com/pedestal/pedestal OVERVIEW: • Routing ◦ New Sawtooth router favors literal paths over those with path parameters, and can report any routing conflicts ◦ WebSocket upgrade requests now go through routing, the same as any other endpoint (previously handled as special case) ◦ Static files (file system or on JVM classpath) now also go through routing (previously handled via interceptors) • Servlet Support ◦ Upgraded to Jetty 12 • Non-Servlet Support ◦ Pedestal APIs that require Jakarta Servlet APIs are now in a new module, io.pedestal/pedestal.servlet ◦ Pedestal now supports non-servlet based HTTP libraries, such as https://github.com/http-kit/http-kit • Developer Experience ◦ io.pedestal.http replaced with simpler, streamlined io.pedestal.connector ◦ Improved REPL-oriented development, compatible with https://github.com/tonsky/clj-reload ◦ New definterceptor to create a record type that can be used as an interceptor ◦ Significant improvements to all documentation BREAKING CHANGES: • Clojure 1.11 is now the minimum supported version • The new Sawtooth router is now the default router • Anonymous interceptors are deprecated • Many APIs deprecated in Pedestal 0.7.0 have been removed outright • The io.pedestal/pedestal.service-tools library has been removed • Significant changes to io.pedestal.http.route have occurred • Fixed reloading behavior when namespaces are reloaded via https://github.com/tonsky/clj-reload • Server-Sent Events have been changed; fields are now terminated with a single \n rather than a \r\n (both are acceptible according to the SSE specification) • Exceptions in interceptors: ◦ The caught exception is now the ex-cause of the exception provided (in earlier releases, it was the :exception key of the data) ◦ The logic for when to suppress an exception thrown from the error handling interceptor has been simplified: always suppress except when the interceptor rethrows the exact error passed to it • io.pedestal.test has been rewritten, nearly from scratch ◦ The Servlet API mocks are now standard Java classes, not reify-ed classes ◦ A request body may now be a java.io.File • io.pedestal.http.servlet ◦ The reify'ed FnServlet class is now a standard Java class, io.pedestal.servlet.FnServlet ◦ The new FnServlet extends HttpServlet not Servlet • Deleted deprecated namespaces: ◦ io.pedestal.http.requestio.pedestal.http.request.lazyio.pedestal.http.request.zerocopy • Deleted vars (previously deprecated): ◦ io.pedestal.http ▪︎ json-printio.pedestal.http.body-params ▪︎ add-ring-middleware ▪︎ edn-parser ▪︎ json-parser ▪︎ transit-parserio.pedestal.http.ring-middlewares ▪︎ response-fn-adapterio.pedestal.http.impl.servlet-interceptor ▪︎ stylobate ▪︎ terminator-injector • Other deleted vars and namespaces: ◦ io.pedestal.http.route.definition/symbol->keywordio.pedestal.http.route.definition/capture-constraintio.pedestal.http.request.servlet-support Newly deprecated namespaces (these may be removed or made non-public in the future): • io.pedestal.jetty.containerio.pedestal.jetty.utilio.pedestal.httpio.pedestal.http.test Other changes: • A new router, io.pedestal.http.route.sawtooth, has been added ◦ Sawtooth identifies conflicting routes ◦ Sawtooth prefers literal routes over routes with path parameters (i.e., /users/search vs. /users/:id) • Deprecation warnings may now be suppressed • Metrics can now be configured to accept longs or doubles as their values. • Pedestal Connectors are a new abstraction around an HTTP library such as Jetty or Http-Kit; connectors do not use the Servlet API, and so are much lighter weight ◦ The io.pedestal.connector namespace is used to configure and start a Pedestal connector ◦ io.pedestal.connector.servlet and new Java class ConnectorServlet allow for WAR deployments • WebSockets are now routable using new function io.pedestal.websocket/upgrade-request-to-websocket • The pedestal.service module has been broken up; all the parts specific to the Jakarta Servlet API are now in the pedestal.servlet module • Table routes may now specify :interceptors (in the options map); these are prefixed on any interceptors provided by the routes in the table • Table routes may now include application-defined key/value pairs in addition to :route-name and :constraints • The first argument to io.pedestal.http.route.definition.table/table-routes may now be nil or a map • It is now possible to specify the maximum number of concurrent threads with the Jetty HTTP2 and HTTP2C connection factories • New functions and macros: ◦ io.pedestal.test/create-responder - useful piece needed in most tests ◦ io.pedestal.interceptor/definterceptor - easily create component records that transform into interceptors ◦ io.pedestal.log/log - logs with level determined at runtime • New namespaces: ◦ io.pedestal.connector - Replaces io.pedestal.http for setting up a connector ◦ io.pedestal.service.protocols - Defines core protocols ◦ io.pedestal.service.resources - Expose resources using routes not interceptors - Development/debugging tools ◦ io.pedestal.service.interceptors - Common interceptors ◦ io.pedestal.connector.test - Testing w/ Ring request and response (no Servlet API) ◦ io.pedestal.connector.servlet - bridge to Pedestal from a WAR deployment • When converting a handler function to an Interceptor ◦ Handler functions may now be asynchronous, returning a channel that conveys the response map ◦ The :name metadata on the function will be used as the :name of the interceptor ◦ Otherwise, a :name is derived from the function's class ◦ Previously, with the terse or verbose routing specifications, the route name would overwrite the (missing) name of the interceptor; now interceptors always have names and this does not occur ◦ Extracting default interceptor names from handlers can also be turned off, reverting to 0.7.x behavior • The io.pedestal.http.cors/allow-origin interceptor now, by default, logs at level debug (was level info previously) • Development mode is now configured as with other values, rather than strictly via a JVM system property • The embedded template now generates a less rudimentary index page, with basic styling https://github.com/pedestal/pedestal/milestone/17?closed=1

🎉 6
6
hlship 2025-07-17T20:57:09.293889Z

Well, it is a year of work!

1
2025-07-22T07:43:23.091959Z

👏Would merit an #announcements post

hlship 2025-07-22T15:15:01.863159Z

The final release is not too far off. #announcements is AFAIK for major release announcements, not interim.

2025-07-22T15:18:48.689709Z

It reads as a pretty major release already :) #announcements description only says max freq of 1 post per month and lib.

hlship 2025-07-22T15:19:47.044049Z

I'm still satisfied to wait until the final release. I'm getting good feedback about rough edges and minor bugs from the community.

👍 1
2025-07-22T15:30:02.199079Z

That's great, I didn't want to pressure you for more. And a pretty amazing overview, looking forward to reading the documentation!