[fpc-pascal] [ANN] PasBuild v1.6.0 Release

mailinglists at geldenhuys.co.uk mailinglists at geldenhuys.co.uk
Wed Mar 11 14:20:11 CET 2026


Hi everyone,

PasBuild v1.6.0 has been released.

PasBuild is a Maven-inspired build automation tool for Free
Pascal projects. It provides convention-based project structure,
dependency management, multi-module builds, resource filtering,
and packaging.

Homepage:
   https://github.com/graemeg/pasbuild

Quick Start Guide:
    
https://github.com/graemeg/PasBuild/blob/master/docs/quick-start-guide.adoc


Overview For This Release
-------------------------

PasBuild v1.6.0 brings nested aggregator support, a configurable
source directory, platform-qualified release archives, and several
bug fixes. Multi-module projects can now organise modules into
groups using nested POM aggregators to arbitrary depth, and the
-m flag correctly expands aggregator selections following Maven 4
semantics. A new <sourceDirectory> element lets lightweight
projects skip the full standard directory layout entirely.


New Features
------------

Nested Aggregator Support

   Multi-module projects can now contain aggregator modules that
   themselves contain further modules, to arbitrary depth. This
   is ideal for grouping related modules such as examples or
   plugins under a single sub-aggregator.

   Example structure:

     my-framework/               # Root aggregator (pom)
     +-- project.xml
     +-- core/                   # Library module
     +-- examples/               # Nested aggregator (pom)
     |   +-- project.xml
     |   +-- demo1/              # Application module
     |   +-- demo2/              # Application module

   Key behaviours:

   - Recursive discovery walks <modules> trees to produce a
     single flat registry for topological sorting.
   - Version inheritance chains through all aggregator levels.
   - Cycle detection prevents circular aggregator references.
   - POM modules appear in the reactor summary but are skipped
     during compilation.

   Example usage:

     pasbuild compile              # Builds all leaf modules
     pasbuild compile -m examples  # Builds examples + deps


Configurable Source Directory

   Projects can now override the default src/main/pascal/ source
   directory by adding <sourceDirectory> to the <build> section
   of project.xml. This is particularly useful for small example
   projects where the full standard layout would be unnecessarily
   verbose.

   Example:

     <build>
       <mainSource>Demo.pas</mainSource>
       <sourceDirectory>.</sourceDirectory>
     </build>

   Common values:

     .              Source files in the project root
     pascal         Source files in a pascal/ subdirectory
     src            Source files in a src/ subdirectory
     (omitted)      Defaults to src/main/pascal

   All internal paths (compiler search paths, unit scanning,
   include file discovery, bootstrap generation) honour the
   configured source directory.


Platform-Qualified Release Archives

   The package goal now produces archive filenames that include
   the target platform, allowing release archives for different
   platforms to coexist without name collisions.

   Old:  pasbuild-1.5.0.zip
   New:  pasbuild-1.6.0-x86_64-linux.zip

   The suffix uses the CPU and OS components of the FPC target
   triplet. The FPC version is intentionally omitted as it is
   not relevant to end users downloading a binary release.


Bug Fixes
---------

Module Selection Expands Aggregators (Maven 4 Behaviour)

   The -m flag now correctly handles nested aggregator modules.
   When the selected module has packaging=pom, the build
   automatically expands to include all child modules under
   that aggregator plus their transitive dependencies.

   Previously, the filter naively included all modules that
   appeared earlier in the topological sort, pulling in
   unrelated modules. The fix also properly excludes modules
   that are not dependencies of the selected target.

   The filter logic has been moved from TReactorCommand to
   TModuleRegistry.FilterBuildOrder for testability.


Correct ExitCode Reporting in ExecuteProcessWithCapture

   Fixed a bug where ExecuteProcessWithCapture could report a
   zero exit code for processes that actually failed. The issue
   was caused by FPC applying WEXITSTATUS twice when WaitOnExit
   was called explicitly after draining the pipe, converting
   non-zero exit codes to zero.


Changes
-------

Release Profile Strips Debug Symbols

   The release profile now includes -Xs (strip all debug
   symbols) alongside the existing -XX flag, producing smaller
   release binaries.


Test Suite
----------

   26 new test cases added in this release:

   - 10 tests for nested aggregator discovery (two-level,
     three-level, version inheritance, cycle detection,
     cross-level dependencies, build order)
   - 5 tests for build order filtering (transitive dependency
     selection, aggregator expansion, unrelated module
     exclusion)
   - 4 tests for platform suffix generation
   - 3 tests for <sourceDirectory> parsing
   - 1 test fix for ExitCode reporting
   - 3 tests for existing nested discovery fixtures

   Total test count: 146 (up from 120 in v1.5.0)


PasBuild is free software released under the BSD-3-Clause
license.


Regards,
   - Graeme -


More information about the fpc-pascal mailing list