Skip to content

Binding npm-dependency surface: keep requires { } in .bynk, or move deps to the .ts binding's own manifest? (packaging track) #606

Description

@accuser

Deferred from the keyword-hygiene batch (#548, §3.3). The review recommended renaming the binding-level requires { … } (the adapter npm-dependency map, ADR 0013) to disambiguate it from the function-precondition requires. That rename was not done in the batch, for two reasons:

  1. It collides with the packaging track. design/tracks/packaging.md §2 (Non-goals) explicitly keeps binding requires as-is and reuses packages / [package] vocabulary at the manifest level — so renaming binding requirespackages now would pre-empt the track's chosen terms.
  2. The real question is deeper than a rename. Should the npm dependency + pinned range even live in .bynk source, or move to the .ts binding's own package.json manifest?

The question

Today (ADR 0013):

adapter tokens {
  binding "./tokens.binding.ts" requires { "jose": "^5" }
  …
}

The pinned range lives in .bynk because (a) a TS import "jose" carries no version range, and (b) the Bynk compiler owns package.json generation and the supply-chain trust surface (still-Open ADR 0020).

The alternative — give each binding its own real package.json and have the compiler read that instead of a requires clause — is a redesign of the binding-as-package model, which is squarely the packaging track's remit (it owns the dependency surface and closes ADR 0020).

Disposition

To be resolved by the packaging track when it reaches the dependency surface. Forks to weigh:

  • A — keep requires { } in .bynk (status quo, ADR 0013). Possibly rename the keyword to avoid the function-requires pun if the track's packages/[package] vocabulary leaves room.
  • B — move deps to the .ts binding's own manifest and have the compiler read it. Closes the pun by removing the surface; changes the binding model.

Provenance: #548 (Bynk Language Design Review 2026-07-05, §8 Language P1 #9). Relates: ADR 0013, ADR 0020, design/tracks/packaging.md.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions