Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorporate OpenApi 3.1 YAML parser #1

Closed
11 tasks done
char0n opened this issue Apr 15, 2020 · 0 comments
Closed
11 tasks done

Incorporate OpenApi 3.1 YAML parser #1

char0n opened this issue Apr 15, 2020 · 0 comments
Assignees
Milestone

Comments

@char0n
Copy link
Member

char0n commented Apr 15, 2020

tree-sitter-yaml playground: https://ikatyang.github.io/tree-sitter-yaml/. There is also a GitHub repo that provides all prebuilt WASM binaries of all supported tree-sitter grammars.

Requirements:

  • integrate tree-sitter YAML grammar
  • create sensible YAML AST layer with Failsafe schema
  • use tree-sitter-yaml grammar to create YAML CST
  • write YAML CST -> YAML AST transformer
  • support for YAML Directives in YAML transformer
  • support for Errors
  • discarding all YAML documents except 1st one
  • support for comments within the YAML stream
  • support for Pairs without value
  • create YAML adapter for OpenApi 3.1.0
  • create YAML adapter for AsyncApi 2.0.0

Resources for understanding JSON vs YAML differences and YAML feature set:

Resources for creating sensible YAML AST


tree-sitter-yaml seems to have 2 issues

  1. extreme size of generated parser which results in extreme size of WASM. Compiled WASM is about 719,3 KiB (736 604 bytes)

  2. inability to be build functional WASM with tree-sitter-cli with versions higher than 0.16.5 (>=0.16.6).

These issues have been reported to YAML grammar author and other repos:

@char0n char0n self-assigned this Apr 15, 2020
@char0n char0n added this to the M2 milestone May 7, 2020
@frantuma frantuma modified the milestones: M2, M3 May 8, 2020
@frantuma frantuma modified the milestones: M3, M4 May 25, 2020
@frantuma frantuma modified the milestones: M4, M5 Jun 17, 2020
@frantuma frantuma modified the milestones: M5, M6 Jul 8, 2020
@frantuma frantuma modified the milestones: M6, M7 Aug 14, 2020
@char0n char0n changed the title Incorporate openapi3 yaml parser Incorporate OpenApi 3.1 YAML parser Sep 22, 2020
char0n added a commit that referenced this issue Sep 23, 2020
char0n added a commit that referenced this issue Sep 24, 2020
char0n added a commit that referenced this issue Sep 25, 2020
char0n added a commit that referenced this issue Sep 29, 2020
char0n added a commit that referenced this issue Sep 29, 2020
char0n added a commit that referenced this issue Sep 30, 2020
char0n added a commit that referenced this issue Sep 30, 2020
@char0n char0n closed this as completed Oct 16, 2020
char0n added a commit that referenced this issue Jun 2, 2021
These tests specifically target refracting stage.
This is bunch #1 of the tests.

Refs #434
char0n added a commit that referenced this issue Jun 2, 2021
These tests specifically target refracting stage.
This is bunch #1 of the tests.

Refs #434
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants