Skip to content

Establish workspace crate boundaries - #143

Merged
LunaStev merged 1 commit into
wavefnd:masterfrom
LunaStev:feat/strict-manifest-validation
Sep 23, 2026
Merged

LunaStev merged 1 commit into
wavefnd:masterfrom
LunaStev:feat/strict-manifest-validation

Conversation

@LunaStev

Copy link
Copy Markdown
Member

Summary

  • Convert Vex into a Cargo workspace with top-level manifest, lockfile, resolver, compiler, and toolchain crates.
  • Keep the root src/ tree focused on CLI dispatch, command handling, and terminal output.
  • Split parsing, rendering, graph, Git, path, compiler-plan, invocation, and platform installation concerns into focused modules.
  • Harden manifest validation for unknown fields, blank dependency sources/selectors, duplicate dependency names, and root package-name reuse.
  • Make CI, contributor checks, and x.py validate every workspace package.

Why

The previous single binary crate mixed CLI concerns with package management, lockfile, resolver, compiler, and toolchain implementation. Establishing explicit crate boundaries gives those systems independent APIs and tests while preserving Vex as the only user-facing binary.

The stricter manifest checks also prevent malformed declarations from reaching filesystem or Git operations and make dependency-name identity unambiguous throughout a transitive graph.

Behavior

  • The public Vex command surface and vex.lock v2 format are unchanged.
  • Crate names are the domain names themselves; no redundant vex-* prefix is used.
  • Resolver progress is reported through the CLI, so library crates do not depend on terminal UI behavior.
  • Unknown manifest fields now fail with a nearby-field suggestion when possible.
  • Empty or whitespace-only path, git, branch, tag, and rev values fail before project mutation.
  • Git selectors on path dependencies, duplicate dependency names, and direct or transitive root-name reuse are rejected.
  • --locked, --offline, targeted updates, and raw wavec flag rejection retain their existing behavior.

Closes #31
Closes #116
Closes #128
Closes #129

Validation

  • python3 x.py check
  • cargo test --locked
  • cargo build --locked
  • cargo check --workspace --locked --target x86_64-pc-windows-gnu
  • cargo check --workspace --locked --target aarch64-unknown-linux-gnu
  • cargo check --workspace --locked --target riscv64gc-unknown-linux-gnu
  • PATH wavec smoke: vex init, vex run, vex fetch --locked --offline, and vex build --locked --offline
  • Confirmed vex build --emit=obj remains rejected as a raw compiler option

Move manifest, lockfile, resolver, compiler, and toolchain behavior into focused top-level crates while keeping src dedicated to the CLI. Preserve dependency and compiler behavior through workspace-wide tests, and harden manifest validation for unknown fields, empty sources, duplicate dependencies, and root-name conflicts.

Signed-off-by: LunaStev <[email protected]>
@LunaStev
LunaStev marked this pull request as ready for review September 23, 2026 05:57
@LunaStev
LunaStev merged commit 71f29da into wavefnd:master Sep 23, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant