Skip to content

Own schemas, provenance and dependency groups #281

Open

Description

@Kinflou

Epic. A use path says where a schema comes from, every compiled schema records where it came from, and a package's dependencies can be grouped and imported in a consistent order. Accepted proposal: ComlineProject/docs#178 and docs#181 (Own schemas, provenance and dependency groups).

Decided

  • Own schemas use relative paths only. A package reaches its own schemas only as package::…, parent::… or self::…, so an absolute first segment always means std or a dependency.
    • A bare path to an own schema is an error at once, with a quick fix and comline fix rewriting it to package::…. There is no edition and no deprecation period, since Comline is before 1.0.
    • The word stays parent, with no super synonym.
    • std, package, parent and self stay reserved as dependency names.
  • Provenance, not names. Each compiled schema records the package it came from (the package itself, a named dependency, or std) in the frozen IR, the generation request and the facts. The tools stop inferring "dependency" from a namespace's spelling, and requests and facts use one canonical namespace form.
    • This is an IR format bump under core#268. It rides with format 4 or comes after it as format 5, whichever is ready.
  • The shadowing guard stays as it is (Fail closed on imports a build can't check (#248, #249, #250) #256).
  • Dependency groups. An optional group = "<name>" field on each dependency entry in config.idp.
    • The table stays flat, names stay unique, and a group never appears in a use path.
    • A group is presentation only: it is excluded from the frozen config's hash, from dependency pins, and from compat and config diffs.
  • Import order: std, then the package's own, then dependencies. Within the dependencies, groups come in first-declared order, then ungrouped dependencies, alphabetical within each tier.
    • A group orders dependencies only, never std.
    • It's configurable in a [format] table in comline.toml (imports.order), with no per-user override.
    • Core hosts the ordering function, so the language server and any comline fmt agree.

Work

Related: #277 (reach recorded in the facts), #268 (IR migrations), #222 (format 4), #245, generation#146, generation#148.

Activity

  1. Kinflou commented on Nov 15, 2026

    @Kinflou
    MemberAuthor

    Added 2026-11-15: qualified references follow the Rust model (docs#189, merged c8288e8).

    Related: #289 (compat and the sizer resolving names by suffix and first match).

  2. moved this from Todo to Design in Comline Development Roadmapon Nov 15, 2026
  3. Kinflou commented on Nov 15, 2026

    @Kinflou
    MemberAuthor

    Audit 2026-11-16: ticked #282, which is closed by core#285 (14ce546, 2026-11-14: own schemas only through package::, parent:: or self::). specification#11 is partly done (specification#12 merged some of the cases) and stays unticked. The rest of the list is open as written.

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

    P2SooncompilerParser, IR, CASdesignNeeds a design decision

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions