You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Self-Hosting Phase 5] Port Package Manager and Manifest Parser to Flow #692
Progress in current checkout: added compiler/src/toml.flow with bounds-checked section/key lookup, zero-copy value spans, quoted/scalar/boolean/array classification, and malformed-section/unterminated-string detection. Added tests/lang/test_toml_native.flow; native fixture passes, Python-host selftest passes, bootstrap fixed point and bootstrap_from_c verification pass, and self_host_full passes. Full typed manifest model, semver resolution, lockfile, archive/git fetch, and CLI replacement remain open.
Native package integration progress: added flowc_toml_package_valid requiring quoted [package].name and .version, and flow init now validates the manifest before writing it. Native TOML fixture covers valid/invalid manifests; isolated native flow init demo succeeds and emits flow.toml/src/main.flow/.gitignore. Python-host selftest, bootstrap fixed point, bootstrap_from_c verification, and self_host_full pass. Dependency semver/lockfile/fetch/extraction and full pkg CLI replacement remain open.
Native package progress: added compiler/src/semver.flow with bounds-safe leading X.Y.Z parsing (v-prefix, prerelease/build stripping, missing/non-numeric components matching the Python registry behavior), comparison, and wildcard/latest, caret, >=, ==, and exact requirement matching. Added tests/lang/test_semver_native.flow; it compiles and exits 0 under the regenerated Stage-A compiler. Python-host selftest, bootstrap fixed point, bootstrap_from_c --verify, and self_host_full (three generations) all pass. Dependency graph resolution, lockfiles, fetch/extraction, and full package CLI parity remain open.
Additional native package progress: added compiler/src/lockfile.flow, a bounds-checked reader for the stable flow.lock JSON package-entry shape. It returns spans for string fields such as version/source and rejects malformed JSON strings, unclosed objects, and non-string values. Added tests/lang/test_lockfile_native.flow; Python-host and regenerated Stage-A native executions both exit 0. bootstrap_from_c --verify and self_host_full (three generations) pass. Native writing, dependency graph resolution, registry fetch/extraction, and full package command parity remain open.
Native package progress continued: compiler/src/lockfile.flow now also provides a bounded deterministic serializer for a single resolved package entry. The native test round-trips rendered version/source fields through the reader. Stage-A native execution exits 0; bootstrap_from_c --verify and self_host_full (three generations) pass after regeneration. The remaining package work is still multi-package lockfile updates, dependency graph resolution, registry/path/git installation, and CLI parity.
Native package CLI now has a real flow pkg lock bootstrap command. It validates the existing flow.toml, writes a deterministic empty flow.lock when absent, and refuses overwrite. Added tests/integration/test_native_package_lock.py; the test passes using the Stage-A binary. Fixed-point regeneration, bootstrap_from_c --verify, and self_host_full (three generations) all pass. This is groundwork only: dependency extraction/resolution, multi-package lock updates, registry/path/git installation, and full CLI parity remain.
Native package layer advanced with cursor-based TOML dependency enumeration: flowc_toml_next_entry iterates arbitrary [dependencies] key/value entries via byte cursors and returns typed value spans, without allocation. Extended tests/lang/test_toml_native.flow; Python host and Stage-A native execution pass. bootstrap_from_c --verify and self_host_full (three generations) pass. This is the parser prerequisite for dependency graph/lock integration; resolution, fetching, extraction, and full CLI parity remain.
Correctness follow-up: native flow pkg lock now enumerates [dependencies] via flowc_toml_next_entry and fails closed when any unresolved dependency is present, instead of emitting a misleading empty lockfile. Added integration coverage for this refusal; both tests pass. bootstrap_from_c --verify and self_host_full (three generations) pass. Native dependency resolution/installation remains the next implementation step.
Native dependency resolution progress: added compiler/src/registry.flow, a bounds-checked JSON index resolver that selects the highest semver-compatible non-yanked-style version entry and returns version/path spans. Added tests/lang/test_registry_native.flow; Python host and regenerated Stage-A native execution pass. bootstrap_from_c --verify and self_host_full (three generations) pass. Wiring this resolver into native pkg lock/install, plus registry fetching and package extraction, remains.
Native pkg lock is now wired to registry resolution for the common single string dependency case. The driver supplies the bundled registry index; native code reads it, resolves the highest semver-compatible entry, and writes a pinned version/source lock entry. End-to-end mathkit = "^0.1" resolves to 0.1.0; integration tests pass. bootstrap_from_c --verify and self_host_full (three generations) pass. Multi-dependency graphs, path/git specs, package installation/extraction, and remote registry fetching remain.
Native registry lock entries now preserve resolved source metadata: flowc_lock_render_single emits a resolved.path object, and the mathkit = "^0.1" integration test verifies the pinned version plus registry/packages/mathkit path. Native round-trip, bootstrap_from_c --verify, and self_host_full (three generations) pass.
Native package installation is now wired for one registry dependency: flow pkg install resolves the semver requirement via the bundled index, copies the resolved package into flow_packages/, and writes a pinned flow.lock with resolved.path. End-to-end integration confirms mathkit/src/lib.flow is installed. Three integration tests pass; bootstrap_from_c --verify and self_host_full (three generations) pass. Multi-package graphs, path/git dependencies, remote indexes, and transitive installs remain.
Registry correctness follow-up: native resolver now parses and honors each version entry's yanked boolean, skipping yanked releases before semver comparison. Native regression confirms a yanked highest version is ignored; Stage-A execution, bootstrap_from_c --verify, and self_host_full (three generations) pass.
Delivered on main (ee5048d) by #989: compiler/src/pkg.flow, pkg_json.flow (JSON and TOML reader), pkg_main.flow (CLI with the old interface and exit codes), semver.flow. It covers registry index reading (local and FLOW_REGISTRY_URL), semver selection, path, git (tag, rev, branch, subdir) and stdlib installs, a byte-identical flow.lock, and flow add|install|sync|search|info. src/flow/package.py is deleted; project_config.py goes with #1072.
Check: in a copy of examples/ecosystem/log_demo with flow.lock removed,
$ flow sync
All dependencies installed (flow.lock updated)
$ (flowc bundle build of src/main.flow) && ./a.out
[DEBUG] visible at DEBUG
[INFO] still visible
[ERROR] only errors
Open follow-up: #991 (packages with [native] C sources are not linked by flow run on flowc).
Activity
selfhost: native flow_pkg core, TOML parser, semver, project config (#…
selfhost: native flow_pkg core, TOML parser, semver, project config (#…
selfhost: native flow_pkg core, TOML parser, semver, project config (#…
selfhost: native flow_pkg core, TOML parser, semver, project config (#…
selfhost: native flow_pkg core, TOML parser, semver, project config (#…
selfhost: native flow_pkg core, TOML parser, semver, project config (#…
godofecht commentedon Sep 16, 2026
Progress in current checkout: added compiler/src/toml.flow with bounds-checked section/key lookup, zero-copy value spans, quoted/scalar/boolean/array classification, and malformed-section/unterminated-string detection. Added tests/lang/test_toml_native.flow; native fixture passes, Python-host selftest passes, bootstrap fixed point and bootstrap_from_c verification pass, and self_host_full passes. Full typed manifest model, semver resolution, lockfile, archive/git fetch, and CLI replacement remain open.
godofecht commentedon Sep 16, 2026
Native package integration progress: added flowc_toml_package_valid requiring quoted [package].name and .version, and flow init now validates the manifest before writing it. Native TOML fixture covers valid/invalid manifests; isolated native
flow init demosucceeds and emits flow.toml/src/main.flow/.gitignore. Python-host selftest, bootstrap fixed point, bootstrap_from_c verification, and self_host_full pass. Dependency semver/lockfile/fetch/extraction and full pkg CLI replacement remain open.godofecht commentedon Sep 16, 2026
Native package progress: added compiler/src/semver.flow with bounds-safe leading X.Y.Z parsing (v-prefix, prerelease/build stripping, missing/non-numeric components matching the Python registry behavior), comparison, and wildcard/latest, caret, >=, ==, and exact requirement matching. Added tests/lang/test_semver_native.flow; it compiles and exits 0 under the regenerated Stage-A compiler. Python-host selftest, bootstrap fixed point, bootstrap_from_c --verify, and self_host_full (three generations) all pass. Dependency graph resolution, lockfiles, fetch/extraction, and full package CLI parity remain open.
godofecht commentedon Sep 16, 2026
Additional native package progress: added compiler/src/lockfile.flow, a bounds-checked reader for the stable flow.lock JSON package-entry shape. It returns spans for string fields such as version/source and rejects malformed JSON strings, unclosed objects, and non-string values. Added tests/lang/test_lockfile_native.flow; Python-host and regenerated Stage-A native executions both exit 0. bootstrap_from_c --verify and self_host_full (three generations) pass. Native writing, dependency graph resolution, registry fetch/extraction, and full package command parity remain open.
godofecht commentedon Sep 16, 2026
Native package progress continued: compiler/src/lockfile.flow now also provides a bounded deterministic serializer for a single resolved package entry. The native test round-trips rendered version/source fields through the reader. Stage-A native execution exits 0; bootstrap_from_c --verify and self_host_full (three generations) pass after regeneration. The remaining package work is still multi-package lockfile updates, dependency graph resolution, registry/path/git installation, and CLI parity.
godofecht commentedon Sep 16, 2026
Native package CLI now has a real
flow pkg lockbootstrap command. It validates the existing flow.toml, writes a deterministic empty flow.lock when absent, and refuses overwrite. Added tests/integration/test_native_package_lock.py; the test passes using the Stage-A binary. Fixed-point regeneration, bootstrap_from_c --verify, and self_host_full (three generations) all pass. This is groundwork only: dependency extraction/resolution, multi-package lock updates, registry/path/git installation, and full CLI parity remain.godofecht commentedon Sep 17, 2026
Native package layer advanced with cursor-based TOML dependency enumeration: flowc_toml_next_entry iterates arbitrary [dependencies] key/value entries via byte cursors and returns typed value spans, without allocation. Extended tests/lang/test_toml_native.flow; Python host and Stage-A native execution pass. bootstrap_from_c --verify and self_host_full (three generations) pass. This is the parser prerequisite for dependency graph/lock integration; resolution, fetching, extraction, and full CLI parity remain.
godofecht commentedon Sep 17, 2026
Correctness follow-up: native
flow pkg locknow enumerates [dependencies] via flowc_toml_next_entry and fails closed when any unresolved dependency is present, instead of emitting a misleading empty lockfile. Added integration coverage for this refusal; both tests pass. bootstrap_from_c --verify and self_host_full (three generations) pass. Native dependency resolution/installation remains the next implementation step.godofecht commentedon Sep 17, 2026
Native dependency resolution progress: added compiler/src/registry.flow, a bounds-checked JSON index resolver that selects the highest semver-compatible non-yanked-style version entry and returns version/path spans. Added tests/lang/test_registry_native.flow; Python host and regenerated Stage-A native execution pass. bootstrap_from_c --verify and self_host_full (three generations) pass. Wiring this resolver into native pkg lock/install, plus registry fetching and package extraction, remains.
godofecht commentedon Sep 17, 2026
Native
pkg lockis now wired to registry resolution for the common single string dependency case. The driver supplies the bundled registry index; native code reads it, resolves the highest semver-compatible entry, and writes a pinned version/source lock entry. End-to-endmathkit = "^0.1"resolves to 0.1.0; integration tests pass. bootstrap_from_c --verify and self_host_full (three generations) pass. Multi-dependency graphs, path/git specs, package installation/extraction, and remote registry fetching remain.godofecht commentedon Sep 17, 2026
Native registry lock entries now preserve resolved source metadata: flowc_lock_render_single emits a resolved.path object, and the
mathkit = "^0.1"integration test verifies the pinned version plusregistry/packages/mathkitpath. Native round-trip, bootstrap_from_c --verify, and self_host_full (three generations) pass.godofecht commentedon Sep 17, 2026
Native package installation is now wired for one registry dependency:
flow pkg installresolves the semver requirement via the bundled index, copies the resolved package into flow_packages/, and writes a pinned flow.lock with resolved.path. End-to-end integration confirms mathkit/src/lib.flow is installed. Three integration tests pass; bootstrap_from_c --verify and self_host_full (three generations) pass. Multi-package graphs, path/git dependencies, remote indexes, and transitive installs remain.godofecht commentedon Sep 17, 2026
Registry correctness follow-up: native resolver now parses and honors each version entry's yanked boolean, skipping yanked releases before semver comparison. Native regression confirms a yanked highest version is ignored; Stage-A execution, bootstrap_from_c --verify, and self_host_full (three generations) pass.
godofecht commentedon Sep 30, 2026
Delivered on main (ee5048d) by #989:
compiler/src/pkg.flow,pkg_json.flow(JSON and TOML reader),pkg_main.flow(CLI with the old interface and exit codes),semver.flow. It covers registry index reading (local andFLOW_REGISTRY_URL), semver selection, path, git (tag, rev, branch, subdir) and stdlib installs, a byte-identicalflow.lock, andflow add|install|sync|search|info.src/flow/package.pyis deleted;project_config.pygoes with #1072.Check: in a copy of
examples/ecosystem/log_demowithflow.lockremoved,Open follow-up: #991 (packages with
[native]C sources are not linked byflow runon flowc).