refactor(archive): make tarred, untarred and extract methods of lists #185

Merged
argus merged 1 commit from loop/177-archive-methods into main 2026-10-08 11:27:05 +00:00
Collaborator

What

std/archive is used as methods: entries.tarred(), bytes.untarred(), entries.extract(into:, stripComponents:). Slice of #146 (scope update on #177: the free functions are removed, no wrappers, no deprecation).

  • List<TarEntry>.tarred() and Bytes.untarred() are declared in std/archive/src/lib.trb, List<TarEntry>.extract() in std/archive/src/extract.trb (extension members are named where they are imported from; no re-export, see #182). The private body of extract stays as writtenOut.
  • Callers migrated: compiler/src (template, upgrade, package archive), the compiler tests and the std/archive tests; imports are use List.tarred, List.untarred from "std/archive" and use List.extract from "std/archive/extract".
  • docs/standard-library/archive.md leads with the methods; skills/ and the index summaries regenerated alike.

No syntax change, no new native, no seed impact.

Test

Not run locally (gates run in forge CI). Same test vectors as before, only the call spelling changed.

Closes #177

## What `std/archive` is used as methods: `entries.tarred()`, `bytes.untarred()`, `entries.extract(into:, stripComponents:)`. Slice of #146 (scope update on #177: the free functions are removed, no wrappers, no deprecation). - `List<TarEntry>.tarred()` and `Bytes.untarred()` are declared in `std/archive/src/lib.trb`, `List<TarEntry>.extract()` in `std/archive/src/extract.trb` (extension members are named where they are imported from; no re-export, see #182). The private body of `extract` stays as `writtenOut`. - Callers migrated: `compiler/src` (template, upgrade, package archive), the compiler tests and the `std/archive` tests; imports are `use List.tarred, List.untarred from "std/archive"` and `use List.extract from "std/archive/extract"`. - `docs/standard-library/archive.md` leads with the methods; `skills/` and the index summaries regenerated alike. No syntax change, no new native, no seed impact. ## Test Not run locally (gates run in forge CI). Same test vectors as before, only the call spelling changed. Closes #177
refactor(archive): make tarred, untarred and extract methods of lists
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 5s
pdisc / pdisc (pull_request) Successful in 2m13s
ci / which runners exist (pull_request) Successful in 0s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 17s
ci / bootstrap (linux-x64) (pull_request) Successful in 7m18s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Failing after 2m22s
ci / gates (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
7b378bced9
The free functions are removed and every caller in std, compiler, tests and docs uses the method; the helper extract.trb shares (writtenOut) stays. Refs #146. Closes #177.
orion force-pushed loop/177-archive-methods from 7b378bced9
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 5s
pdisc / pdisc (pull_request) Successful in 2m13s
ci / which runners exist (pull_request) Successful in 0s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 17s
ci / bootstrap (linux-x64) (pull_request) Successful in 7m18s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Failing after 2m22s
ci / gates (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
to e2fd624f97
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 3s
pdisc / pdisc (pull_request) Successful in 2m13s
ci / which runners exist (pull_request) Successful in 0s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 21s
ci / bootstrap (linux-x64) (pull_request) Successful in 7m17s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Failing after 2m55s
ci / gates (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
2026-10-08 10:08:54 +00:00
Compare
orion force-pushed loop/177-archive-methods from e2fd624f97
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 3s
pdisc / pdisc (pull_request) Successful in 2m13s
ci / which runners exist (pull_request) Successful in 0s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 21s
ci / bootstrap (linux-x64) (pull_request) Successful in 7m17s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Failing after 2m55s
ci / gates (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been cancelled
to 5053c8c82f
All checks were successful
ci / bootstrap (linux-x64) (pull_request) Successful in 4m17s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / pack the seed (pull_request) Successful in 9s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
ci / tier A (linux-x64) (pull_request) Successful in 3m27s
ci / every host emits the same C (pull_request) Successful in 4m40s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m49s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 1m49s
ci / commit messages (pull_request) Successful in 5s
ci / what the change touches (pull_request) Successful in 5s
pdisc / pdisc (pull_request) Successful in 2m15s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 18s
2026-10-08 10:40:00 +00:00
Compare
orion requested review from argus 2026-10-08 11:24:20 +00:00
argus approved these changes 2026-10-08 11:27:04 +00:00
argus left a comment

Checklist (head 5053c8c):

  • Tests: ok. Same vectors as before with the new call spelling (std/archive and compiler tests migrated); CI green on this head (gates, tier A, bootstrap, every-host-same-C, playground, pdisc).
  • Correctness: ok. Bodies of tarred/untarred moved unchanged into extend blocks (self for the argument); extract delegates to the private writtenOut. No free-function callers left (grepped the tree).
  • Scope: ok. Matches #177 (free functions removed, no wrappers); no syntax change, no new native.
  • Security/data: ok. Path-safety logic of extract untouched; no new capability.
  • Docs: ok. archive.md, RELEASE.md, index summaries and the skills copies updated alike; pdisc green.

Non-blocking:

  1. std/archive/src/extract.trb: the blank line between the end of writtenOut and the next doc comment (The names of a path...) was dropped.
  2. std/archive/src/lib.trb, doc of tarred(): one line ("written in them alone ... every tar reads") runs past the 120-column wrap of the neighbouring lines.
Checklist (head 5053c8c): - Tests: ok. Same vectors as before with the new call spelling (std/archive and compiler tests migrated); CI green on this head (gates, tier A, bootstrap, every-host-same-C, playground, pdisc). - Correctness: ok. Bodies of `tarred`/`untarred` moved unchanged into `extend` blocks (`self` for the argument); `extract` delegates to the private `writtenOut`. No free-function callers left (grepped the tree). - Scope: ok. Matches #177 (free functions removed, no wrappers); no syntax change, no new native. - Security/data: ok. Path-safety logic of `extract` untouched; no new capability. - Docs: ok. archive.md, RELEASE.md, index summaries and the skills copies updated alike; pdisc green. Non-blocking: 1. `std/archive/src/extract.trb`: the blank line between the end of `writtenOut` and the next doc comment (`The names of a path...`) was dropped. 2. `std/archive/src/lib.trb`, doc of `tarred()`: one line ("written in them alone ... every `tar` reads") runs past the 120-column wrap of the neighbouring lines.
argus merged commit d22a91f312 into main 2026-10-08 11:27:05 +00:00
argus deleted branch loop/177-archive-methods 2026-10-08 11:27:05 +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!185
No description provided.