Fork me on GitHub
#announcements
<
2024-07-03
>
hlship00:07:22

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 https://github.com/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 https://opentelemetry.io/ • Libraries pedestal.log and pedestal.error contain https://github.com/clj-kondo/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) https://github.com/pedestal/pedestal/milestone/12?closed=1

27
👍 9
🎉 20
gratitude 14
❤️ 5
onetom07:07:06

did u know that the terminal based https://joe-editor.sourceforge.io/ editor can also highlight Clojure code? it's just a single, 700KB binary plus some 1.3MB syntax, language, theme files. it does NOT have • very fancy syntax highlighting • paredit • code folding BUT it does have • buffers • horizontal split windows • built-in terminal emulator, which is a blend between an emacs shell and an ansi-term • optional emacs keybindings • jump to paren-pair • show 1st line of top-level form in status bar and a bunch more brew install joe works; nix-shell -p joe on macOS unfortunately does not. OR u can also brew install jupp, which is a fork with a bunch of bug fixes and whatnot. http://www.mirbsd.org/jupp.htm sooo, if u ever need to edit Clojure code in a constrained environment, where u don't have screen or tmux and want a bit more features than nano, then u know what to look for 🙂

nice 9
tatut07:07:09

if you don’t want to leave emacs and paredit… emacs can also edit files over ssh no problem

onetom09:07:11

can't argue with that 🙂 on that note, other relic i came across was xedit, the official, bundled editor for X11. i didn't know it has syntax highlighting capabilities and also has the concept of buffers and u can change between them with C-x C-b just like in emacs! • https://opensource.com/article/20/12/xedithttps://mastodon.sdf.org/@netbsd/110604094034442765

onetom09:07:45

well, it's C syntax highlighting, not Clojure, according to the screenshot, but maybe its user-defined? couldn't test it though because it crashes under recent nixos versions... 🙂

oyakushev16:07:50

I use mg (MicroGnuEmacs). Present in most distro repos, sub 1MB package, buffers, M-x, very Emacs-like. No syntax highlighting.

👍 2
1
plexus17:07:41

I used to use Joe when ssh-ing. Been a hot minute though. Some of the joe bindings are quite emacs like iirc

Wout Neirynck11:07:44

https://github.com/monkey-projects/aero-ext Aero-ext, a small lib with additional tag readers for Aero. Perhaps too specific to PR into Aero itself, so I've put it in a separate lib.

6
🎉 5
❤️ 2
👍 3
nice 1
igrishaev13:07:32

That's amazing. I remember I opened a PR to aero with a custom reader tag, and even after several months nobody paid attention. It looks like the only way is to drive you own library

Joe Littlejohn18:07:11

Looks great @U014Z1HN0GP, we can link to this from the aero readme.

onetom12:07:39

have u considered using https://github.com/weavejester/meta-merge instead of just medley deep-merge or is it intentionally limited to map merging? meta-merge would be a more focused and still very small dependency, but with more features.