Skip to content

Validate root package names and generated init names #21

Closed

Description

@LunaStev

Problem

Dependency names are validated as Wave identifiers, but the root manifest name is not. vex init copies the directory name directly, so running it in a directory such as my-package creates a library manifest that succeeds locally but cannot be named as a dependency because dependency parsing rejects the hyphen.

This allows Vex to generate packages that cannot participate in the package graph.

Expected behavior

Every package name should follow the Wave package identifier contract: [A-Za-z_][A-Za-z0-9_]*.

Acceptance criteria

  • Validate the root package name when loading every vex.ws.
  • Make vex init derive a valid name or fail with an actionable suggestion before writing files.
  • Apply the same validation to binary and library packages.
  • Include the invalid name and accepted syntax in diagnostics.
  • Add tests for hyphens, spaces, leading digits, empty names, and valid underscores.
  • Ensure init does not leave a partial project when validation fails.

Activity

  1. added
    bug
    ui/ux
    wave compatibility
    on Sep 18, 2026
  2. LunaStev commented on Oct 2, 2026

    @LunaStev
    MemberAuthor

    Verified completed against master 67797f6415f640e8c33f9a072879124b83934f84.

    Root manifests and init share identifier validation; invalid names fail before creating project state. Binary/library and invalid-name regression coverage is present.

    Evidence: manifest/src/lib.rs, tests/cli_contract.rs.

    Master CI run 36963423149 passed all eight jobs, including native Windows, macOS, and Linux tests. Closing as completed.

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

    bugui/uxwave compatibility

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions