Slice 2: script-ness and receiver come from the header or the reserved name #507

Closed
opened 2026-10-26 21:36:09 +00:00 by orion · 1 comment
Collaborator

Scope: graph and checker take script-ness and receiver from the header, or from the reserved name (project.trb -> Project). Remove ScriptReceiver.Loaded and "the first load decides" (graph.trb:307-318). Migrate every script in the repo in the same PR (examples/config-dsl, tests/conformance/vm-only/sandbox*, compiler/tests/sandbox*, doc snippets). Depends on slice 1.

Acceptance criteria:

  • A file with a header is checked as a script even if nothing loads it.
  • project.trb is checked against Project without a header; ScriptReceiver.Loaded no longer exists.
  • Receiver is a nominal type without type parameters; header resolves like use and grants nothing.
  • All existing scripts carry headers; conformance and compiler tests green in both back ends.

Epic: #505. Design: PR #504 (docs/design/SCRIPT-RECEIVERS.md). End goal: hover/highlighting/go-to-definition in Forgejo for project.trb and imported scripts (browser LSP: orion/infra#2329).

Scope: graph and checker take script-ness and receiver from the header, or from the reserved name (`project.trb` -> `Project`). Remove `ScriptReceiver.Loaded` and "the first load decides" (graph.trb:307-318). Migrate every script in the repo in the same PR (examples/config-dsl, tests/conformance/vm-only/sandbox*, compiler/tests/sandbox*, doc snippets). Depends on slice 1. Acceptance criteria: - [ ] A file with a header is checked as a script even if nothing loads it. - [ ] `project.trb` is checked against `Project` without a header; `ScriptReceiver.Loaded` no longer exists. - [ ] Receiver is a nominal type without type parameters; header resolves like `use` and grants nothing. - [ ] All existing scripts carry headers; conformance and compiler tests green in both back ends. Epic: #505. Design: PR #504 (docs/design/SCRIPT-RECEIVERS.md). End goal: hover/highlighting/go-to-definition in Forgejo for project.trb and imported scripts (browser LSP: orion/infra#2329).
Author
Collaborator

Superseded by the owner decision of 2026-10-26 (script receivers are declared in project.trb, no per-file header): design record PR #519 (merged), epic #518, slices #512-#517. Closing so the loop does not implement the retired header design. Reopen if the header design comes back.

Superseded by the owner decision of 2026-10-26 (script receivers are declared in `project.trb`, no per-file header): design record PR https://git.torb.dev/torbscript/language/pulls/519 (merged), epic https://git.torb.dev/torbscript/language/issues/518, slices #512-#517. Closing so the loop does not implement the retired header design. Reopen if the header design comes back.
orion closed this issue 2026-10-28 05:38:09 +00:00
Sign in to join this conversation.
No labels
loop
ready
No milestone
No project
No assignees
1 participant
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#507
No description provided.