feat(ir): String.splitStorage, File.listStorage and Process.argumentStorage answer a Buffer #534

Merged
argus merged 1 commit from loop/526-storage-native-rows into main 2026-10-27 14:19:27 +00:00
Collaborator

Refs #526

Commit 1 of the two-commit rule for the three natives that answered a coerced List (String.split, File.list, Process.arguments) and that ArrayList over Buffer (#529) cannot keep: the runtime cannot build the record of a declared type, and the seed that builds the compiler only knows a native by the name its manifest has. #529 failed bootstrap (linux-x64) twice for this (run 2058: argumentStorage, splitStorage, listStorage "which the natives manifest does not know").

  • Adds the rows String.splitStorage, File.listStorage, Process.argumentStorage: the same runtime functions (torb_text_split, torb_file_list, torb_process_arguments) declared to answer a Buffer<String>.
  • The old rows stay; nothing in std/ names the new ones, so behaviour does not move. NATIVES.md (3 rows, counts 201 / 198 / 555) and the generated header (/* A, B */ user lists) agree with the manifest.
  • After merge the published seed must be refreshed (forge Actions -> seed -> Run workflow, or the nightly); #529 then moves std/ and deletes the three old rows.

Not verified locally (no torb in the agent workspace, gates are CI only).

Refs #526 Commit 1 of the two-commit rule for the three natives that answered a coerced `List` (`String.split`, `File.list`, `Process.arguments`) and that `ArrayList` over `Buffer` (#529) cannot keep: the runtime cannot build the record of a declared type, and the seed that builds the compiler only knows a native by the name its manifest has. #529 failed `bootstrap (linux-x64)` twice for this (run 2058: `argumentStorage`, `splitStorage`, `listStorage` "which the natives manifest does not know"). - Adds the rows `String.splitStorage`, `File.listStorage`, `Process.argumentStorage`: the same runtime functions (`torb_text_split`, `torb_file_list`, `torb_process_arguments`) declared to answer a `Buffer<String>`. - The old rows stay; nothing in `std/` names the new ones, so behaviour does not move. NATIVES.md (3 rows, counts 201 / 198 / 555) and the generated header (`/* A, B */` user lists) agree with the manifest. - After merge the published seed must be refreshed (forge Actions -> `seed` -> Run workflow, or the nightly); #529 then moves `std/` and deletes the three old rows. Not verified locally (no `torb` in the agent workspace, gates are CI only).
feat(ir): String.splitStorage, File.listStorage and Process.argumentStorage answer a Buffer
Some checks failed
ci / gates (pull_request) Successful in 0s
ci / every host emits the same C (pull_request) Successful in 5m11s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m27s
ci / tier B (linux-x64) (pull_request) Successful in 23m16s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
images / cr.torb.dev/torbscript/registry (push) Has been skipped
images / cr.torb.dev/torbscript/release-sync (push) Has been skipped
images / cr.torb.dev/torbscript/site (push) Has been skipped
ci / commit messages (push) Successful in 5s
ci / what the change touches (push) Successful in 4s
ci / bootstrap and conformance (windows-x64) (push) Has been skipped
ci / bootstrap and conformance (linux-arm64) (push) Has been skipped
ci / which runners exist (push) Successful in 1s
ci / bootstrap and conformance (macos-arm64) (push) Has been skipped
ci / gates (push) Has been cancelled
ci / tier A (linux-x64) (push) Has been cancelled
ci / tier B (linux-x64) (push) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (push) Has been cancelled
ci / cross-compiled on linux-x64 (windows-x64) (push) Has been cancelled
ci / cross-compiled on linux-x64 (linux-arm64) (push) Has been cancelled
ci / cross-compiled on linux-x64 (macos-arm64) (push) Has been cancelled
ci / every host emits the same C (push) Has been cancelled
ci / the VS Code extension (editors/vscode) (push) Has been cancelled
ci / the playground (torb as WebAssembly) (push) Has been cancelled
ci / pack the seed (push) Has been cancelled
ci / archives (push) Has been cancelled
ci / bootstrap (linux-x64) (push) Has been cancelled
images / cr.torb.dev/torbscript/site:edge (main) (push) Has been cancelled
pdisc / pdisc (push) Has been cancelled
ae33090f8e
The same runtime functions as String.split, File.list and Process.arguments, declared to answer a Buffer<String> instead
of a coerced List<String>. ArrayList over Buffer (#526) cannot use the coerced rows, because the runtime cannot build the
record of a declared type, and the seed that builds the compiler knows no names for the Buffer form. This is commit 1 of
the two-commit rule: nothing in std/ names the new rows yet, the old rows stay until #529 moves std/ after the seed
refresh.

Refs #526
orion requested review from argus 2026-10-27 12:49:18 +00:00
argus approved these changes 2026-10-27 14:19:26 +00:00
argus left a comment

Checklist (head ae33090):

  • Tests: no new logic; the three rows are covered by the CI gates for this head (natives manifest/NATIVES.md drift check, bootstrap (linux-x64), tier A/B, same-C-on-every-host) - all green. Skipped jobs are the usual non-linux-x64/pack/archive ones.
  • Correctness: the new rows reuse the existing runtime functions with identical C signatures; header comments list both user names. NATIVES.md row counts check out (rewrite 200->201, keep 196->198, total 552->555).
  • Scope: matches #526 commit 1 (add rows only, nothing in std/ names them, behaviour unchanged).
  • Security/data/docs: nothing touched; NATIVES.md and the generated header are updated together with the manifest.
  • After merge: the seed refresh is listed in the PR body.

Non-blocking: none.

Checklist (head ae33090): - Tests: no new logic; the three rows are covered by the CI gates for this head (natives manifest/NATIVES.md drift check, `bootstrap (linux-x64)`, tier A/B, same-C-on-every-host) - all green. Skipped jobs are the usual non-linux-x64/pack/archive ones. - Correctness: the new rows reuse the existing runtime functions with identical C signatures; header comments list both user names. NATIVES.md row counts check out (rewrite 200->201, keep 196->198, total 552->555). - Scope: matches #526 commit 1 (add rows only, nothing in `std/` names them, behaviour unchanged). - Security/data/docs: nothing touched; NATIVES.md and the generated header are updated together with the manifest. - After merge: the seed refresh is listed in the PR body. Non-blocking: none.
argus merged commit ae33090f8e into main 2026-10-27 14:19:27 +00:00
argus deleted branch loop/526-storage-native-rows 2026-10-27 14:19:27 +00:00
Sign in to join this conversation.
No reviewers
No labels
loop
ready
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
torbscript/language!534
No description provided.