blaise/project.xml
Andrew Haines 56c3fe1d0b feat(tools): add bif-coverage verifier for AST/encoder/decoder drift
Static-analysis tool that cross-checks uAST.pas against
uUnitInterfaceIO.pas and the root project.xml. For every TASTStmt /
TASTExpr subclass it confirms the class has a dispatch case in
EncodeStmt/EncodeExpr and ReadStmt/ReadExpr, then walks the public
fields and ensures each is either referenced from both encoder and
decoder (`serialise`) or explicitly excluded (`safe`).

Truth is checked-in: bif-coverage.status is a flat file with one
`<TClass>.<Field>  <serialise|safe>` line per field. The default
invocation diffs the live sources against the status file and reports:

  [version]   COMPILER_ID does not match root project <version>
  [encoder]   missing (Class.Field, uAST.pas line)
  [decoder]   missing (Class.Field, uAST.pas line)
  [new]       field exists in AST but is not in the status file
  [stale]     status names a field or class the AST no longer has
  [broken]    serialise field missing from encoder or decoder
  [drift]     safe field has crept into encoder/decoder (with the
              offending uUnitInterfaceIO.pas line)

`bif-coverage --reset` regenerates the status file from current state,
inferring `serialise` when the encoder references the field and `safe`
otherwise. Use after deliberate AST or .bif format changes to
re-baseline.
2026-06-08 00:27:24 +01:00

49 lines
1.1 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<project>
<name>blaise</name>
<version>0.11.0-SNAPSHOT</version>
<author>Graeme Geldenhuys</author>
<license>Apache-2.0 WITH Swift-exception</license>
<build>
<packaging>pom</packaging>
</build>
<modules>
<module activeByDefault="false">runtime</module>
<module activeByDefault="false">stdlib</module>
<module>compiler</module>
<module>tools/migration-analyser</module>
<module>tools/kanban</module>
<module activeByDefault="false">tools/bif-coverage</module>
</modules>
<profiles>
<profile>
<id>debug</id>
<defines>
<define>DEBUG</define>
</defines>
<compilerOptions>
<option>-g</option>
<option>-gl</option>
<option>-Criot</option>
<option>-gh</option>
</compilerOptions>
</profile>
<profile>
<id>release</id>
<defines>
<define>RELEASE</define>
</defines>
<compilerOptions>
<option>-O2</option>
<option>-CX</option>
<option>-XX</option>
<option>-Xs</option>
</compilerOptions>
</profile>
</profiles>
</project>