Skip to content

Releases: lfe/rebar3

0.5.5 - Include file fix

13 Nov 15:43

Choose a tag to compare

Changes in 0.5.5

Refactoring

  • Moved header file to src directory: Relocated r3lfe.hrl from include/ to src/ to align with project structure conventions
    • Updated all source file includes to reference the new location
    • Affected 26 source files with updated include paths

Documentation

  • Updated README badge versions to reflect current release

Files Changed

28 files changed with 36 insertions and 31 deletions


Full Changelog: 0.5.4...0.5.5

0.5.4 - Maintenance Release: Templates and Polish

31 Oct 16:52

Choose a tag to compare

Maintenance Release - Templates and Polish

This release fixes template packaging issues and removes debug output that was inadvertently left in 0.5.3.

Upgrade urgency: MEDIUM - Users of 0.5.3 should upgrade to remove debug output and get complete template support

Fixed

  • CRITICAL: Added priv directory to hex package files list

    • Templates were missing from hex.pm releases in 0.5.2 and 0.5.3
    • Users installing from hex couldn't use rebar3 new commands
    • Fixed in src/rebar3_lfe.app.src by adding "priv" to files list
    • See commit 014d7f1 for details
  • Output: Removed debug statements polluting stdout

    • All io:format debug statements left from 0.5.3 troubleshooting have been removed
    • These were causing unwanted output during normal rebar3 operations
    • Clean output restored for compilation and other commands
    • Fixed in src/r3lfe_config.erl
    • See commit 89649cc for details
  • Templates: Fixed gen_statem template issues (contributed by Dmitry Matveyev)

    • Fixed formatting and syntax issues in statem-handle-event.lfe.tpl
    • Fixed formatting and syntax issues in statem-state-functions.lfe.tpl
    • Templates now generate correct LFE code for state machine implementations
    • See commit fabecdc for details

Changed

  • Templates: Improved project template quality (contributed by Joel Jucá)

    • Added .env and .envrc to .gitignore for better environment management
    • Fixed heading levels in README template (changed from # to ##)
    • Added instructions for using make repl with customized colored prompt
    • See commit aeb5887 for details
  • Templates: Updated rebar.config templates for better compatibility

    • Changed hex plugin package references from rebar3_lfe to r3lfe
    • Updated all rebar.config template variants (app, lib, escript, main, release)
    • Updated CI/CD template for consistency
    • Fixed app.src templates to use correct package name
    • See commit dd4e6dc for details
  • Documentation: Added warnings about using bleeding-edge branch

    • README now clearly indicates when users are on the development branch
    • Helps prevent confusion about stability and features
    • See commit 9d9b3ba for details

Contributors

Special thanks to:

  • Dmitry Matveyev (@greenfork) - Fixed gen_statem templates
  • Joel Jucá (@joeljuca) - Improved project templates

Full Changelog: 0.5.3...0.5.4

0.5.3 - Critical Bug Fix Release

28 Oct 16:06

Choose a tag to compare

Critical Bug Fix Release

This release addresses several critical compiler bugs discovered in 0.5.2 that could cause compilation failures for certain dependency configurations.

Upgrade urgency: HIGH - Users experiencing compilation failures with dependencies should upgrade immediately

Fixed

  • CRITICAL: Fixed dependency erl_opts not being read from rebar.config

    • Dependencies' erl_opts (such as no_auto_import) were not being applied when compiling dependency LFE files
    • This caused compilation failures when dependencies defined functions that conflicted with Erlang BIFs
    • The fix reads each app's own rebar.config directly to get its specific erl_opts and lfe_opts
    • Particularly fixes compilation of libraries like yuri that define get/1 function and require {no_auto_import, [{get,1}]}
    • See commit 4c29467 for details
  • CRITICAL: Fixed compile/4 not using merged compiler options

    • The compiler's compile/4 function was not properly merging compiler options from config
    • Options like debug_info and custom erl_opts were being ignored during compilation
    • Fixed in src/r3lfe_compiler_mod.erl to properly retrieve and merge options from AppInfo
    • See commit a51cc23 for details
  • CRITICAL: Fixed dependency include-lib resolution failing for unloaded apps

    • Dependency header file resolution via include-lib was failing for applications not yet loaded in the VM
    • The scanner now uses code:lib_dir/1 which handles both loaded and unloaded applications
    • Also improved error messages when dependencies cannot be found
    • Fixed in src/r3lfe_dependency_scanner.erl
    • See commit 9d74a63 for details
  • Compiler: Fixed crash on nested LFE compiler error format

    • LFE compiler occasionally returns nested error format: {error, [{error, FileErrors, []}], [], []}
    • The error handler now properly extracts and formats errors from this nested structure
    • Prevents cryptic crashes and provides clear error messages to users
    • Fixed in src/r3lfe_compile_worker.erl
    • See commit 6349f1b for details

Changed

  • Build: Set debug_info as default compiler option
    • All compiled modules now include debug information by default
    • Enables better debugging, analysis, and hot code reloading
    • Can still be disabled via project-specific erl_opts if needed
    • Updated in include/r3lfe.hrl

Internal

  • Added comprehensive debug logging for troubleshooting compilation issues
    • Debug output shows configuration reading, option merging, and compilation steps
    • Helps diagnose issues with dependency compilation
    • Can be enabled via DEBUG=1 or DIAGNOSTIC=1 environment variables

Full Changelog: 0.5.2...0.5.3

0.5.2 - Major Feature Release with Critical Bug Fix

25 Oct 03:34

Choose a tag to compare

⚠️ Critical Upgrade Required

All users of 0.5.1 must upgrade immediately to avoid potential data loss from a critical bug where rebar3 clean would delete source files instead of compiled beam files.


🎉 What's New in 0.5.2

This release brings significant enhancements to the development experience with automatic rlwrap integration and improved tooling, while fixing a critical data loss bug.

Automatic rlwrap Integration

The REPL now automatically wraps with rlwrap when available, providing:

  • ✨ Persistent command history across sessions
  • 🔍 Tab completion for Erlang modules and LFE special forms
  • ⌨️ Emacs-style line editing (Ctrl-A, Ctrl-E, Ctrl-K, etc.)
  • 🎨 Configurable prompts and colors
  • 📝 History stored in ~/.lfe/history
  • 🚀 Zero configuration required - just works!

Use --no-rlwrap flag to disable if needed.

Enhanced Versions Command

The rebar3 lfe versions command now provides complete project information:

  • 📦 Dependencies section with all dependency versions
  • 🔌 Plugins section with all plugin versions
  • 📊 Profile information for non-default profiles
  • 🔤 Alphabetically sorted output
  • 🎯 Smart version lookup across multiple build directories
  • ✨ Clean, uniform heading formatting

Critical Bug Fix

Fixed clean/2 deleting source files: The compiler module's clean/2 function was receiving source .lfe files from rebar3 but deleting them directly instead of converting them to their corresponding .beam files. This has been fixed to properly delete only compiled artifacts.


📋 Complete Changelog

Added

  • Automatic rlwrap integration with new modules: r3lfe_rlwrap, r3lfe_completion
  • Enhanced versions command with new utility module: r3lfe_util
  • Dependencies and Plugins sections in versions output
  • REPL screenshot in documentation

Fixed

  • CRITICAL: clean/2 deleting source files instead of beam files
  • "Bad directory" warnings for uncompiled dependencies
  • Multiple rlwrap integration issues (TTY access, argument parsing, infinite loops)
  • Version detection for LFE, plugins, and dependencies
  • Plugin name display (r3lfe → rebar3_lfe)

Changed

  • Templates updated with project_plugins and publish aliases
  • Documentation reorganized with numbered indices (001-021)
  • Coverage requirements reduced from 90% to 80%
  • Simplified coverage configuration

Testing

  • Added r3lfe_rlwrap_SUITE (13 tests)
  • Added r3lfe_util_SUITE (14 tests)
  • Enhanced r3lfe_prv_versions_SUITE (12 new tests)
  • Updated compiler tests for clean verification
  • Total: 434 tests passing

📦 Installation

{plugins, [
    {rebar3_lfe, "0.5.2"}
]}.

Or upgrade existing installations:

rebar3 update

📚 Documentation


Full Diff: 0.5.1...0.5.2

0.5.1 - Maintenance Release

22 Oct 07:17

Choose a tag to compare

rebar3_lfe 0.5.1 - Maintenance Release

Minor cleanup and maintenance updates following the 0.5.0 major release.

🔧 Changes

Templates Improved

  • App.src templates: Changed version from git to "0.1.0" for better default versioning
    • New projects now start with explicit version numbers
    • More intuitive for developers new to Erlang/LFE ecosystem

Documentation Cleanup

  • README: Simplified title to "rebar3_lfe"
  • Removed coverage badge (temporarily unavailable)

Build & Test Updates

  • Makefile: Streamlined test targets for better consistency
    • Template tests now use rebar3 compile instead of rebar3 lfe compile
    • Ensures generated projects work correctly with default rebar3 workflows
    • Removed deprecated test-clean-build-cmd target

📊 Statistics

  • 4 commits since 0.5.0
  • 5 files changed: 8 insertions(+), 15 deletions(-)
  • Changes focused on templates, documentation, and build tooling

📦 Installation

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

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

⬆️ Upgrade from 0.5.0

This is a patch release with no breaking changes. Simply update the version number in your rebar.config:

%% Change from:
{plugins, [{rebar3_lfe, "0.5.0"}]}.

%% To:
{plugins, [{rebar3_lfe, "0.5.1"}]}.

Then run:

rebar3 update
rebar3 lfe compile

🔗 Links


Full Changelog: 0.5.0...0.5.1

0.5.0 - Complete Rewrite

22 Oct 05:53

Choose a tag to compare

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

0.4.12

19 Oct 19:37

Choose a tag to compare

What's Changed

  • fix: moving ltest to test deps from main deps by @mpope9 in #93

New Contributors

Full Changelog: 0.4.11...0.4.12

0.4.11

15 Jan 22:00

Choose a tag to compare

Full Changelog: 0.4.10...0.4.11

0.4.10

05 Mar 05:51

Choose a tag to compare

What's Changed

  • added default compile to compile deps by @Taure in #89

New Contributors

  • @Taure made their first contribution in #89

Full Changelog: 0.4.9...0.4.10

0.4.9

19 Feb 23:26

Choose a tag to compare

Full Changelog: 0.4.7...0.4.9