Skip to content

0.5.0 Release Notes: Complete Rewrite

Choose a tag to compare

@oubiwann oubiwann released this 22 Oct 05:53
· 0 commits to release/0.4.x since this release

rebar3_lfe 0.5.0 - Complete Rewrite

A ground-up rewrite of the rebar3_lfe plugin with modern architecture, comprehensive testing, and powerful new features.

πŸš€ Highlights

10-30x Faster Compilation

  • Smart incremental compilation - only recompiles what changed
  • Header dependency tracking - .lfe include files trigger proper recompilation
  • Compiler option tracking - detects config changes automatically
  • Parallel compilation with progress reporting

New Commands

rebar3 lfe eval - Evaluate LFE expressions from command line

rebar3 lfe eval '(+ 1 2 3)'                                    # => 6
rebar3 lfe eval '(lists:map (lambda (x) (* x x)) (list 1 2 3))' # => (1 4 9)

rebar3 lfe run - Execute LFE scripts

rebar3 lfe run --main scripts/process.lfe -- arg1 arg2

rebar3 lfe escriptize - Build standalone executables

rebar3 lfe escriptize
./_build/default/bin/myapp

rebar3 lfe run-release - Full release lifecycle management

rebar3 lfe run-release start
rebar3 lfe run-release console

rebar3 lfe confabulate - Convert LFE data to Erlang format

rebar3 lfe confabulate --input config.lfe --output app.config

Modern Architecture

  • Uses rebar3's Custom Compiler Modules interface (rebar3 3.14+)
  • Professional error messages with actionable suggestions
  • Comprehensive test suite (>90% coverage, 132 files with 40k+ insertions)
  • Multi-OTP support: Tested on Erlang/OTP 24-28
  • Package System 2.0 with proper cleanup and error handling

πŸ“¦ Installation

%% rebar.config
{plugins, [
    {rebar3_lfe, "0.5.0"}
]}.

{deps, [
    {lfe, "2.2.0"}
]}.

⚑ Quick Start

rebar3 lfe compile          # Fast incremental compilation
rebar3 lfe repl             # Interactive shell
rebar3 lfe eval '(+ 1 2 3)' # Quick calculations
rebar3 lfe ltest            # Run tests

πŸ”₯ What's New

Added

  • Expression Evaluation: rebar3 lfe eval for command-line expression execution
  • Header Dependency Tracking: Automatic recompilation when includes change
  • Incremental Compilation: 10-30x faster for partial rebuilds
  • Script Support: rebar3 lfe run with main/1 function support
  • Escript Tools: Build and run standalone executables
  • Release Management: Complete OTP release lifecycle commands
  • Data Conversion: LFE to Erlang data transformation
  • Progress Reporting: Clear visual feedback during builds
  • Better Errors: Professional, actionable error messages
  • Multi-OTP Testing: Verified on Erlang/OTP 24-28

Changed

  • ⚠️ BREAKING: Plugin package renamed from rebar3_lfe to r3lfe
  • ⚠️ BREAKING: All modules use r3lfe_ prefix
  • ⚠️ BREAKING: Internal APIs completely redesigned
  • IMPROVED: 10-30x faster incremental builds
  • IMPROVED: REPL reliability on all OTP versions
  • IMPROVED: Package system with graceful error handling

Fixed

  • CRITICAL: Header changes now trigger recompilation
  • CRITICAL: Temporary package files always cleaned up
  • CRITICAL: Cross-platform path handling (Windows support)
  • Race conditions in package preparation
  • Memory leaks from unclosed file handles
  • Atom table exhaustion in long builds
  • REPL startup issues on OTP 26+

Removed

  • ⚠️ BREAKING: Legacy rebar3_lfe_* modules (22 files, 2,574 lines removed)
  • Undocumented internal functions
  • Deprecated configuration options
  • Workarounds for old rebar3 versions

πŸ“Š Statistics

  • 95 commits since 0.4.11
  • 132 files changed: 40,630 insertions(+), 2,621 deletions(-)
  • >90% test coverage with comprehensive test suites
  • Tested on: Erlang/OTP 24, 25, 26, 27, 28

πŸ”„ Migration from 0.4.x

This is a major breaking release. See the Migration Guide for detailed upgrade instructions.

πŸ“š Documentation

πŸ™ Acknowledgments

This release represents a complete rewrite focused on reliability, performance, and developer experience. Thank you to all contributors and the LFE community!


Full Changelog: 0.4.11...0.5.0