trishume/syntect

sublimehq packages: Missing mandatory key in YAML file: match

kornelski opened this issue · 1 comments

I'm trying to parse sublime syntaxes: https://github.com/sublimehq/Packages/tree/v4145

but since sublimehq/Packages@40ec1f2 they don't seem to be compatible with syntect, mostly failing with error "Missing mandatory key in YAML file: match".

I'm using syntect 5.0.0 and tried both add_from_folder() and individually with SyntaxDefinition::load_from_str(&s, true, p.file_stem().and_then(|x| x.to_str())).

  • ASP/HTML (ASP).sublime-syntax: Missing mandatory key in YAML file: match
  • Batch File/Batch File (Compound).sublime-syntax: Missing mandatory key in YAML file: contexts
  • Erlang/HTML (Erlang).sublime-syntax: Missing mandatory key in YAML file: match
  • Git Formats/Git Commit.sublime-syntax: Missing mandatory key in YAML file: match
  • HTML/HTML.sublime-syntax: Error while compiling regex '(?=[])': Oniguruma error: empty char-class
  • Haskell/Embeddings/HTML (for HSX).sublime-syntax: Missing mandatory key in YAML file: match
  • Haskell/Literate Haskell.sublime-syntax: Missing mandatory key in YAML file: match
  • Java/CSS (for JSP).sublime-syntax: Missing mandatory key in YAML file: match
  • Java/HTML (JSP).sublime-syntax: Missing mandatory key in YAML file: match
  • Java/Java (for HTML).sublime-syntax: Missing mandatory key in YAML file: match
  • Java/Java (for JSP).sublime-syntax: Context 'main' is missing
  • Java/JavaDoc.sublime-syntax: Missing mandatory key in YAML file: match
  • Java/JavaScript (for JSP).sublime-syntax: Missing mandatory key in YAML file: match
  • JavaScript/JSX.sublime-syntax: Missing mandatory key in YAML file: match
  • JavaScript/TSX.sublime-syntax: Missing mandatory key in YAML file: match
  • JavaScript/TypeScript.sublime-syntax: Missing mandatory key in YAML file: match
  • Makefile/Makefile Shell.sublime-syntax: Missing mandatory key in YAML file: match
  • Markdown/Shell (for Markdown).sublime-syntax: Missing mandatory key in YAML file: match
  • PHP/CSS (PHP).sublime-syntax: Missing mandatory key in YAML file: match
  • PHP/Embeddings/CSS (for PHP Interpolated).sublime-syntax: Missing mandatory key in YAML file: match
  • PHP/Embeddings/CSS (for PHP double-quoted).sublime-syntax: Missing mandatory key in YAML file: match
  • PHP/Embeddings/CSS (for PHP single-quoted).sublime-syntax: Missing mandatory key in YAML file: match
  • PHP/Embeddings/Diff (for PHP Interpolated).sublime-syntax: Missing mandatory key in YAML file: match
  • PHP/Embeddings/HTML (for PHP Interpolated).sublime-syntax: Missing mandatory key in YAML file: match
  • PHP/Embeddings/JSON (for PHP Interpolated).sublime-syntax: Missing mandatory key in YAML file: match
  • PHP/Embeddings/JavaScript (for PHP Interpolated).sublime-syntax: Missing mandatory key in YAML file: match
  • PHP/Embeddings/JavaScript (for PHP double-quoted).sublime-syntax: Missing mandatory key in YAML file: match
  • PHP/Embeddings/JavaScript (for PHP single-quoted).sublime-syntax: Missing mandatory key in YAML file: match
  • PHP/Embeddings/PHP Source (for PHP).sublime-syntax: Missing mandatory key in YAML file: match
  • PHP/Embeddings/SQL (for PHP Interpolated).sublime-syntax: Missing mandatory key in YAML file: match
  • PHP/Embeddings/SQL (for PHP).sublime-syntax: Missing mandatory key in YAML file: match
  • PHP/Embeddings/XML (for PHP Interpolated).sublime-syntax: Missing mandatory key in YAML file: match
  • PHP/Embeddings/YAML (for PHP Interpolated).sublime-syntax: Missing mandatory key in YAML file: match
  • PHP/JavaScript (PHP).sublime-syntax: Missing mandatory key in YAML file: match
  • PHP/PHP.sublime-syntax: Missing mandatory key in YAML file: match
  • Perl/RegExp (Perl angles).sublime-syntax: Missing mandatory key in YAML file: contexts
  • Perl/RegExp (Perl braces).sublime-syntax: Missing mandatory key in YAML file: contexts
  • Perl/RegExp (Perl brackets).sublime-syntax: Missing mandatory key in YAML file: match
  • Perl/RegExp (Perl parens).sublime-syntax: Missing mandatory key in YAML file: contexts
  • Perl/RegExp (Perl).sublime-syntax: Missing mandatory key in YAML file: match
  • Python/RegExp (Python).sublime-syntax: Missing mandatory key in YAML file: match
  • Rails/CSS (Rails).sublime-syntax: Missing mandatory key in YAML file: match
  • Rails/CSS (for HAML).sublime-syntax: Missing mandatory key in YAML file: match
  • Rails/HTML (Rails).sublime-syntax: Missing mandatory key in YAML file: match
  • Rails/HTML (for HAML).sublime-syntax: Missing mandatory key in YAML file: match
  • Rails/JavaScript (Rails).sublime-syntax: Missing mandatory key in YAML file: match
  • Rails/JavaScript (for HAML).sublime-syntax: Missing mandatory key in YAML file: match
  • Rails/Markdown (for HAML).sublime-syntax: Missing mandatory key in YAML file: match
  • Rails/Ruby (for HAML).sublime-syntax: Missing mandatory key in YAML file: match
  • Rails/SQL (Rails).sublime-syntax: Missing mandatory key in YAML file: match
  • Regular Expressions/RegExp.sublime-syntax: Missing mandatory key in YAML file: match
  • Ruby/Embeddings/CSS (for Ruby).sublime-syntax: Missing mandatory key in YAML file: match
  • Ruby/Embeddings/HTML (for Ruby).sublime-syntax: Missing mandatory key in YAML file: match
  • Ruby/Embeddings/JavaScript (for Ruby).sublime-syntax: Missing mandatory key in YAML file: match
  • Ruby/Embeddings/SQL (for Ruby).sublime-syntax: Missing mandatory key in YAML file: match
  • Ruby/Embeddings/ShellScript (for Ruby).sublime-syntax: Missing mandatory key in YAML file: match
  • XML/XSL.sublime-syntax: Missing mandatory key in YAML file: contexts

You are running into #323 and #271. Until these are implemented, syntect cannot be used with syntax definitions which use these features.
In the interim, we plan to have syntect show a more accurate error message. (See #460 (comment))