Recent

Author Topic: [ANN] PasBuild 1.2.0 Released - a Maven-inspired build automation tool  (Read 795 times)

Graeme

  • Hero Member
  • *****
  • Posts: 1496
    • Graeme on the web
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 <version> 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 <version>, 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 <modules>.

  * The `pasbuild init` command's multi-module template no longer
    generates a <version> 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 <version> entirely (recommended).

Upgrade Instructions

  Replace your existing pasbuild binary with the new 1.2.0 build.
  No project configuration changes are required, though removing
  <version> 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.


Regards,
  - Graeme -
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

VisualLab

  • Hero Member
  • *****
  • Posts: 717
Re: [ANN] PasBuild 1.2.0 Released - a Maven-inspired build automation tool
« Reply #1 on: February 09, 2026, 09:26:03 am »
Did I correctly understand the descriptions on the project's GitHub page, that it's a command-line tool and has nothing to do with Lazarus?

I noticed in the description that all data must be "tapped" on the keyboard. This requires precise knowledge of the syntax of: (a) configuration files, (b) executable program options. Hmmm, it's a bit like quarter-automation in supervising project development. But I understand that the tool solves the author's design problems.



P.S. I'm a lazy person. That's why I try to use tools that minimize the need to memorize large amounts of text (and that's why I truly hate the command line). I try to use tools that allow me to visually encompass as much of the task as possible (or at least a significant portion). That's why I use Lazarus, and even abuse it :)

Roland57

  • Hero Member
  • *****
  • Posts: 588
    • msegui.net
Re: [ANN] PasBuild 1.2.0 Released - a Maven-inspired build automation tool
« Reply #2 on: February 09, 2026, 06:37:15 pm »
Thank you for the new version, Graeme. Made a quick test under Linux. All seems to work very well. Now I need time to play with it in a real project, so I can see the benefit.

Until now I use the good old make for all my (little) projects, and I am very glad of it.  :)
My projects are on Codeberg.

Graeme

  • Hero Member
  • *****
  • Posts: 1496
    • Graeme on the web
Re: [ANN] PasBuild 1.2.0 Released - a Maven-inspired build automation tool
« Reply #3 on: February 09, 2026, 10:59:01 pm »
Thank you for the new version, Graeme. Made a quick test under Linux. All seems to work very well.
Thanks for trying it out Roland.

Quote
Until now I use the good old make for all my (little) projects, and I am very glad of it.  :)

A 15 second introduction, on how to set up a new project: main program, fpcunit test project, project metadata (name, version, author and license) and all with convention-based directory layout and configuration.

Type the command and press ENTER 6 times. 8-)

----
graemeg@localhost:/tmp/test$ pasbuild init
[INFO] PasBuild 1.2.0
[INFO] Copyright (c) 2025 by Graeme Geldenhuys

[INFO] Executing goal: init
[INFO] Initializing new PasBuild project...

Project structure (single/multi) [single]:

Project type (application/library) [application]:
Project name [test]:
Version [1.0.0]:
Author [graemeg]:
License (MIT/BSD-3-Clause/GPL-3.0/Apache-2.0/Proprietary) [MIT]:

[INFO] Creating project structure...
[INFO] Created directory: src/main/pascal
[INFO] Created directory: src/test/pascal
[INFO] Created: project.xml
[INFO] Created: src/main/pascal/Main.pas
[INFO] Created: LICENSE
[INFO] Created: src/test/pascal/TestRunner.pas

[INFO] Project initialized successfully!

[INFO] Next steps:
[INFO]   1. Edit src/main/pascal/Main.pas
[INFO]   2. Add your tests to src/test/pascal/TestRunner.pas
[INFO]   3. Run: pasbuild compile
[INFO]   4. Run: ./target/test
[INFO]   5. Run: pasbuild test

----


« Last Edit: February 10, 2026, 05:39:53 pm by Graeme »
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Graeme

  • Hero Member
  • *****
  • Posts: 1496
    • Graeme on the web
Re: [ANN] PasBuild 1.2.0 Released - a Maven-inspired build automation tool
« Reply #4 on: February 09, 2026, 11:34:03 pm »
Did I correctly understand the descriptions on the project's GitHub page, that it's a command-line tool and has nothing to do with Lazarus?

Correct, PasBuild it's not affiliated with the Lazarus project at all. I've spent 20 years developing commercial and open source software with Delphi and Free Pascal. The last 6 years I moved over to Java. That's when I realised how behind the Object Pascal community is with tooling. I can download the source code of any java project. 9/10 times all I need to do, to compile and auto-install dependencies, as well as run the tests to verify everything is working as expected... run one command 'mvn compile'.

Sure, I can use any one of the many Java IDEs or text editort to modify that code - but I'm talking about building a project and using the program or library.

Now compare that to a Lazarus project. No two projects seem to have the same directory layout, so you have to hunt and find the project file. The project might use dependency packages (*.lpk), so now you have to hunt for them. You need to manually open each of those *.lpk packages, so Lazarus can keep track of where they are. Now you can compile the project. But wait, where did it place the binary? Each project could have a different target output location. Did the compile unit end up next to the *.pas files, or in a separate directory?

Now move over to another project. Oh wait, this ones directory structure is totally different.

So the problem continues.

PasBuild is what I learnt from 100's of Java projects and Maven. Use a standardised directory layout (convention over configuration). So jumping from one project to another, the build and packing process is identical. Compiled units and the binary are placed where you can easily find them.  PasBuild does more. It auto-detects your code, include files, resource etc and creates compiler arguments for you. Packaging the project binary, code, license files and resource (images, sound etc) is a single command. If you have a mutli-module project, it knows the order in which those modules need to be compiled. And lots more.

You still continue writing code using Lazarus IDE, or some other IDE or editor. PasBuild is about convention and building your, and other projects,  with the least amount of friction.

Quote
P.S. I'm a lazy person.
Me too! That's way I gave up on FPC's 'fpmake' build tool. It's so complicated, so verbose, and takes days to configure, and still might not work correctly. It doesn't solve the problem of each project having a different directory layout. Using fpmake is also not easy. And there is zero documentation for fpmake (so maybe that's a hint that the general public is not supposed to use it). If you want to use it, you have to study the extremely complicated examples included with FPC itself.

I code using both Lazarus IDE and MSEide (each have there own strengths). But I don't want to dictate to anyone what IDE they should use with my projects. But I do want to make it as easy as possible for someone to look at any of my projects, and immediately know where what is, and how to quickly build it from the command line. Be that a library (eg: fpGUI Toolkit), or program (eg: PasBuild, DocView etc). PasBuild only requires the Free Pascal Compiler and has 9 commands, but in your day-to-day usage, you'll only use 2 (compile and test).
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

 

TinyPortal © 2005-2018