Skip to content

Make generated WSON strings round-trip or fail safely #117

Closed

Description

@LunaStev

Evidence

src/manifest.rs escape_wson_string and src/lockfile.rs escape currently handle backslashes and quotes only. Project metadata comes from the environment, while dependency paths and URLs may contain characters that require additional WSON escaping. Rendering an unsupported control character can produce a file that Vex cannot read back.

Acceptance criteria

  • Define the accepted character set and escaping for generated vex.ws and vex.lock strings using the actual wson_rs grammar.
  • Round-trip supported tabs, newlines, carriage returns, quotes, backslashes, and Unicode, or reject unsupported values before writing with an actionable error.
  • Never partially publish a malformed generated manifest or lockfile.
  • Add unit tests plus a process-level fixture for at least one unusual but valid filesystem path.
  • Coordinate with Remove sentinel-based URL rewriting from WSON parsing #32, which handles the separate URL-sentinel parser problem.

Activity

  1. added
    bug
    dependencies
    stability
    on Sep 22, 2026
  2. LunaStev commented on Oct 2, 2026

    @LunaStev
    MemberAuthor

    Verified completed against master 67797f6415f640e8c33f9a072879124b83934f84.

    Versioned WSON preserves old escape meaning while format 2 supports new escapes and new lockfiles use v3. Tests cover control characters, Unicode, quotes, backslashes, unusual filesystem paths, and exact preservation under --locked.

    Evidence: wson/src/lib.rs, tests/wson_compatibility.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

    bugdependenciesstability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions