docs: refresh Phase-C TODO — audit results + remaining edge cases

Update the 1.0-readiness document with:
- 2026-04-18 compatibility audit results: 50/47 build rate (94%)
  vs previous 40/34. Lists every fix commit this session.
- Four remaining low-priority edge cases from the audit (xcommand
  nested-comma args, u64 overflow, USE with ../ paths, legacy
  inline-C syntax) — none block a realistic 1.0.
- Revised Phase-C scope: user clarified contrib PRGs can be
  imported as-is so long as underlying RTL exists, so the work is
  "audit each contrib's low-level deps, fill gaps, copy .prg"
  rather than porting every function.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-18 18:32:45 +09:00
parent 4a1bbdb1fe
commit e5843bdde4

View File

@@ -1,10 +1,15 @@
# Five 1.0 — Phase C TODO (Harbour Contrib Libraries)
Status as of commit `2a66252` (2026-04-18).
Status as of commit `4a1bbdb` (2026-04-18).
## Context
Phase A (language blockers) and Phase B (RTL blockers) are complete:
Phase A (language blockers), Phase B (RTL blockers), and the
compatibility-audit follow-ups are complete. Summary below, then the
remaining Phase C work (contrib libraries) + a short list of
low-priority edge cases surfaced by the Harbour test-suite audit.
### Phase A — language blockers (done)
- `::super:Method()` dispatch — `3a56bd3`
- `METHOD INLINE` + `MESSAGE INLINE``34485cd`
@@ -12,12 +17,53 @@ Phase A (language blockers) and Phase B (RTL blockers) are complete:
- `&var` / `&(expr)` runtime macro — `e089c81`
- `DATA x, y, z` multi-name parse — `327f75b`
- `DO(xTarget, args...)``2a66252`
- ACCEPT — skipped (user decision, revisit if needed)
- 11 `HBTYPE` functions — **not actually blockers**: these are Harbour's
scalar class factories (`HBARRAY` etc. wrap the Array class used for
`cStr:Upper()` syntax). Five provides the same surface via
`hbrt/valuemethods.go` `SendBuiltin` and doesn't need the C-level
factories exposed.
### Phase B — RTL blockers (done / re-scoped)
- ACCEPT — user deferred (revisit if needed).
- 11 `HBTYPE` functions — **not actually blockers**: these are
Harbour's scalar class factories (`HBARRAY` wraps the Array
scalar class used for `cStr:Upper()` syntax). Five provides the
same surface via `hbrt/valuemethods.go` `SendBuiltin` and doesn't
need the C-level factories exposed.
### 2026-04-18 audit follow-ups (done)
Harbour test suite re-audit (50 files sampled, broad coverage) moved
from 34/40 building to 47/50 (94%). Fixes landed:
- Implicit CLASS binding for standalone METHOD bodies — `0a5482b`
- Keyword-as-identifier at stmt-block boundaries — `d3c4447`
- `common.ch` ISNIL/ISARRAY/ISNUMBER/ISCHARACTER/ISDATE/ISLOGICAL/
ISOBJECT/ISBLOCK/ISMEMO aliases — `d6c2610`
- `#xcommand NAME( <m>, <n> )` paren-attached keyword — `4b629f7`
- SWITCH empty / OTHERWISE-only / EXIT-from-case — `65b2edc`
- `M->` / `MEMVAR->` memvar access — `385a4ec`
- PP stringify markers + paren-balanced capture — `e952277`
- `USE &cFile ALIAS &a INDEX &c` macro args — `85002df`
- `#pragma BEGINDUMP` inline-C detection with friendly error — `5514780`
- Inline Go #pragma BEGINDUMP imports hoisted + HB_FUNC dispatch — `b1024c5`
- `#xcommand [, <vn> TO <xn>]` optional-repeat blocks (DEFAULT / UPDATE
in common.ch now work) — `4a1bbdb`
### Remaining low-priority edge cases (from the audit)
| # | Symptom | Where | Scope |
|---|---------|-------|-------|
| 1 | `RDDTESTF NIL, {arr}, call()` — xcommand taking a `<x>` regular marker where the argument itself contains top-level commas. PP captures fine but expansion produces output that the Harbour-style `rddtst_wr` can't re-parse. | `tests/rddtest/adscl52.prg`, `adscl53.prg` | xcommand argument-count resolution OR extend `<*x*>` wild marker support. ~2-4h |
| 2 | Integer overflow on u64 literals like `18446744073709600000`. Five emits Go's signed int64; overflow causes `cannot use ... (untyped int constant)` in generated Go. | `tests/dyn.prg` | Route large literals to Go `uint64` / `math/big`. ~1-2h |
| 3 | `USE ../alias` — relative path literal with `../` tokenised as decimal-dot operator. | `tests/mt/mttest10.prg` | Lexer context for `..` inside USE filename. ~1-2h |
| 4 | Harbour legacy `identifier { C-code }` inline C block syntax (deprecated form predating `#pragma BEGINDUMP`). | `tests/hbinline.prg` | Friendly error similar to `5514780`. ~30min. |
None block a realistic 1.0 — all are specialised to Harbour's own
test conventions, not production code patterns.
## Phase C scope
Originally three libraries (hbct, hbnf, hbtip). User clarified: PRG
contribs can be **imported as-is** as long as their low-level RTL
deps exist in Five. So Phase C is really "audit each contrib's RTL
dependencies, fill the gaps, then copy the `.prg` files wholesale".
Remaining for 1.0 is the contrib library ecosystem — Harbour ships
~70 libraries under `harbour-core/contrib/`, only a handful of which