Skip to content

refactor(syntax): consume published Syntaxmate crate - #52

Merged
phongndo merged 1 commit into
mainfrom
migration/syntaxmate-0.1
Aug 2, 2026
Merged

refactor(syntax): consume published Syntaxmate crate#52
phongndo merged 1 commit into
mainfrom
migration/syntaxmate-0.1

Conversation

@phongndo

@phongndo phongndo commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace Mark's in-tree Rust-native TextMate implementation with the published syntaxmate 0.1.0 registry crate
  • retain crates/mark-syntax as a thin product adapter for settings, language enablement, exact-scope rendering, and Mark's 63-theme catalog
  • remove duplicated grammar assets, engine/oracle code, fixtures, generated reports, and obsolete CI shards

Motivation

  • Problem: the engine, catalog, and compatibility harness were coupled to Mark's repository and release cycle.
  • Why now: Syntaxmate 0.1.0 is independently published, release-attested, and validated; Mark can now exercise the same public API as any downstream consumer.

Changes

  • resolve syntaxmate = "0.1" exclusively from crates.io with bundled-grammars; benchmark-only diagnostics remain feature-gated
  • adapt Syntaxmate tokenizer output into Mark's existing line/segment model while preserving exact shared scope tables and coarse fallback classes
  • delegate TextMate selector parsing/resolution to Syntaxmate while keeping Mark's TUI theme assets and rendering policy
  • move tokenizer oracle/fuzz/generated-grammar ownership to Syntaxmate and retain downstream rendering, queue, settings, packaging, and performance gates in Mark
  • add architecture checks that reject copied engine/assets, internal Syntaxmate modules, and path/Git/patch resolution
  • package the required Syntaxmate grammar notices with Mark distributions

Verification

  • scripts/ci/rust
  • scripts/ci/generated
  • scripts/ci/performance extended
  • cargo +1.88.0 check --workspace --all-targets --all-features --locked
  • cargo test --workspace --all-targets --all-features --locked (via scripts/ci/rust)
  • scripts/check-architecture
  • actionlint -color
  • isolated distribution archive/checksum and all Syntaxmate notice names
  • cd pi-mark && pnpm run check (unchanged; selected by CI because workflow orchestration changed)

Risk

  • Blast radius: syntax tokenization, exact-scope theme resolution, language detection, packaged notices, and syntax benchmark instrumentation.
  • Rollback: revert this commit to restore the prior in-tree engine and assets; no user configuration migration is required.

Reviewer Notes

  • Review focus: registry-only dependency/lockfile source, adapter scope-table ownership, diagnostics feature isolation, 63-theme preservation, and removal of duplicate engine assets/tooling.

Copilot AI review requested due to automatic review settings August 2, 2026 07:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@phongndo
phongndo merged commit be4ddd5 into main Aug 2, 2026
16 checks passed
@phongndo
phongndo deleted the migration/syntaxmate-0.1 branch August 2, 2026 07:25
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.

2 participants