feat(pkg): package manager — fetch + MVS resolve + namespace registration (#63)
Implements the v1 direction decided in the RFC as a set of `x` subcommands
plus a small, contained compiler change.
* URL-as-identity, no registry — a dependency is named by its git import
path and a `git tag vX.Y.Z` publishes a version.
* Minimum Version Selection — a `require` is a minimum; the resolver picks
the greatest required minimum per module, then the reachable closure at
those versions. Deterministic, no SAT solver (tools/x/pkg.ludic).
* Content-addressed global store + per-project links — packages live once in
~/.ludic/store keyed by a content hash; each project links them under
ludic_modules/. package.ludic (manifest) + package.lock.ludic (lock).
* Namespace registration for source packages via a module-root import
fallback in the compiler: do_import resolves a non-local, non-absolute
import under $LUDIC_MODULES (default ludic_modules/), so a fetched
package's Ludic compiles into the consumer the way the built-in stdlib
does. Collisions and missing prebuilt targets are hard errors.
Commands: x add / x get / x update / x verify / x vendor. New hermetic suite
`x test-pkg` (stands up throwaway git repos, offline) is gated inside `x test`.
Existing programs compile byte-for-byte identically (the import fallback only
fires when the local path is absent); the C-free bootstrap fixpoint holds and
the seed is regenerated. Full suite: 87 passed, package suite: 12 passed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
237e13c95e
commit
2c44bae496
10 changed files with 17409 additions and 16387 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
|
@ -14,6 +14,13 @@
|
|||
# only thing published is the source and the LLVM-IR seed (selfhost/ludicc.seed.ll).
|
||||
/bin/
|
||||
|
||||
# package manager (issue #63): the per-project linked view into the global
|
||||
# content-addressed store, and the optional hermetic copy from `x vendor`. Both
|
||||
# are regenerated by `x get` / `x vendor` — package.ludic + package.lock.ludic
|
||||
# are the tracked source of truth, so these stay out of the tree.
|
||||
ludic_modules/
|
||||
vendor/
|
||||
|
||||
# editor toolchain build artifacts
|
||||
tools/editors/vscode/node_modules/
|
||||
tools/editors/vscode/*.vsix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue