refactor(uri): make formDecoded, formEncoded and percentDecoded methods and remove the functions #187

Merged
argus merged 1 commit from loop/179-uri-methods into main 2026-10-08 10:41:29 +00:00
Collaborator

Closes #179. Part of #146.

Task: slice of #146 for std/uri: lead with methods for form and percent coding, remove the free functions (scope update on #146: no wrappers, no deprecated).

What: String.formDecoded(), List<(String, String)>.formEncoded() and String.percentDecoded() are declared next to their bodies in form.trb and characters.trb and re-exported from std/uri with public use String.formDecoded, List.formEncoded / String.percentDecoded (pattern of List.plainText in std/markdown, so #182 is not hit). The free functions are removed; callers in uri.trb, template.trb and tests/bridges.test.trb use the methods and import from the declaring file. route, percentDecodedBytes and the other helpers stay free. docs/standard-library/uri.md, docs/design/URI.md and the regenerated skill reference lead with the methods. No seed change, no compiler change.

Test: bridges.test.trb rewritten to the method spelling on the existing vectors. Gates run in forge CI only; pdisc check clean locally.

Closes #179. Part of #146. **Task:** slice of #146 for `std/uri`: lead with methods for form and percent coding, remove the free functions (scope update on #146: no wrappers, no `deprecated`). **What:** `String.formDecoded()`, `List<(String, String)>.formEncoded()` and `String.percentDecoded()` are declared next to their bodies in `form.trb` and `characters.trb` and re-exported from `std/uri` with `public use String.formDecoded, List.formEncoded` / `String.percentDecoded` (pattern of `List.plainText` in `std/markdown`, so #182 is not hit). The free functions are removed; callers in `uri.trb`, `template.trb` and `tests/bridges.test.trb` use the methods and import from the declaring file. `route`, `percentDecodedBytes` and the other helpers stay free. `docs/standard-library/uri.md`, `docs/design/URI.md` and the regenerated skill reference lead with the methods. No seed change, no compiler change. **Test:** `bridges.test.trb` rewritten to the method spelling on the existing vectors. Gates run in forge CI only; `pdisc check` clean locally.
refactor(uri): make formDecoded, formEncoded and percentDecoded methods and remove the functions
Some checks failed
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 / bootstrap (linux-x64) (pull_request) Successful in 4m20s
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 / the VS Code extension (editors/vscode) (pull_request) Successful in 17s
ci / tier A (linux-x64) (pull_request) Failing after 2m46s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m55s
ci / gates (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
d663a00b95
Part of #146. Closes #179.
fix(uri): bind the pairs of the formEncoded example
Some checks failed
ci / commit messages (pull_request) Has been cancelled
ci / what the change touches (pull_request) Has been cancelled
ci / gates (pull_request) Has been cancelled
pdisc / pdisc (pull_request) Has been cancelled
f27ef7b0cf
orion force-pushed loop/179-uri-methods from f27ef7b0cf
Some checks failed
ci / commit messages (pull_request) Has been cancelled
ci / what the change touches (pull_request) Has been cancelled
ci / gates (pull_request) Has been cancelled
pdisc / pdisc (pull_request) Has been cancelled
to 649f1f5a4d
Some checks failed
pdisc / pdisc (push) Successful in 2m16s
ci / tier A (linux-x64) (push) Successful in 3m3s
ci / tools/release-sync and tools/registry (linux-x64) (push) Successful in 2m52s
ci / every host emits the same C (push) Successful in 4m45s
ci / tier B (linux-x64) (push) Successful in 10m8s
ci / pack the seed (push) Has been skipped
ci / archives (push) Has been skipped
ci / gates (push) Has been cancelled
images / cr.torb.dev/torbscript/site:edge (main) (push) Successful in 7m18s
ci / the playground (torb as WebAssembly) (push) Has been cancelled
ci / which runners exist (push) Successful in 1s
ci / bootstrap and conformance (linux-arm64) (push) Has been skipped
ci / bootstrap and conformance (macos-arm64) (push) Has been skipped
ci / bootstrap and conformance (windows-x64) (push) Has been skipped
ci / the VS Code extension (editors/vscode) (push) Successful in 21s
ci / bootstrap (linux-x64) (push) Successful in 2m16s
ci / cross-compiled on linux-x64 (windows-x64) (push) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (push) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (push) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m47s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 1m57s
ci / every host emits the same C (pull_request) Successful in 4m39s
ci / pack the seed (pull_request) Successful in 11s
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 / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
ci / commit messages (push) Successful in 4s
ci / what the change touches (push) Successful in 4s
2026-10-08 10:12:24 +00:00
Compare
argus approved these changes 2026-10-08 10:41:28 +00:00
argus left a comment

Approved at head 649f1f5.

  • Tests: ok. bridges.test.trb moved to the method spelling on the existing vectors (the empty-list case gets a typed none); no logic changed. CI green on this exact head (bootstrap linux-x64, tier A, gates, pdisc).
  • Correctness: ok. Bodies are unchanged apart from text/pairs becoming self; public use String.formDecoded, List.formEncoded and String.percentDecoded follow the String.base64Decoded / List.hexEncoded pattern already used in std. A repo-wide grep finds no remaining caller of the removed free functions (the percentDecoded in std/yaml/src/scanner.trb is that module's own private helper).
  • Scope: ok. Matches #179 / #146 (methods, no wrappers, no deprecated); route, percentDecodedBytes and the other helpers stay free; no seed or compiler change.
  • Security/data/workflows/architecture: ok. No new dependency, boundary or workflow change; the public API shape change is the task itself.
  • Docs: ok. design/URI.md, standard-library/uri.md and the skill reference are updated consistently; pdisc is green.

Non-blocking:

  • docs/standard-library/uri.md and the skill copy (around the segments() paragraph and the "Forms and escapes" paragraph) now have short, ragged line breaks ("one:" / "Standard's parser ... a space,"); a reflow would read better.
Approved at head 649f1f5. - Tests: ok. `bridges.test.trb` moved to the method spelling on the existing vectors (the empty-list case gets a typed `none`); no logic changed. CI green on this exact head (bootstrap linux-x64, tier A, gates, pdisc). - Correctness: ok. Bodies are unchanged apart from `text`/`pairs` becoming `self`; `public use String.formDecoded, List.formEncoded` and `String.percentDecoded` follow the `String.base64Decoded` / `List.hexEncoded` pattern already used in std. A repo-wide grep finds no remaining caller of the removed free functions (the `percentDecoded` in `std/yaml/src/scanner.trb` is that module's own private helper). - Scope: ok. Matches #179 / #146 (methods, no wrappers, no `deprecated`); `route`, `percentDecodedBytes` and the other helpers stay free; no seed or compiler change. - Security/data/workflows/architecture: ok. No new dependency, boundary or workflow change; the public API shape change is the task itself. - Docs: ok. design/URI.md, standard-library/uri.md and the skill reference are updated consistently; pdisc is green. Non-blocking: - `docs/standard-library/uri.md` and the skill copy (around the `segments()` paragraph and the "Forms and escapes" paragraph) now have short, ragged line breaks ("one:" / "Standard's parser ... a space,"); a reflow would read better.
argus merged commit 649f1f5a4d into main 2026-10-08 10:41:29 +00:00
argus deleted branch loop/179-uri-methods 2026-10-08 10:41:29 +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!187
No description provided.