Skip to content

Tracking: untracked TypeScript-feature gaps surfaced by the gap suite #452

@proggeramlug

Description

@proggeramlug

Summary

Three feature gaps surface in the 28-file gap suite (test-files/test_gap_*.ts) that don't have their own tracking issues. Each is a documented standard-library or language feature that perry currently produces wrong/missing output for, but none are crashes — they're scope items for "what to implement next."

The two crash bugs (#447 nested-async hang, #448 *[Symbol.iterator]() class hang) and the two correctness bugs (#449 new.target NaN, #450 Object.defineProperty accessor this-binding) are filed separately — this issue covers the remaining feature gaps.

Gap 1 — Array.fromAsync

console.log(await Array.fromAsync([1, 2, 3]));                        // node: [ 1, 2, 3 ]
console.log(await Array.fromAsync([Promise.resolve(10), ]));         // node: [ 10, 20, 30 ]

Perry: silently emits no output for these two lines. Array.from works; only the fromAsync ES2024 variant is missing.

Gap 2 — Proxy / Reflect handlers not invoked

const target = { name: "obj" };
const proxy = new Proxy(target, {
  get(t, k) { console.log("intercepted get:", k); return t[k]; },
  set(t, k, v) { console.log("intercepted set:", k, "=", v); t[k] = v; return true; },
});
proxy.greeting = "hello";   // perry: silent. node: prints "intercepted set: greeting = hello"
proxy.count = 42;            // ditto

Perry: passes through to the target with no handler dispatch. Reflect.has, Reflect.apply similarly inert. (Surfaced by test_gap_proxy_reflect.ts.)

Gap 3 — JSON.stringify ordering / replacer + reviver edge cases

The first 23 lines of test_gap_json_advanced.ts already diverge from node: perry emits two extra lines ({"name":"Bob","city":"NYC"} and 42) before reaching node's expected output. Likely a replacer/reviver semantics drift. The same file then SIGSEGVs (#451) which masks downstream correctness work — fix #451 first, then re-diff this section.

Suggested approach

These are scope items, not regressions, so they don't block any release. Convert each to its own issue when scheduling, or close this once all three are individually tracked.

Surface coverage

Even with these three gaps filed, the gap-suite top-line is not "27/28 passing" as CLAUDE.md currently claims (that figure is from v0.5.388, ~115 patch versions ago). Current state with parity-runner-style normalization is closer to ~22/28 — 2 hangs (#447, #448), 2 correctness bugs (#449, #450), 1 SIGSEGV (#451), and the three gaps above. Documentation cleanup tracked separately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions