Skip to content

Releases: lfe/lfe

v2.2.2

Choose a tag to compare

@oubiwann oubiwann released this 05 Aug 21:53

What's Changed

LFE 2.2.2 brings OTP 28/29 compatibility, new Clojure-inspired functions in clj, a compiler fix for non-standard output paths, and proper DESTDIR/PREFIX separation in the Makefile.

OTP 28+ compatibility (lfe -eval crash fix)

OTP 28 changed the user_drv noshell API to require an input key (#517, #518). Running lfe -eval '...' on OTP 28+ crashed with {badkey, input}.

lfe_init now dispatches across three OTP generations using integer comparison instead of string comparison of the release number:

  • OTP 28+: user_drv:start(#{initial_shell => noshell, input => cooked})
  • OTP 26–27: user_drv:start(#{initial_shell => noshell}) (unchanged)
  • OTP < 26: user:start() (legacy API)

A new Common Test suite (test/lfe_init_SUITE.lfe) verifies -eval behaviour across OTP versions.

New clj functions: println, printf, assoc, update, and friends

Two groups of Clojure-inspired additions to the clj module (#519, #520):

I/O macros β€” println and printf:

  • (clj:println "hello" "world") β†’ prints space-separated args with a trailing newline, returns 'ok
  • (clj:printf "~s is ~w" "answer" 42) β†’ formatted output using Erlang format specifiers, no automatic newline

Associative structure functions β€” assoc, assoc-in, update, update-in:

  • Work polymorphically across proplists, dicts, maps, and plain lists (1-based index)
  • assoc-in creates intermediate proplists for missing keys along the path
  • update / update-in apply a function to the current value at a key or key path

All new functions include full man-page documentation (lfe_clj(3)) and comprehensive tests.

Compiler: create output directories automatically

The compiler now ensures the output directory exists before writing .beam files (#508). This fixes compilation failures when integrating LFE into Mix projects where the target path (e.g. _build/prod/lib/lfe/ebin) hasn't been created yet. Uses filelib:ensure_dir/1 on OTP 25+ with a recursive fallback for older releases.

Makefile: proper DESTDIR / PREFIX separation

Corrected the DESTDIR / PREFIX semantics to follow packaging conventions (#513):

  • DESTDIR (default /) is the staging root for packaged installs β€” e.g. make DESTDIR="$(pwd)/image/" install
  • PREFIX (default /usr/local) is the logical install prefix
  • mandb now runs only when installing to the real system root (DESTDIR=/)
  • Replaced which with the more portable command -v

Other changes

  • REPL banner URLs updated to https://lfe.io/use and https://github.com/lfe/lfe
  • CI matrix extended to cover OTP 28 and 29 (builds and installs)
  • Fixed lfe_init_SUITE ERL_LIBS to resolve the compiled lfe app from the active rebar3 profile instead of assuming the default profile (#522)

PRs

New Contributors

  • @xgqt made their first contribution in #513

Full Changelog

v2.2.1...v2.2.2

v2.2.1

Choose a tag to compare

@oubiwann oubiwann released this 05 Aug 21:43

What's Changed

LFE 2.2.1 is a maintenance release with a significant scanner fix, a comprehensive overhaul of the examples directory, CI/CD modernisation, and improved packaging for hex.pm.

Scanner: Elixir module name syntax

The #Esymbol reader syntax for referencing Elixir modules (e.g. #Esune β†’ Elixir.sune) was missing from the scanner. This has been added, restoring the ability to call Elixir modules directly from LFE.

Also includes minor whitespace and comment cleanups in lfe_scan.erl.

Examples overhaul

All 22 examples have been reviewed and updated #505, #506:

  • Renamed files to follow Lisp conventions (hyphens instead of underscores): ets_demo β†’ ets-demo, lfe_eval β†’ lfe-eval, mnesia_demo β†’ mnesia-demo, ping_pong β†’ ping-pong
  • Fixed deprecated Erlang API calls, BIF conflicts, and formatting issues across examples
  • Refactored lfe-eval to resolve BIF shadowing and modernise the code
  • Added a new Common Test suite (test/examples_SUITE.lfe) covering compilation and runtime correctness for all examples

Build & packaging

  • Added a rebar3 maintainer profile with rebar3_hex for publishing to hex.pm (replaces the old hex-publish target)
  • Added a publish alias in rebar.config for rebar3 as maintainer publish
  • make clean now removes stale .beam files from test/, preventing cross-branch test failures
  • make tests runs clean first to avoid stale bytecode issues
  • DESTDIR / PREFIX handling improved so make install follows common conventions for configurable destination directories β€” thanks to @diasbruno

Compiler & Emacs mode

  • Fixed lfec option parsing: lfe_io:read_string returns a list of forms, so parse-opts now appends (++) instead of cons-ing
  • lfe-mode.el: added is-record, is-struct, record, record-index, record-field, record-update, struct, struct-field, and struct-update to font-lock built-in lists

CI/CD

  • Migrated all GitHub Actions jobs from ubuntu-latest / ubuntu-20.04 to ubuntu-24.04
  • Consolidated the four separate build/install jobs (older + newer) into two, covering OTP 22–27 (builds) and 22–28 (installs)
  • Removed OTP 19 which can no longer run on current GitHub-hosted images
  • Cleaned up job naming for clearer CI/CD results

New Contributors

  • @diasbruno made their first contribution with configurable make install destination directories

Full Changelog

v2.2.0...v2.2.1

v2.2.0

Choose a tag to compare

@oubiwann oubiwann released this 11 Jan 15:26

PRs

New Contributors

Full Changelog

v2.1.5

Choose a tag to compare

@oubiwann oubiwann released this 14 Sep 16:28

What's Changed

PRs

  • Fix tests execution when using recent rebar3 by @delitrem in #491

New Contributors

v2.1.4

Choose a tag to compare

@oubiwann oubiwann released this 08 Jan 22:13

What's Changed

New Contributors

Full Changelog: 2.1.3...v2.1.4

v2.1.3

Choose a tag to compare

@oubiwann oubiwann released this 04 Jan 22:35

What's Changed

The biggest change for this release is the new implementations of lc/list-comp and bc/binary-comp for the LFE REPL, which had previously been removed from the REPL for re-working. Additionally:

  • Enhancement/476/pub banner funs by @oubiwann in #477
  • Makefile: add safe CFLAGS and LDFLAGS by @xgqt in #479
  • Cleanup/460/better-publishing by @oubiwann in #482
  • Bring the latest 'develop' changes into 'master' in preparation for the 2.1.3 release by @oubiwann in #486

New Contributors

  • @xgqt made their first contribution in #479

Full Changelog

2.1.2...v2.1.3

v2.1.2

Choose a tag to compare

@oubiwann oubiwann released this 02 Aug 21:07
6cbfdff

What's Changed

New Contributors

Full Changelog: v2.1.1...v2.1.2

2.1.1

Choose a tag to compare

@oubiwann oubiwann released this 06 Jan 15:33

What's Changed

Full Changelog: 2.1.0...2.1.1

v2.1.0

Choose a tag to compare

@oubiwann oubiwann released this 02 Jan 17:48

What's Changed

v2.0.1...v2.1.0

2.0.1

Choose a tag to compare

@oubiwann oubiwann released this 27 Jun 02:41
  • Bug fixes for map-handling in older versions of Erlang.
  • Fixes for maps (mref, etc.) in guards.
  • Fixes for strings in binary patterns.

v2.0...v2.0.1