8000 Package model: versioned dependency resolution beyond stdlib @use · Issue #146 · Mnehmos/mnehmos.nls.lang · GitHub
[go: up one dir, main page]

Skip to content

Package model: versioned dependency resolution beyond stdlib @use #146

Open

Description

@Mnehmos

Problem

@use currently resolves only stdlib modules. There is no mechanism for user-defined or third-party packages with versioning, no lockfile integration for external deps, and no path toward an ecosystem.

Acceptance Criteria

  • Defined package manifest format (e.g. nls.toml or nlspackage.nl)
  • @use package_name@version syntax works for local and registered packages
  • Lockfile captures external dependency hashes
  • nlsc install or equivalent resolves and pins dependencies
  • Does not require the full package registry (that's v1.0 feat: ANLU package registry #27)

Why This Blocks v0.5

Ecosystem depth requires a package model. Without it, users are permanently limited to stdlib.

Activity

  1. added this to the v0.5 milestone on Mar 17, 2026
  2. added a commit that references this issue on Sep 12, 2026
  3. Mnehmos commented on Sep 12, 2026

    @Mnehmos
    OwnerAuthor

    Slice 1 landed (PR #246). Against this issue's acceptance criteria:

    • Defined package manifest format — nls.pkg.json (nls.pkg/1): project name/version and dependencies mapping dotted package names to a local path plus a semver constraint (*, exact, ^, ~).
    • @use package_name@version syntax works for local packages — @use <package>.<domain> resolves inside the dependency root (longest dot-boundary prefix; v{major}/<domain>.nl layout) before stdlib roots. Version pinning is by manifest constraint: each dependency's own manifest version is checked (EPKG003); the inline @version spelling from the issue text is not implemented — the constraint lives in the manifest, and @use keeps the Standard Library Structure (@use Directives) #90 grammar.
    • Lockfile captures external dependency hashes — nls.pkg.lock records each dependency's resolved version, manifest-relative path, and a content hash; nlsc install --check reports drift (EPKG004).
    • nlsc install or equivalent resolves and pins dependencies — implemented, with project-root discovery from subdirectories.
    • Does not require the full package registry — registry work remains in feat: ANLU package registry #27; only local path sources are supported.

    Remaining in this issue's scope for the next slice: symbol linking (imported ANLUs resolve and lock but are not yet merged into the caller's symbol table, so cross-package calls are not possible), and version-pinned @use spelling if the manifest constraint proves insufficient in practice. Keeping the issue open for the linking slice; the limitation is documented in docs/packages.md.

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

    ecosystemPackage and distribution systempriority-mediumShould be addressedspecificationLanguage specification documents

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0