Recent

Author Topic: [ANN] PasBuild 1.6.0 release  (Read 1994 times)

Graeme

  • Hero Member
  • *****
  • Posts: 1518
    • Graeme on the web
[ANN] PasBuild 1.6.0 release
« on: March 11, 2026, 02:33:59 pm »
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 -
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

cdbc

  • Hero Member
  • *****
  • Posts: 2728
    • http://www.cdbc.dk
Re: [ANN] PasBuild 1.6.0 release
« Reply #1 on: March 11, 2026, 05:07:14 pm »
Hi Graeme

Pulled -> Built -> Tested => Works!

Well done mate, thanks  :)
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

Graeme

  • Hero Member
  • *****
  • Posts: 1518
    • Graeme on the web
Re: [ANN] PasBuild 1.6.0 release
« Reply #2 on: March 12, 2026, 12:19:30 pm »
🙌🥳
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

MathMan

  • Sr. Member
  • ****
  • Posts: 499
Re: [ANN] PasBuild 1.6.0 release
« Reply #3 on: March 19, 2026, 07:08:48 pm »
Hello Graeme,

I have a question before I start looking into this deeply. Is PasBuild supporting multi stage builds? In case I'm using the wrong terminology - here's what I need.

- first build some tools that have no dependency
- execute these, to get some data generated that is needed by some further tools (usually in form of *.inc)
- build the next level of tools that need these generated data to compile
- execute these, to get some further data
- ...
- finally build the library and some demos

The above can iterate over 2, 3 (maybe even four) levels. Beside Pascal compilation the generation of tools can involve some assembly files that have to be processed with i.e. NASM.

Cheers,
MathMan

cdbc

  • Hero Member
  • *****
  • Posts: 2728
    • http://www.cdbc.dk
Re: [ANN] PasBuild 1.6.0 release
« Reply #4 on: March 20, 2026, 10:04:44 pm »
Hi
Sorry I'm not Graeme, but I can tell you that from this project-file:
Code: XML  [Select][+][-]
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project>
  3.   <name>fpgui</name>
  4.   <version>2.0.4-dev</version>
  5.   <author>Graeme Geldenhuys</author>
  6.   <license>LGPL</license>
  7.  
  8.   <build>
  9.     <packaging>pom</packaging>
  10.   </build>
  11.  
  12.   <!-- List child modules in build order -->
  13.   <modules>
  14.     <module>framework</module>
  15.     <module>docview</module>
  16.     <module>uidesigner</module>
  17.   </modules>
  18. </project>
If you have the 'fpGUI' repo cloned, like I do, then
Code: Bash  [Select][+][-]
  1. pasbuild compile -p agg,debug + [Enter]
Will:
1) Build the 'fpGUI' framework
2) Build the 'DocView' app
3) Build the 'UIDesigner' app

Is that somewhat like what you're asking...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

MathMan

  • Sr. Member
  • ****
  • Posts: 499
Re: [ANN] PasBuild 1.6.0 release
« Reply #5 on: March 20, 2026, 10:35:22 pm »
@cdbc

Not really - I'm missing execution of built components to generate input for further steps in the build process.

Haven't seen mentions when I scanned the high level description on GitHub - that's why I asked.

But thanks for your feedback and the example.


Graeme

  • Hero Member
  • *****
  • Posts: 1518
    • Graeme on the web
Re: [ANN] PasBuild 1.6.0 release
« Reply #6 on: March 28, 2026, 04:08:51 pm »
- first build some tools that have no dependency
- execute these, to get some data generated that is needed by some further tools (usually in form of *.inc)
- build the next level of tools that need these generated data to compile
- execute these, to get some further data
- ...
- finally build the library and some demos

Part of that was supported in the 1.6.0 release. Dependency related build of code, and it could process/filter resource files replacing macros. Full support for anything you can dream of, will be in the soon-to-be-released 1.7.0 release. You can already play with it today, if you pull the latest code. PasBuild now has a plug-in system, where you can write plugins in any language, even a simple batch script. The plugin will tell PasBuild after which build goal it should be triggered.

Documentation and 2 example plugins can be found here:
https://github.com/graemeg/PasBuild/tree/master/extras/plugins/hello-world
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

MathMan

  • Sr. Member
  • ****
  • Posts: 499
Re: [ANN] PasBuild 1.6.0 release
« Reply #7 on: March 28, 2026, 09:13:24 pm »

<snip>

Part of that was supported in the 1.6.0 release. Dependency related build of code, and it could process/filter resource files replacing macros. Full support for anything you can dream of, will be in the soon-to-be-released 1.7.0 release. You can already play with it today, if you pull the latest code. PasBuild now has a plug-in system, where you can write plugins in any language, even a simple batch script. The plugin will tell PasBuild after which build goal it should be triggered.

Documentation and 2 example plugins can be found here:
https://github.com/graemeg/PasBuild/tree/master/extras/plugins/hello-world

Thanks for the feedback - definitely sounds promising. I'll wait for the v1.7.0 though and then try what I can achieve with that. It'l need larger re-structuring of my project though - that's why I can wait a bit anyway  ;)

Graeme

  • Hero Member
  • *****
  • Posts: 1518
    • Graeme on the web
Re: [ANN] PasBuild 1.6.0 release
« Reply #8 on: March 29, 2026, 10:24:32 am »
New version is out. :)
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

 

TinyPortal © 2005-2018