Releases: graemeg/PasBuild
PasBuild v1.6.0 release
PasBuild v1.6.0 Release Notes
Date: 2026-03-11
Overview
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 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 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 to the 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 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 v1.5.0 Release - improved output and dependency tree
PasBuild v1.5.0 Release Notes
Date: 2026-03-03
Overview
PasBuild v1.5.0 builds on the multi-module foundation established in
v1.4.0, adding richer build output and a new goal for visualising
project dependencies. Reactor builds now produce Maven-style progress
and summary output, making it easy to track build status across many
modules at a glance. A new dependency-tree goal lets you inspect the
full dependency graph of any project without invoking the compiler.
New Features
Maven-Style Reactor Build Output
Multi-module reactor builds now produce structured, human-readable
output throughout the build process:
- A Reactor Build Order section is printed at the start, listing
all modules in the order they will be built. - Each module build is surrounded by a visual separator showing
the module name and its position in the build sequence
(e.g. [2/3]). - A BUILD SUCCESS or BUILD FAILURE block is printed after each
module completes, together with elapsed time for that module. - A Reactor Summary section is printed at the end of the full
build, with dot-aligned module names, per-module status and
timing, overall BUILD SUCCESS or BUILD FAILURE, and total
elapsed time.
Example (abbreviated):
[INFO] -------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 1. lib-core
[INFO] 2. lib-utils
[INFO] 3. myapp
[INFO] -------------------------------------------------------
[INFO] Building lib-core [1/3]
[INFO] -------------------------------------------------------
...
[INFO] BUILD SUCCESS
[INFO] Total time: 3.4 s
[INFO] -------------------------------------------------------
[INFO] Reactor Summary:
[INFO] lib-core ............ SUCCESS [1.1 s]
[INFO] lib-utils ............ SUCCESS [0.9 s]
[INFO] myapp ............ SUCCESS [1.4 s]
[INFO] -------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] Total time: 3.4 s
dependency-tree Goal
A new 'pasbuild dependency-tree' goal prints the full dependency
graph of a project without invoking the compiler. This is useful
for auditing dependencies and understanding module relationships.
For multi-module (aggregator) projects, all modules are listed in
topological order. Each module shows its local module dependencies
and external repository dependencies. The -m flag restricts output
to a single named module and its dependencies.
For single-module projects, only the external are
shown.
Output uses tree branch characters (|- and _) with descriptive
labels for each node:
[module] -- a local inter-module dependency
[external] -- a dependency from the local repository
[library] -- a library-type module
[application] -- an application-type module
[aggregator] -- a pom-type aggregator module
Example usage:
pasbuild dependency-tree
pasbuild dependency-tree -m myapp
Example output (multi-module project):
myapp [application]
|- lib-core [module] [library]
\_ lib-utils [module] [library]
\_ some-lib:1.0.0 [external]
PasBuild v1.4.0 release - flexibility and polish
PasBuild v1.4.0 Release Notes
Date: 2026-02-15
Overview
PasBuild v1.4.0 focuses on flexibility and polish. This release adds
the ability to use a custom Free Pascal compiler, improves the
behaviour of the -f project file flag, and refreshes the banner with a
more compact and personality-driven format.
New Features
Custom FPC Compiler Selection
PasBuild no longer assumes 'fpc' is on the system PATH. A custom FPC
compiler binary can now be specified via two mechanisms:
- --fpc <path> command-line flag
- PASBUILD_FPC environment variable
Precedence order: --fpc flag > PASBUILD_FPC environment variable >
default 'fpc' from PATH.
All internal references to the compiler now route through
TUtils.GetFPCExecutable, ensuring consistent behaviour across
compile, test-compile, and version detection.
Example usage:
pasbuild compile --fpc /opt/fpc-3.3.1/bin/fpc
export PASBUILD_FPC=/opt/fpc-3.3.1/bin/fpc
pasbuild compile
Project File Flag Now Changes Directory
The -f / --file flag now changes to the directory containing the
specified project file before executing the build. This allows all
relative paths in project.xml to resolve correctly, enabling builds
from any working directory.
Example usage:
pasbuild compile -f ../../../project.xml
New --license Flag
The full BSD-3-Clause license text has been moved from the default
banner to a dedicated --license flag. This keeps routine output
clean while still providing easy access to license information.
Example usage:
pasbuild --license
Changes
Enhanced --version Output
The --version flag now includes the build date and author alongside
the existing FPC executable and version information:
PasBuild version 1.4.0
Build automation tool for Free Pascal projects
Built: 2026/02/15
Author: Graeme Geldenhuys
FPC executable: fpc
FPC version detected: 3.2.2
PasBuild v1.3.0 release - external dependencies
Hi everyone,
PasBuild 1.3.0 has been released.
PasBuild now supports cross-project dependency management. Projects can
declare external dependencies in project.xml, install compiled
artifacts to a local repository, and have them automatically resolved
at compile time β including transitive dependencies.
Homepage:
https://github.com/graemeg/pasbuild
Quick Overview
Install a library to the local repository (~/.pasbuild/repository/):
cd my-library
pasbuild install
Declare the dependency in the consumerβs project.xml:
<dependencies>
<dependency>
<name>my-library</name>
<version>1.0.0</version>
</dependency>
</dependencies>
Compile β dependencies are resolved automatically:
cd my-application
pasbuild compile
Highlights
-
Local repository at ~/.pasbuild/repository/ stores .ppu and .o files
per name, version, and FPC target triplet (e.g.: x86_64-linux-3.2.2) -
Transitive resolution β if A depends on B, and you depend on A, both
are resolved automatically -
Multi-module support β the reactor installs each module in dependency
order -
Metadata tracking β each artifact includes metadata.xml for version
and target validation -
Path quoting β compiler arguments now handle paths with spaces
-
Fully backward compatible β projects without work
exactly as before
A sample project is included under samples/dependency-management/. For
full details, see the Quick Start Guide[1] and the Design Document[2].
Feedback and contributions are welcome on the projectβs issue tracker.
Upgrade Instructions
Replace your existing pasbuild binary with the new 1.3.0 build. You can
use your existing pasbuild binary to build the new version. No project
configuration changes are required, as the external dependency
management is 100% optional.
Getting started
Documentation includes:
- Updated quick-start guide with dependency management examples
- Sample projects demonstrating simple and complex scenarios
- Project creation via 'pasbuild init'
- Full design specification with architecture details
Links
- Quick Start Guide:
https://github.com/graemeg/pasbuild/blob/main/docs/quick-start-guide.adoc - Design Document:
https://github.com/graemeg/pasbuild/blob/main/docs/dependency-management-design.adoc
PasBuild is free software released under the BSD-3-Clause
license.
Happy Building!
PasBuild v1.2.0 release - version inheritance
Hi everyone,
PasBuild 1.2.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
What's New in 1.2.0
Version Inheritance for Multi-Module Projects
Child modules in a multi-module project no longer need to
declare their own element. The version is
automatically inherited from the aggregator (root) project.xml.
This eliminates the need to manually synchronise version
numbers across all modules when preparing a release.
If a child module does declare a , it must match the
aggregator's version. A mismatch produces a clear error message
with guidance on how to resolve it.
Bug Fixes
-
The test runner now executes from the output directory
(target/), ensuring test fixtures are found via their expected
relative paths. Previously, tests that relied on fixture files
would fail with "file not found" errors. -
Packaging validation error messages now correctly reference
"aggregator" projects, making it clearer why a library or
application module cannot declare child . -
The
pasbuild initcommand's multi-module template no longer
generates a tag in child module project.xml files,
consistent with the new version inheritance behaviour. -
Resolved all compiler warnings in PasBuild's own source code,
including implicit string type conversions from the DOM API,
unused variables, and hidden inherited constructor warnings.
Compatibility Notes
-
Existing single-module projects are unaffected.
-
Existing multi-module projects that already declare matching
versions in child modules continue to work without changes. -
Child modules may now omit entirely (recommended).
Upgrade Instructions
Replace your existing pasbuild binary with the new 1.2.0 build.
No project configuration changes are required, though removing
from child modules in multi-module projects is
recommended.
Getting started
Documentation includes:
- Updated quick-start guide with multi-module examples
- Sample projects demonstrating simple and complex scenarios
- Multi-module project creation via 'pasbuild init'
- Full design specification with architecture details
PasBuild is free software released under the BSD-3-Clause
license.
PasBuild v1.1.0 release - Multi-Module Build Support
PASBUILD v1.1.0 IS NOW AVAILABLE
GitHub: https://github.com/graemeg/PasBuild
I am pleased to announce the release of PasBuild v1.1.0, featuring
comprehensive multi-module build support for organising related
projects within a single build tree.
Multi-module build support
The major feature in this release enables you to structure complex
projects as a collection of coordinated modules:
- Aggregator projects that declare and coordinate child modules
- Three packaging types: 'pom' (aggregator), 'library' (shared code),
and 'application' (executables) - Automatic dependency-based build ordering with cycle detection
- Simplified module references that replace brittle relative path
hacks - Automatic bootstrap program generation for library modules
What this solves
Previously, building related projects required manual orchestration.
With v1.1.0:
- No more manual build ordering - the system handles it automatically
- No more hardcoding relative paths to framework artifacts in your
projects - No more separate repositories for buildable units that should be
coordinated - Missing or circular dependencies are caught at configuration time,
not compile time
Common use cases
Multi-module support excels for:
- Framework + Example Applications: Build a GUI toolkit and its demos
together - Shared Libraries + Applications: Create common utilities used by
multiple executables - Layered Frameworks: Foundation β Graphics β Widgets β Applications
- Plugin Architectures: Core application with separately-built
extension modules
Single command builds
Run a single pasbuild compile command from your aggregator root
directory, and the system:
- Discovers all modules
- Calculates correct build order from your declared dependencies
- Builds each module in sequence
- Stops on first failure with clear error messages
Build only a specific module and its dependencies using the -m flag,
or run from a child module directory for selective builds.
Migration path
Existing single-project builds are completely unchanged. Multi-module
is opt-in. If you have related projects today, you can migrate at your
own pace using the new project structure and packaging types.
Getting started
Documentation includes:
- Updated quick-start guide with multi-module examples
- Sample projects demonstrating simple and complex scenarios
- Multi-module project creation via 'pasbuild init'
- Full design specification with architecture details
The pasbuild init command now guides you through creating either
single-project or multi-module structures.
Testing and stability
The multi-module implementation underwent a structured and phased
development with comprehensive testing at each stage, covering module
discovery, dependency resolution, build ordering, and error handling.
Download PasBuild v1.1.0 and start organising your related projects as
a unified build system.
Your feedback and contributions are welcome! Please kindly use the
GitHub Issue Tracker. More features to come soon. :)
PasBuild v1.0.0 release - Maven-inspired build tool for Object Pascal
I'm excited to announce the first release of PasBuild v1.0.0, a
modern build automation tool for Free Pascal projects inspired by
Apache Maven!
GitHub: https://github.com/graemeg/PasBuild
Why PasBuild?
While fpmake is powerful, it can be laborious to create and
maintain, especially for large projects. A real-world example:
fpGUI Toolkit has 120+ units, include files in various locations,
and platform-dependent directory trees. The fpmake.pp file was
40KB with over 750 lines of code that needed constant updates when
adding or removing units.
PasBuild's project.xml? Just 3KB and 117 lines - and we know how
verbose XML is. ;-) No updates needed when units change - it
self-discovers your code and dynamically builds the FPC command!
Key Features
Convention Over Configuration
- Standard directory layout (src/main/pascal, src/test/pascal)
- Zero configuration for projects following conventions
- Override only what you need to customize
Intelligent Automation
- Auto-discovers all units and subdirectories
- Automatic include path detection (*.inc files)
- Self-maintaining - add/remove files without updating config
- Cross-platform path handling (src/main/pascal β src\main\pascal)
Complete Build Lifecycle
- clean: Remove build artifacts
- compile: Build your executable or library
- test: Compile and run tests (FPCUnit/FPTest auto-detection)
- package: Create release archives
- source-package: Generate source distributions
Build Profiles
- Define multiple build configurations (debug, release, etc.)
- Activate single or multiple profiles: -p base,debug,logging
- Profile-specific compiler options and defines
- Perfect for cross-platform conditional compilation
Resource Management
- Automatic resource copying to target directory
- Variable filtering: ${project.version} β 1.0.0
- Supports both main and test resources
- Version injection via resource filtering
Developer-Friendly
- Single XML configuration file (project.xml)
- Semantic versioning 2.0.0 with pre-release tags
- Verbose mode for debugging (-v flag)
- Alternate project files support (-f custom.xml)
- Maven-style goal dependencies
Cross-Platform
- Works identically on Linux, Windows, macOS, FreeBSD
- Automatic path separator handling
- Platform-specific conditional compilation support
Self-Hosting
- PasBuild builds itself using project.xml
- Demonstrates best practices
- Easy to bootstrap from source
Real-World Testing
PasBuild has been extensively tested with:
- Multiple production applications
- fpGUI Toolkit (120+ units, complex structure)
- Projects with platform-dependent code trees
- Libraries and applications alike
Example: Minimal project.xml
MyApp 1.0.0 Your Name BSD-3-Clause Main.pas myappThat's it! PasBuild handles the rest automatically.
Getting Started
Bootstrap compilation
mkdir -p target/units
echo '1.0.0' > target/version.inc
fpc -Mobjfpc -O1 -FEtarget -FUtarget/units -Fitarget
-Fusrc/main/pascal src/main/pascal/PasBuild.pas
Now use PasBuild to build itself
./target/pasbuild compile
Create a new project
mkdir myproject && cd myproject
pasbuild init
Documentation
Comprehensive documentation available in the repository:
- Quick Start Guide: docs/quick-start-guide.adoc
- Design Document: docs/design.adoc
- Bootstrap Instructions: BOOTSTRAP.txt
Try It Today!
Clone from GitHub:
git clone https://github.com/graemeg/PasBuild.git
Your feedback and contributions are welcome! Please
kindly use the GitHub Issue Tracker.
More features to come soon.
License: BSD-3-Clause