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

Future plans? #2

Closed
tailhook opened this issue Sep 15, 2017 · 4 comments
Closed

Future plans? #2

tailhook opened this issue Sep 15, 2017 · 4 comments

Comments

@tailhook
Copy link

Hi,

I'm looking if I can use the library for my own purposes. So my questions are:

  1. Any plans to publish on crates.io?
  2. I like combine crate more than pest, because former doesn't parse grammar in runtime and also returns ready to use AST after parsing (i.e. you put AST nodes to convert to as part of the rules). Have you seen it? Is there any reasons you use pest? (not that it's requirements, just asking)
  3. I need to keep track of positions of ast nodes. Any plans on that? Is it even possible with pest?

The (3) may need more explanation. Firstly, it's important for error reporting. Second thing is that my use case is rewriting queries and map error positions back to original ones. So at least I need not just position where query or field is but also a position of a closing brace } (i.e. start and end of every node). And may be up to the whole CST, I'm not sure yet.

Overall I like this crate more than other ones, so looking forward to some cooperation.

P.S.: by the way, there is no license.

@Keats
Copy link
Owner

Keats commented Sep 16, 2017

Hey there

1/ Eventually, when it's ready
2/ Haven't used combine no, I like pest mostly because it makes the grammar very easy to read (imo): https://github.com/Keats/tera/blob/v0.11/src/parser/tera.pest
3/ It's possible to do so with pest, in 1.0 the pairs given by pest are actually just spans so this shouldn't pose any issues.

There are 2 main issues:

  1. I don't really have time to work on it;
  2. The patent situation: https://medium.com/@dwalsh.sdlr/using-graphql-why-facebook-now-owns-you-3182751028c9

Until Facebook makes it less risky to use GraphQL, I don't think I really want to dedicate time to it though.

The license should be MIT.

@tailhook
Copy link
Author

Fair enough. Hopefully, patent situation will fix soon


2/ Haven't used combine no, I like pest mostly because it makes the grammar very easy to read (imo): https://github.com/Keats/tera/blob/v0.11/src/parser/tera.pest

Yes, grammar is a bit more concise when using pest, but there is also a conversion stage, as far as I can see. While when using combine you get AST straight from parser. This is just FYI, I'm not insisting on it.

@Keats
Copy link
Owner

Keats commented Sep 20, 2017

For the patent situation there is an issue: graphql/graphql-spec#351 but no answers so far

@Keats
Copy link
Owner

Keats commented Sep 26, 2017

The license has been changed to MIT!
I still don't have enough time to work on it right now though :(

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

No branches or pull requests

2 participants