Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 24 additions & 26 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,7 @@ and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.ht

## [Unreleased]

### Changed

- Decomposed the largest source units into focused units with their public
APIs preserved and no output changes: HTML diagrams
(`Render.HTML.Diagrams`), stylesheet and scripts (`Render.HTML.CSS`,
`Render.HTML.Scripts`), output writes/ledger/manifest (`PasWeave.Output`),
and the fcl-passrc element-to-symbol conversion
(`FPCAdapter.Symbols`). Renderers and the model no longer link the parser
or compiler layers.
- Extracted the shared Lazarus configuration helpers (XML access, path and
macro expansion, custom-option parsing) into
`PasWeave.Lazarus.Support`; `PasWeave.Lazarus` now focuses on project and
package graph assembly.
- Split the CLI build pipeline into named `ParseCommandLine`,
`ExecuteBuild`, and `RenderAndReport` phases, leaving `RunBuild` as a short
orchestrator with one owner for option objects and build state.
- Added a leaf `PasWeave.FS` unit for shared path and file helpers; discovery,
Lazarus, and output code now share one definition of path normalization,
source-file detection, readability, symlink checks, and whole-file reads.
Directory walkers remain specialized where their pruning and filtering
semantics differ.
- Replaced the repeated `--name` / `--name=value` option branches with a
shared `MatchValueOption` helper, roughly halving `ParseCommandLine` and
centralizing separated-versus-equals value handling.

## [0.7.0] - 2026-09-17
## [0.7.0] - 2026-09-19

### Added

Expand Down Expand Up @@ -60,6 +35,27 @@ and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.ht
behavior under test and continue after a failure.
- Documentation navigation, the architecture tree, and the command table now
cover the CLI suite, the link check, and the decisions index.
- Decomposed the largest source units into focused units with their public
APIs preserved and no output changes: HTML diagrams
(`Render.HTML.Diagrams`), stylesheet and scripts (`Render.HTML.CSS`,
`Render.HTML.Scripts`), output writes/ledger/manifest (`PasWeave.Output`),
and the fcl-passrc element-to-symbol conversion (`FPCAdapter.Symbols`).
Renderers and the model no longer link the parser or compiler layers.
- Extracted the shared Lazarus configuration helpers (XML access, path and
macro expansion, custom-option parsing) into `PasWeave.Lazarus.Support`;
`PasWeave.Lazarus` now focuses on project and package graph assembly.
- Split the CLI build pipeline into named `ParseCommandLine`, `ExecuteBuild`,
and `RenderAndReport` phases, leaving `RunBuild` as a short orchestrator
with one owner for option objects and build state.
- Added a leaf `PasWeave.FS` unit for shared path and file helpers; discovery,
Lazarus, and output code now share one definition of path normalization,
source-file detection, readability, symlink checks, and whole-file reads.
Directory walkers remain specialized where their pruning and filtering
semantics differ.
- Replaced the repeated `--name` / `--name=value` option branches with a
shared `MatchValueOption` helper, roughly halving `ParseCommandLine` and
centralizing separated-versus-equals value handling.
- Every Pascal source now declares `{$mode objfpc}{$H+}{$J+}` explicitly.

### Fixed

Expand Down Expand Up @@ -117,6 +113,8 @@ and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.ht
inputs as unsupported and refreshed the `mathlib-fp` audit totals.
- Corrected the sample-output regeneration commands so they reproduce the
checked-in snapshots.
- Added XMLDoc comments across the public API of the parser, CLI, model,
comments, compiler options, and the HTML and Markdown renderers.

## [0.6.0] - 2026-08-17

Expand Down
2 changes: 1 addition & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ from: generated pages cannot smuggle active content, output replacement cannot
destroy the previous build, the CLI contract is covered by automated tests, and
the documentation is accurate, indexed, and link-checked.

Status: completed on 2026-09-17. The security and correctness fixes, CLI test
Status: completed on 2026-09-19. The security and correctness fixes, CLI test
suite, shared render helpers, documentation overhaul, and verification strategy
are recorded in [CHANGELOG.md](CHANGELOG.md),
[ADR-0003](docs/decisions/0003-golden-output-and-cli-tests.md), and the
Expand Down
15 changes: 11 additions & 4 deletions docs/building-from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ make
make test
```

Run the generated test executable from the repository root so it can find its
fixture:
`make test` builds and runs both suites: the compiled-CLI contract suite
(`tests/test_cli.pas`, also available alone as `make test-cli`) and the
model/renderer/parser suite (`tests/test_pasweave.pas`). Run both from the
repository root so they can find their fixtures:

```text
build/tests/test_cli
build/tests/test_pasweave
```

Expand All @@ -48,10 +51,14 @@ New-Item -ItemType Directory -Force build/bin, build/tests, build/units
Compile the CLI and tests from the repository root:

```text
fpc -Mobjfpc -Sh -Fusrc/cli -Fusrc/diagnostics -Fusrc/incremental -Fusrc/model -Fusrc/parser -Fusrc/render -Fusrc/validation -FUbuild/units -FEbuild/bin src/pasweave.lpr
fpc -Mobjfpc -Sh -Fusrc/cli -Fusrc/diagnostics -Fusrc/incremental -Fusrc/model -Fusrc/parser -Fusrc/render -Fusrc/validation -FUbuild/units -FEbuild/tests tests/test_pasweave.pas
fpc -Mobjfpc -Sh -Fusrc/cli -Fusrc/diagnostics -Fusrc/incremental -Fusrc/model -Fusrc/parser -Fusrc/render -Fusrc/support -Fusrc/validation -FUbuild/units -FEbuild/bin src/pasweave.lpr
fpc -Mobjfpc -Sh -Fusrc/cli -Fusrc/diagnostics -Fusrc/incremental -Fusrc/model -Fusrc/parser -Fusrc/render -Fusrc/support -Fusrc/validation -FUbuild/units -FEbuild/tests tests/test_pasweave.pas
fpc -Mobjfpc -Sh -Fusrc/cli -Fusrc/diagnostics -Fusrc/incremental -Fusrc/model -Fusrc/parser -Fusrc/render -Fusrc/support -Fusrc/validation -FUbuild/units -FEbuild/tests tests/test_cli.pas
```

The CLI suite starts `build/bin/pasweave`, so compile the CLI before running
`build/tests/test_cli`. Set `PASWEAVE_BIN` to test another executable.

## Build the portable Windows executable

```powershell
Expand Down
11 changes: 10 additions & 1 deletion docs/release-notes/RELEASE_NOTE_v0.7.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,16 @@ Highlights:
- **documentation overhaul**: version notes moved to
`docs/release-notes/` and `docs/pr-notes/`, every relative link fixed, a
grouped index at `docs/README.md`, `CONTRIBUTING.md`, PR and issue templates,
ADR-0003, and a CI link check.
ADR-0003, and a CI link check;
- **documented public API**: XMLDoc comments now cover the parser, CLI,
comments, compiler options, model, and both renderers, so PasWeave can
document itself;
- **maintainable internals**: the largest units were decomposed into focused
modules (HTML diagrams, CSS, scripts, `PasWeave.Output`,
`FPCAdapter.Symbols`, `Lazarus.Support`, shared `PasWeave.FS` helpers, and
named CLI build phases), and every Pascal source declares
`{$mode objfpc}{$H+}{$J+}` explicitly. Public APIs and generated output are
unchanged.

Validation includes the complete FPC 3.2.2 suite on Windows and Ubuntu: the
CLI suite, the named model/renderer/parser cases, manifest-hardening cases,
Expand Down
2 changes: 1 addition & 1 deletion examples/documented-api/Demo.Core.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/// documentation marker.
unit Demo.Core;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

interface

Expand Down
2 changes: 1 addition & 1 deletion examples/documented-api/Demo.Services.pas
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// Demonstrates documented APIs that depend on another project unit.
unit Demo.Services;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

interface

Expand Down
2 changes: 1 addition & 1 deletion examples/scientific-api/Scientific.Analysis.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/// such as $\mu$ and $\sigma$ to complete display equations.
unit Scientific.Analysis;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

interface

Expand Down
2 changes: 1 addition & 1 deletion examples/scientific-api/Scientific.Core.pas
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/// $$
unit Scientific.Core;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

interface

Expand Down
2 changes: 1 addition & 1 deletion examples/scientific-api/ScientificDemo.lpr
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
program ScientificDemo;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

uses
SysUtils, Scientific.Core, Scientific.Analysis;
Expand Down
2 changes: 1 addition & 1 deletion src/cli/PasWeave.CLI.pas
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/// for safe incremental rebuilds.
unit PasWeave.CLI;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

interface

Expand Down
2 changes: 1 addition & 1 deletion src/cli/PasWeave.Version.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
unit PasWeave.Version;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

interface

Expand Down
2 changes: 1 addition & 1 deletion src/diagnostics/PasWeave.Diagnostics.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
unit PasWeave.Diagnostics;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

interface

Expand Down
2 changes: 1 addition & 1 deletion src/incremental/PasWeave.Hashing.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
unit PasWeave.Hashing;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

interface

Expand Down
2 changes: 1 addition & 1 deletion src/incremental/PasWeave.Incremental.pas
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/// The generated output tree is owned by PasWeave.Output.
unit PasWeave.Incremental;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

interface

Expand Down
2 changes: 1 addition & 1 deletion src/incremental/PasWeave.Output.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/// This is a leaf unit so renderers and the model never link the parser.
unit PasWeave.Output;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

interface

Expand Down
2 changes: 1 addition & 1 deletion src/model/PasWeave.Model.JSON.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
unit PasWeave.Model.JSON;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

interface

Expand Down
2 changes: 1 addition & 1 deletion src/model/PasWeave.Model.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
unit PasWeave.Model;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

interface

Expand Down
2 changes: 1 addition & 1 deletion src/model/PasWeave.SourceLinks.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
unit PasWeave.SourceLinks;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

interface

Expand Down
2 changes: 1 addition & 1 deletion src/parser/PasWeave.Comments.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
unit PasWeave.Comments;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

interface

Expand Down
2 changes: 1 addition & 1 deletion src/parser/PasWeave.Compiler.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
unit PasWeave.Compiler;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

interface

Expand Down
2 changes: 1 addition & 1 deletion src/parser/PasWeave.FPCAdapter.Symbols.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/// construction and diagnostics.
unit PasWeave.FPCAdapter.Symbols;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

interface

Expand Down
2 changes: 1 addition & 1 deletion src/parser/PasWeave.FPCAdapter.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
unit PasWeave.FPCAdapter;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

interface

Expand Down
2 changes: 1 addition & 1 deletion src/parser/PasWeave.Lazarus.Support.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/// expansion, and Free Pascal custom-option parsing.
unit PasWeave.Lazarus.Support;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

interface

Expand Down
2 changes: 1 addition & 1 deletion src/parser/PasWeave.Lazarus.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
unit PasWeave.Lazarus;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

interface

Expand Down
2 changes: 1 addition & 1 deletion src/parser/PasWeave.Parser.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
unit PasWeave.Parser;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

interface

Expand Down
2 changes: 1 addition & 1 deletion src/pasweave.lpr
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
program pasweave;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}
{$IFDEF PASWEAVE_PORTABLE_ASSETS}
{$R ../build/release/pasweave-assets.res}
{$ENDIF}
Expand Down
2 changes: 1 addition & 1 deletion src/render/PasWeave.Render.HTML.Assets.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
unit PasWeave.Render.HTML.Assets;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}
{$codepage utf8}

interface
Expand Down
2 changes: 1 addition & 1 deletion src/render/PasWeave.Render.HTML.CSS.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
unit PasWeave.Render.HTML.CSS;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}
{$codepage utf8}

interface
Expand Down
2 changes: 1 addition & 1 deletion src/render/PasWeave.Render.HTML.Diagrams.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
unit PasWeave.Render.HTML.Diagrams;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}
{$codepage utf8}

interface
Expand Down
2 changes: 1 addition & 1 deletion src/render/PasWeave.Render.HTML.Markdown.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
unit PasWeave.Render.HTML.Markdown;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}
{$codepage utf8}

interface
Expand Down
2 changes: 1 addition & 1 deletion src/render/PasWeave.Render.HTML.Scripts.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
unit PasWeave.Render.HTML.Scripts;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}
{$codepage utf8}

interface
Expand Down
2 changes: 1 addition & 1 deletion src/render/PasWeave.Render.HTML.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
unit PasWeave.Render.HTML;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}
{$codepage utf8}

interface
Expand Down
2 changes: 1 addition & 1 deletion src/render/PasWeave.Render.Links.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
unit PasWeave.Render.Links;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}
{$codepage utf8}

interface
Expand Down
2 changes: 1 addition & 1 deletion src/render/PasWeave.Render.Markdown.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
unit PasWeave.Render.Markdown;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}
{$codepage utf8}

interface
Expand Down
2 changes: 1 addition & 1 deletion src/render/PasWeave.Render.Support.pas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
unit PasWeave.Render.Support;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

interface

Expand Down
2 changes: 1 addition & 1 deletion src/support/PasWeave.FS.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/// output code can share one definition of path and file handling.
unit PasWeave.FS;

{$mode objfpc}{$H+}
{$mode objfpc}{$H+}{$J+}

interface

Expand Down
Loading
Loading