Release: 0.31.0 - Clojure Convergence

Released

Protocols + transducers + reader conditionals/.cljc + regex literals + rich REPL introspection tools

🎉 Added

Reader & Compiler

  • #?() reader conditionals and #?@() reader conditional splicing with :phel/:default platform keys, plus .cljc file support (#1171)
  • #"..." regex literal syntax as reader sugar for PCRE patterns (#1153)
  • re-find, re-matches regex functions (#1153)
  • @ reader syntax as shorthand for (deref ...) (#1164)
  • #(...) anonymous function shorthand with %, %1, %2, %& parameter placeholders (#1146)
  • Deprecation warnings for # line comments and #| |# multiline comments (#1146)
  • Store parameter names as :arglists in function metadata during compilation (#1127)

Core Language

  • Protocol system: defprotocol, extend-type, extend-protocol, satisfies?, extends? (#1151)
  • Hierarchy system: derive, underive, isa?, parents, ancestors, descendants, make-hierarchy with hierarchy-aware multimethod dispatch (#1156)
  • Transducer system: transduce, into (3-arg), sequence, completing, cat, plus transducer arities for map, filter, remove, take, drop, take-while, drop-while, take-nth, keep, keep-indexed, distinct, dedupe, mapcat, interpose (#1152)
  • ex-info, ex-data, ex-message, ex-cause for structured exceptions with data maps (#1149)
  • delay, force, delay? for deferred cached computation (#1155)
  • add-watch, remove-watch, set-validator!, get-validator for atom observation (#1154)
  • iteration function for consuming paginated/cursor-based APIs as lazy sequences (#1157)
  • update-keys, update-vals, parse-long, parse-double, parse-boolean, abs, inf?, random-uuid utility functions (#1150)

REPL & Tooling

  • source, find-fn, symbol-info introspection functions (#1128, #1132, #1125)
  • ns-publics, ns-aliases, ns-refers, ns-list for namespace introspection (#1131, #1134)
  • macroexpand-1, macroexpand macros and CompilerFacade methods (#1138)
  • eval-str, eval-capturing, load-file evaluation functions (#1136, #1135, #1124)
  • test-ns for running namespace tests interactively; reset-stats, get-stats, restore-stats for test management (#1133)
  • GlobalEnvironment snapshot/restore to rollback state on eval errors (#1129)
  • Structured stack frames in EvalError for nREPL stacktrace support (#1130)
  • Typed completion results and alias/referred-symbol completion in ReplCompleter (#1137, #1121)
  • Stdout capture in EvalResult, structuredEval() on RunFacade for external tooling (#1123, #1121)
  • Auto-inject REPL utilities (doc, require, use) on (in-ns ...) (#1121)

⚖️ Changed

  • Standardize comment syntax: replace # with ; and ;; for standalone comments across all Phel source files (#1140)

🐛 Fixed

  • .cljc files not discovered by phel run and phel ns due to missing extension in cached namespace extractor (#1176)
  • phel --help showing only REPL help instead of all commands (#1141)
  • (str false) and (str true) now return "false" and "true" (Clojure semantics) (#1122)
  • REPL: *ns* preserves hyphens, (ns ...) requires work with empty src-dirs, runtime require works without loadPhelNamespaces() (#1120)
  • phel run: prevent duplicate output on first run (#1142)
  • PHAR: deduplicate stdlib source directory, pre-compile all stdlib modules (#1119)
  • Cache: resolve compiled paths from current cache dir, not stored paths (#1119)

👥 Contributors

@Chemaclass @JesusValeraDev @SauronBot

Full Changelog: v0.30.0...v0.31.0

Downloads


View release on GitHub