Skip to content

v1.28.3-alpha -- converter: uses reconciliation, pas_uses work list, StripDB, in-scope #convert classes; Work list editor tab; compare verb

Choose a tag to compare

@Alexl-git Alexl-git released this 12 Oct 01:20
· 509 commits to main since this release

Engine, conversion editor and charts released together. Covers engine 1.27.0 through 1.28.3.
No re-parse or re-resolve needed: the extractor (1.21.1) and resolver (1.12) are unchanged, so existing indexes keep working.

Engine -- component conversion (convert-apply)

  • uses reconciliation (C9). After a conversion, each unit's uses clauses are reconciled. Units the new components need are added; units nothing needs any more are removed. A unit is kept only when the converted .dfm still needs it. Every change is reported as a uses[] row (add / remove / kept / moved), and the project index is refreshed after the write. --no-reconcile-uses and --no-reindex opt out.

  • Ties between declaring units are settled by the book. When a type is declared in more than one unit, the book's #use decides, then #useswap, then the #convert unit. The chosen unit goes into the interface uses when the field is declared there, so the converted unit compiles. Units named on a #convert line are now reported as add rows too.

  • #convert classes resolve in the unit's scope (1.28.3). A bare class name such as TLabel is no longer matched to the first class of that name, which could be the FMX one. When a name is still ambiguous, the engine infers the class from:

    1. the project framework;
    2. the form-file kind (.dfm means VCL, .fmx means FMX);
    3. the properties the .dfm streams.

    If that settles it, the unit converts with a warning naming the evidence. Otherwise the unit is refused with a detailed reason, and qualify_fixes[] carries paste-ready replacement lines.

  • New pas_uses[] report. It lists every member and global the converted .pas still uses, with a status: mapped, same-name, unmapped, not-rewritten, cast-refused or global-dangling. Each row also carries the declaring unit, how the class was resolved, and the candidates when ambiguous. It is the work list for hand conversion.

  • StripDB value cast. #link TableName <- TableName : StripDB removes a trailing .db from Paradox table names. It applies to the .dfm and to single-literal .pas assignments; every other form of assignment gets a warning instead of an edit.

  • Fixed: a class cast (e.g. AssignGraphic) could write unparseable .pas code. Such access sites are now refused one by one, with a warning to convert them by hand.

  • New exit code 6: a cast library that cannot be loaded or executed. Code 2 still means a write failure or rollback.

Engine -- lint

  • function-result-not-set and out-param-not-set no longer fire on paths that end in raise, Halt or Abort.
  • doc-drift no longer reads comments inside a split parameter list as parameters. Doc facts no longer attach a "Called from" edge to the wrong class.
  • unused-unit-in-uses now counts enum values, so a unit used only through alTop or similar is no longer flagged.

Conversion editor

Conversion editor: new Work list tab lists every member the converted code still uses (unmapped / not-rewritten / cast-refused / global-dangling, with ambiguous declaring units shown as such); Convert tab reports cast sites, StripDB value changes and uses-clause changes; StripDB applied to Paradox TableName in the BDE->FireDAC book; Convert progress and Conversion > Reindex project.

Charts

New drag-lint compare verb: reruns a report from its COMMAND header and diffs the old result against the new one, with text, JSON or HTML output. It covers report text, forms CSV and chart graphs, and the old side can be the remarks block, a saved file, an automatic snapshot or an older index. The HTML page refuses to embed an unsafe graph.svg and is served under a strict CSP. The first chart emitters (text, index, source) are now native Delphi, checked against the PowerShell originals by a parity harness.

JSON consumers

convert-apply --format json has these changes:

  • New capabilities: uses_reconcile, cast_site_refusal, pas_uses, pas_uses_resolution, value_cast_strip_db and convert_qualify_fix.
  • Retired item kind: cast-applied.
  • uses_added can be one higher: a book #use To unit placed in the interface now gets its own add row.

The full details are in CHANGELOG.md.