Releases: lfe/lfe
Release list
v2.2.2
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-increates intermediate proplists for missing keys along the pathupdate/update-inapply 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/" installPREFIX(default/usr/local) is the logical install prefixmandbnow runs only when installing to the real system root (DESTDIR=/)- Replaced
whichwith the more portablecommand -v
Other changes
- REPL banner URLs updated to
https://lfe.io/useandhttps://github.com/lfe/lfe - CI matrix extended to cover OTP 28 and 29 (builds and installs)
- Fixed
lfe_init_SUITEERL_LIBSto resolve the compiled lfe app from the active rebar3 profile instead of assuming thedefaultprofile (#522)
PRs
- Makefile: split DESTDIR and PREFIX by @xgqt in #513
- Ensure directory exists before writing the beam file by @diasbruno in #508
- Fix OTP 28
user_drv{badkey, input}crash by @oubiwann in #518 - Add
clj:printlnandclj:printfby @oubiwann in #519 - Add
clj:assoc,assoc-in,update,update-inby @oubiwann in #520 - Fix
lfe_init_SUITEERL_LIBSresolution by @oubiwann in #522
New Contributors
Full Changelog
v2.2.1
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-evalto 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
maintainerprofile withrebar3_hexfor publishing to hex.pm (replaces the oldhex-publishtarget) - Added a
publishalias inrebar.configforrebar3 as maintainer publish make cleannow removes stale.beamfiles fromtest/, preventing cross-branch test failuresmake testsrunscleanfirst to avoid stale bytecode issuesDESTDIR/PREFIXhandling improved somake installfollows common conventions for configurable destination directories β thanks to @diasbruno
Compiler & Emacs mode
- Fixed
lfecoption parsing:lfe_io:read_stringreturns a list of forms, soparse-optsnow appends (++) instead ofcons-ing lfe-mode.el: addedis-record,is-struct,record,record-index,record-field,record-update,struct,struct-field, andstruct-updateto font-lock built-in lists
CI/CD
- Migrated all GitHub Actions jobs from
ubuntu-latest/ubuntu-20.04toubuntu-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 installdestination directories
Full Changelog
v2.2.0
PRs
- Add detection for Mix projects to start LFE REPL in project context by @monkeyjunglejuice in #499
New Contributors
- @monkeyjunglejuice made their first contribution in #499
Full Changelog
v2.1.5
v2.1.4
What's Changed
- fix: add build patch for macos by @chenrui333 in #487
New Contributors
- @chenrui333 made their first contribution in #487
Full Changelog: 2.1.3...v2.1.4
v2.1.3
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
Full Changelog
v2.1.2
What's Changed
- Fix broken link to lfe_docs.txt by @m-doughty in #467
- Fix expansion for comparison macros for 3 or more arguments by @yastanotheruser in #470
- Merging to master for 2.1.2 release by @oubiwann in #475
New Contributors
- @m-doughty made their first contribution in #467
- @yastanotheruser made their first contribution in #470
Full Changelog: v2.1.1...v2.1.2
2.1.1
v2.1.0
2.0.1
- Bug fixes for map-handling in older versions of Erlang.
- Fixes for maps (mref, etc.) in guards.
- Fixes for strings in binary patterns.