Generate pest grammar through an integration test #561
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
handlebars recently became a transitive dependency of one of my work projects via async-graphql. I noticed that it pulls the pest_derive crates into my dependency graph, but this is actually not necessary. By doing the code generation in an integration test, we can move the dependencies here into dev-dependencies, moving the effort of code generation (including the dependencies required to do so) from downstream users to this repository. By running it as part of your test suite, your CI setup will ensure that the generated code and the grammar remain in sync.
I actually did something similar for async-graphql itself (async-graphql/async-graphql#901) and a few other projects. Let me know what you think!
(Submitting this against the 4.x branch since it's semver-compatible anyway and so would be nice to get as a minor version bump. If you think this should wait for 5.x -- though I cannot think of any reason to do so -- we can change the target branch.)