Skip to content

proposals: own schemas through relative paths, provenance, dependency groups, import formatting (draft) - #178

Merged
Kinflou merged 1 commit into
mainfrom
proposals/use-paths-and-groups
Nov 14, 2026
Merged

Kinflou merged 1 commit into
mainfrom
proposals/use-paths-and-groups

Conversation

@Kinflou

@Kinflou Kinflou commented Nov 14, 2026

Copy link
Copy Markdown
Member

A draft proposal, for review: how a use path says where a schema comes from, and how a package's dependencies are organised. Four pages under proposals/use-paths-and-groups/, linked from the proposals index and the nav like the other drafts.

  • Own schemas only through relative paths. package::…, parent::…, self::…; an absolute first segment is always std or a dependency. Introduced by an edition: a warning with a language-server quick fix now, an error in the next edition. parent stays, no super. Reserved dependency names: std, package, parent, self.
  • Provenance, not names. Each compiled schema records its package (itself, a named dependency, or std) in the frozen IR, the generation request and the facts. An IR format change under core#268.
  • Dependency groups. An optional group on a dependency entry; the table stays flat; presentation only, excluded from every hash, pin and diff. deps add / deps pin take --group.
  • Import formatting. std, the package's own, then dependencies by group (first-declared), alphabetical within a tier; a [format] table.

Open questions (in the index page): the IR format for provenance (with format 4 or right after), where [format] lives (recommendation: comline.toml), a per-user override, whether groups can order std, the edition number for the error, and one raised while drafting: what the shadowing guard becomes once provenance exists (two schemas can still land on one compiled namespace).

Related: core#277, core#268. No issues created.

…groups, import formatting (draft)

Four pages under proposals/use-paths-and-groups: own schemas reached only
through package::, parent:: and self:: (by edition), provenance recorded per
compiled schema instead of inferred from namespaces (an IR format change),
an optional group field on dependency entries that is presentation only, and
a default import order configurable in a [format] table. Related to
core#277 and core#268.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant