Skip to content

Make Fortran, Verilog, and F# parsers opt-in - #49

Merged
thesiti92 merged 2 commits into
mainfrom
slim-default-parsers
Sep 29, 2026
Merged

thesiti92 merged 2 commits into
mainfrom
slim-default-parsers

Conversation

@thesiti92

@thesiti92 thesiti92 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Default CLI builds now omit the Fortran, Verilog, and F# parsers to reduce executable size. Files in those languages continue to produce plain-text diffs with the existing unsupported_language fallback. Structural support can be restored with lang-fortran, lang-verilog, lang-fsharp, or all-languages.

Adds a CLI regression test covering language listing and real sample diffs with optional parsers enabled and disabled.

Validation:

  • cargo +stable test --locked -p diffr-cli: 275 passed, 1 existing ignored test.
  • cargo +stable test --locked -p diffr-cli --features all-languages: 275 passed, 1 existing ignored test.
  • cargo +stable fmt --all -- --check and git diff --check passed.
  • macOS ARM64 release builds from the same commit: default 108,894,592 bytes (108.89 MB), all-languages 145,395,744 bytes (145.40 MB). Reduction: 36,501,152 bytes (36.50 MB, 25.10%).
  • Both release binaries passed sample diffs for the three optional languages and JavaScript; native parser symbols are absent in the default binary and present with all-languages.

AI assistance: OpenAI Codex.

Exclude the three grammars from default builds and preserve text diffs when they are disabled. Add individual language features, an all-languages feature, and CLI regression coverage.

AI assistance: OpenAI Codex.
@thesiti92
thesiti92 merged commit cfb05ed into main Sep 29, 2026
38 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

Development

Successfully merging this pull request may close these issues.

1 participant