Skip to content

[Ecosystem] Port external VS Code extensions (my-lang, rsr-certifier) to .affine once #35 lands #64

Description

@hyperpolymath

Problem

Two VS Code extensions in sibling repos are TypeScript-only because AffineScript has no Node-target backend yet:

  • hyperpolymath/my-lang:vscode-extension/src/extension.ts
  • hyperpolymath/standards:rhodium-standard-repositories/satellites/rsr-certifier/extensions/vscode/src/extension.ts

Both are tracked as approved exemptions in their respective repos' policy docs. Unblock condition is #35.

This issue exists in affinescript (not the sibling repos) because the unblock is here — once #35 lands, the porting work is mechanical and can be done in each sibling repo independently.

Acceptance criteria

Origin

TS-elimination audit, 2026-05-02 (recommendation #8). Per-repo exemption tables document the carve-out today.

Dependencies

Activity

  1. hyperpolymath commented on May 11, 2026

    @hyperpolymath
    OwnerAuthor

    Port work landed across three PRs. The chain has one upstream dependency: affinescript#102 must merge before standards#46 can compile against the bindings it consumes.

    PR chain

    Acceptance criteria coverage

    Bullet Status
    #35 has landed ✅
    Open port-PR against my-lang ✅ my-lang#11
    Open port-PR against standards ✅ standards#46
    Each port verifies activation, command registration, LSP wiring, clean disposal ✅ — see test plans in each PR
    Each sibling repo updates its TS-exemption table to drop the ported entry ⚠️ partial — see note below

    TS-exemption table note

    • my-lang repo: the exemption row for vscode-extension/src/extension.ts lives on branch feat/stdlib-fs-env-format, not on main. On main there is no TS-exemption table to update. When that feature branch lands, the row for the now-ported file should be dropped at the same time.
    • standards repo: the extension.ts was never a per-repo exemption row — it was covered by the universal-allowlist *vscode* directory-segment pattern in .github/workflows/rsr-antipattern.yml. Removing the .ts file therefore needs no CLAUDE.md edit.

    Follow-ups discovered during the port

    1. Async-extern ABI. A real follow-up issue is worth filing in affinescript to track binding vscode.window.withProgress(opts, async task) and LanguageClient.sendRequest(method, params). Once those exist, rsr-certifier can restore: in-process compliance results, live status-bar mutation, diagnostic-collection population, per-check report HTML, and the active save-document filter in onDidSaveTextDocument.

    2. Publish @hyperpolymath/affine-vscode to npm. The adapter is currently vendored verbatim into each external extension (src/affine-vscode-adapter.cjs). Publishing it would eliminate drift risk and let extensions npm install it directly.

    3. extraImports codegen hookup. Today the wrapper has to be hand-written (src/index.cjs in each extension). Phase 3's original ambition was to have affinescript compile --target node-cjs emit the extraImports wiring directly; doing that would let extensions ship a single compiled artefact with no hand-written shim.

  2. hyperpolymath commented on May 11, 2026

    @hyperpolymath
    OwnerAuthor

    All three PRs merged:

    Acceptance criteria satisfied. Follow-ups (async-extern ABI, publish @hyperpolymath/affine-vscode to npm, automate extraImports wiring in codegen) tracked in the issue comment thread for future scheduling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions