Hi everyone,
PasBuild v1.7.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.7.0 introduces an external plug-in system, a
resolve command for IDE and tooling integration, and
activeByDefault module control. Several bug fixes improve
multi-module test builds, unit discovery for non-standard
source layouts, and resource processing output.
New Features
------------
External Plugin System
PasBuild now supports external plug-ins: standalone
executables that extend the build lifecycle with custom
goals. Plug-ins are named pasbuild-<goal> and discovered
in the project's plugins/ directory, ~/.pasbuild/plugins/,
or anywhere on PATH.
Plug-ins declare which build phase they run after via a
--pasbuild-phase flag and receive project context through
environment variables and the resolve command. Unknown
goals are automatically deferred for plugin resolution
before reporting an error.
An example plug-in (shell and Pascal implementations) is
included under extras/plugins/hello-world/.
Example usage:
pasbuild hello # runs pasbuild-hello plugin
pasbuild --help # lists discovered plugins
Resolve Command (IDE/Tooling Integration)
The new resolve command outputs the fully resolved build
configuration as JSON to stdout, without compiling. This
includes unit paths, include paths, defines, compiler
options, dependencies, and the complete compiler command
line.
It supports single-module projects, multi-module
aggregators (outputs all modules), and per-module
selection with -m.
Example usage:
pasbuild resolve # single module
pasbuild resolve # aggregator: all modules
pasbuild resolve -m core # specific module
Use cases include IDE integration, plugin development,
CI tooling, and debugging build configuration issues.
activeByDefault Module Attribute
Modules listed in an aggregator's <modules> section can
now specify activeByDefault="false" to be excluded from
normal builds. This is useful for example projects or
optional modules in large multi-module repositories.
Two mechanisms override this attribute:
- The --all CLI flag forces all modules to build
regardless of their activeByDefault setting (useful
for CI and nightly builds).
- Explicitly selecting a module with -m also overrides
the attribute.
Example:
<modules>
<module>core</module>
<module activeByDefault="false">examples</module>
</modules>
Bug Fixes
---------
Multi-Line Unit Declarations in Bootstrap Generator
Units where the 'unit' keyword and the unit name appear
on separate lines (common in some FPC codebases such as
aggpas units in fpGUI) were not being discovered by the
bootstrap generator. ParseUnitName now tracks a
UnitKeyFound flag to handle the name appearing on the
next non-empty line.
Thanks to Andrew Haines for reporting this issue.
Test Goals Skip Gracefully When No Test Directory Exists
Modules without a src/test/pascal/ directory previously
caused the entire reactor build to fail. Test-compile
and test now log an informational message and return
success, matching Maven behaviour where a module with
no test sources reports SUCCESS in the reactor summary.
Test-Compile Routed Through Reactor for Multi-Module Builds
The test-compile goal was missing from both the
multi-module dispatch and the reactor goal-to-command
mapping. This caused test-compile with -m to run against
the aggregator directory instead of the selected module,
failing with "Source directory not found".
Module Dependency Paths Included in Test-Compile
Test compilation failed when test units referenced units
from module dependencies because BuildTestCompilerCommand
omitted ResolvedModulePaths. The same -Fu loop from the
compile command is now applied to test-compile.
Conditional Unit Paths Resolved Relative to Source Directory
Conditional paths from <unitPaths> were added as -Fu
flags without prepending the base source directory,
producing incorrect compiler arguments in auto-scan
mode. Paths are now resolved relative to the configured
source directory.
XML Escaping in Init-Generated project.xml
User input containing <, >, or & characters (e.g. an
author field with an email address in angle brackets)
produced invalid XML. All user-provided values are now
escaped with XML entities before being written.
Thanks to Frank Fischer for reporting this issue.
Resource Processing Output Respects Verbose Flag
The per-file "Copied:" and "Filtered:" log lines during
resource processing could produce excessive output for
projects with many resource files. These lines now
require the -v flag. The verbose flag is also propagated
from parent commands to their dependencies.
Changes
-------
CLI Refactoring
Build goals and certain arguments are now refactored
and better separated in code logic.
Quiet Mode for Resolve Output
The resolve command suppresses all [INFO] log lines to
ensure only machine-consumable JSON appears on stdout.
Test Suite
----------
63 new test cases added in this release:
Total test count: 209 (up from 146 in v1.6.0)
PasBuild is free software released under the BSD-3-Clause
license.
Regards,
- Graeme -
_______________________________________________
fpc-pascal maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal