Skip to content

Convert executable check and graph specs to TOML - #1370

Draft
karreiro wants to merge 2 commits into
mainfrom
specs-toml
Draft

karreiro wants to merge 2 commits into
mainfrom
specs-toml

Conversation

@karreiro

@karreiro karreiro commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary: Convert the executable check and graph specs from YAML to TOML, preserving all cases and their fixture contents, expected diagnostics, fixes, and graph edges.

Overview

#1347 introduced the shared check and graph specs in YAML. This converts its 98 spec and docset files to TOML. Their fixtures pin source ranges and fixes, so preserving whitespace is part of preserving behavior.

Approach

Both Vitest runners now discover .toml files and parse them with smol-toml, including the shared check docset. Simple lists such as docset filters and graph modules use compact arrays of inline tables. Fixtures use literal multiline strings for readable quotes and backslashes, with basic multiline strings and escapes where needed to preserve trailing spaces. The check and graph READMEs explain these conventions and table scoping rules.

scripts/verify-spec-conversion.mjs compares the TOML files with the YAML at a selected Git revision. It checks that every YAML file has exactly one replacement, then compares all parsed data, including fixture whitespace. This gives reviewers a repeatable way to check the conversion beyond running the suites.

Start reviewing here:

Tophat

From this PR's branch at the repository root, install dependencies and build the workspace packages used by the tests:

pnpm install --frozen-lockfile
pnpm build:ts

Run the repository's comparison tool against the revision before this conversion:

node scripts/verify-spec-conversion.mjs 9563e897

Observed output:

Before (9563e897): 98 YAML files, 1709 cases.
After: 98 TOML files, 1709 cases.
All parsed data matches exactly, including fixture whitespace.

Run the unit suite and static checks:

pnpm exec vitest run
pnpm type-check
pnpm format:check

The full suite passed: 282 test files, 9,535 tests passed, and 5 skipped. The converted spec runners passed all 1,799 tests, matching the YAML baseline. The TypeScript build, type checks, and formatting checks also passed.

@karreiro
karreiro requested a review from clauderic October 28, 2026 19:30

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant