cynic icon indicating copy to clipboard operation
cynic copied to clipboard

cynic-parser tracking issue

Open obmarg opened this issue 2 years ago • 0 comments

Things left to do:

For v0.1.0:

  • [x] Parse scalar definitions
  • [x] Parse directive definitions
  • [x] Parse extensions
  • [x] Tests
    • [x] Import them
    • [x] Double import tests on actual schemas https://github.com/obmarg/cynic/pull/829
    • [x] Extension tests
    • [x] Fix the kitchen sink tests
    • [x] Make sure there's nothing missing
  • [x] Optimise ID types
    • [x] Make them use non-zero integers https://github.com/obmarg/cynic/pull/826
    • [x] Probably use something smaller than usize - do not need that many indices
  • [x] Make the API make sense
    • [x] Parsing functions should return errors not panic https://github.com/obmarg/cynic/pull/831
    • [x] Add optional error reports w/ ariadne https://github.com/obmarg/cynic/pull/833
  • [x] Stop using lalrpop in build.rs https://github.com/obmarg/cynic/pull/823
  • [x] Disable pretty by default https://github.com/obmarg/cynic/pull/832
  • [x] Integrate with cynic-codegen https://github.com/obmarg/cynic/pull/824
  • [x] Finish the printing code
  • [x] Look into & benchmark the range idea I had https://github.com/obmarg/cynic/pull/827
  • [x] Re-org
    • [x] At the least the reader.rs can be split up
    • [x] Writer can probably also get its own file
  • [x] Write a readme etc.
  • [x] Setup release process
  • [ ] Strings should live behind a reader as well I think, maybe? I'm flip flopping on this somewhat

Later:

  • [ ] Benchmark
    • [x] Write benchmarks against graphql-parser, async-graphql-parser, apollo-parser
    • [ ] Ideally figure out how to benchmark against go, js & other language parsers
    • [ ] Publish benchmarks somehow
  • [x] Escape strings in output code https://github.com/obmarg/cynic/pull/914
  • [ ] Validate the schema roots
  • [x] Generate Debug impls for the reader types
  • [ ] Fix the formatting in printing code
    • [x] #916
    • [ ] Spaces between fields w/ docstrings https://github.com/obmarg/cynic/pull/954
    • [ ] Spaces between arguments w/ docstrings https://github.com/obmarg/cynic/pull/954
    • [ ] Fix union formatting
    • [ ] Get parity w/ prettier on the github schema https://github.com/obmarg/cynic/pull/955
  • [x] Parse executable documents
  • [ ] Value vs ConstValue (particularly for directives)
  • [ ] Update cynic-introspection printing code to use the parser?
  • [ ] Iterate on error reports (and test more)
  • [ ] Make sure documentation is complete
    • [ ] finish a readme
    • [ ] at the very least write some lib.rs docs that give an overview of the layout of the crate
  • [ ] Special case empty schemas (can have a special error for this instead of whatever the parser says by default)
  • [ ] put spans on relevant bits of the AST
  • [ ] Clean up the rest of the TODOs in the code
  • [x] Handle escape characters, and string literals generally (iirc I keep the quotes, probably not the best idea) https://github.com/obmarg/cynic/pull/868
  • [x] Pick a structure for the type_system/executable modules and make sure they both use it.
  • [x] Fix the ignored executable parser tests https://github.com/obmarg/cynic/pull/947
  • [ ] Use IdRange for Value?
  • [ ] Figure out how to avoid making every keyword a token of its own (might be possible with latest lalrpop code)
  • [ ] Maybe try an inlined small string optimisation

obmarg avatar Jan 07 '24 19:01 obmarg