Epic: scripts name their receiver in a header; LSP types scripts alone #505

Closed
opened 2026-10-26 21:35:54 +00:00 by orion · 3 comments
Collaborator

End goal: hover, highlighting and go-to-definition in Forgejo's code view for project.trb and imported scripts. Browser LSP part: https://git.dmb.zone/orion/infra/issues/2329 (client half of torbscript/wantFiles/torbscript/files is phase 2 there).

Design: docs/design/SCRIPT-RECEIVERS.md in the PR (docs/adr-receiver-types). Decision: first statement receiver ServerConfig from "./src/server-config"; project.trb reserved by name; load-site inference and "first load decides" removed.

Slices in order: see the child issues (comment below once created).

End goal: hover, highlighting and go-to-definition in Forgejo's code view for `project.trb` and imported scripts. Browser LSP part: https://git.dmb.zone/orion/infra/issues/2329 (client half of `torbscript/wantFiles`/`torbscript/files` is phase 2 there). Design: `docs/design/SCRIPT-RECEIVERS.md` in the PR (docs/adr-receiver-types). Decision: first statement `receiver ServerConfig from "./src/server-config"`; `project.trb` reserved by name; load-site inference and "first load decides" removed. Slices in order: see the child issues (comment below once created).
Author
Collaborator

Slices in order (each depends on the previous unless noted); design PR: #504.

  • #506 slice 1: parser, formatter, highlighters
  • #507 slice 2: graph + checker, migration
  • #508 slice 3: diagnostics
  • #509 slice 4: LSP features on scripts
  • #510 slice 5: forward-only reads + wantFiles/files contract
  • #511 slice 6: docs

Browser LSP client: https://git.dmb.zone/orion/infra/issues/2329

Slices in order (each depends on the previous unless noted); design PR: #504. - [ ] #506 slice 1: parser, formatter, highlighters - [ ] #507 slice 2: graph + checker, migration - [ ] #508 slice 3: diagnostics - [ ] #509 slice 4: LSP features on scripts - [ ] #510 slice 5: forward-only reads + wantFiles/files contract - [ ] #511 slice 6: docs Browser LSP client: https://git.dmb.zone/orion/infra/issues/2329
Author
Collaborator

Question q1 for torben (decision, blocking): Soll jedes Skript seinen Empfänger-Typ selbst in der ersten Zeile nennen?

v: 1
id: q1
to: torben
kind: decision
blocking: true
question: >-
  Soll jedes Skript seinen Typ selbst in Zeile 1 nennen (receiver ServerConfig from "./src/server-config")? Dann ist es allein typisierbar, auch im Browser. Sonst nur per Dateiname wie project.trb, was pro Projekt eine Zuordnung bräuchte.
options:
  - id: header
    label: Ja, Typ in der ersten Zeile des Skripts
    detail: Jede Datei ist allein typisierbar (Browser, Editor); Konflikte werden Fehler an der Ladestelle.
  - id: filename
    label: Nur über Dateinamen
    detail: Braucht pro Projekt eine Zuordnungs-Konfiguration und kann keine Typen nennen.
recommendation: header
asked_by: orion

Der Entwurf (PR #504) folgt der Empfehlung, bis eine Antwort kommt.

**Question q1** for torben (decision, blocking): Soll jedes Skript seinen Empfänger-Typ selbst in der ersten Zeile nennen? ```hos-question v: 1 id: q1 to: torben kind: decision blocking: true question: >- Soll jedes Skript seinen Typ selbst in Zeile 1 nennen (receiver ServerConfig from "./src/server-config")? Dann ist es allein typisierbar, auch im Browser. Sonst nur per Dateiname wie project.trb, was pro Projekt eine Zuordnung bräuchte. options: - id: header label: Ja, Typ in der ersten Zeile des Skripts detail: Jede Datei ist allein typisierbar (Browser, Editor); Konflikte werden Fehler an der Ladestelle. - id: filename label: Nur über Dateinamen detail: Braucht pro Projekt eine Zuordnungs-Konfiguration und kann keine Typen nennen. recommendation: header asked_by: orion ``` Der Entwurf (PR #504) folgt der Empfehlung, bis eine Antwort kommt.
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:08 +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#505
No description provided.