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

[Core] Include default gherkin version in version.properties #1847

Merged
merged 3 commits into from
Dec 21, 2019

Conversation

davidjgoss
Copy link
Contributor

@davidjgoss davidjgoss commented Dec 20, 2019

Summary

Expose the gherkin version in version.properties, so it can be picked up from the classpath by other code.

Details

Motivation and Context

A bit more context in https://github.com/cucumber/cucumber/issues/779#issuecomment-561220566, but I am specifically targeting the IDEA autocompletion support for Rule/Example grammar.

I am opening this now for more of a steer, as I can see that with cucumber/common#1804 and others we now have multiple Gherkin versions so this would no longer be valid, and I'm not sure what the best way to achieve this kind of feature detection would be now - or if it's the right thing to do at all.

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist:

  • I've added tests for my code.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

(Sorry, meant to open this as a draft)

@mpkorstanje
Copy link
Contributor

Mmh. This is an interesting problem.

@mpkorstanje
Copy link
Contributor

While the introduction of the compatibility layer may suggest otherwise, the plan for Cucumber is not to support multiple versions of Gherkin indefinitely. Rather we are trying to solve a migration problem.

Cucumbers json and html plugins create reports on the execution of Cucumber and they do so by creating a facsimile of the original feature file. As a result they are quite complex and hard to maintain. And on top of that they are duplicated in the different implementations of Cucumber. Finally the output produced by the json formatter doesn't have a schema and differs per cucumber implementation.

We're looking to solve several problems all at once by introducing a new output format based on protobuf/ndjson. However as there are no consumers of protobuf/ndjson yet we can't simply remove the json formatter. We'll have to support it for at least a little while. This means that internally we need parsers for both Gherkin 5 and Gherkin 8+.

Co-Authored-By: M.P. Korstanje <mpkorstanje@users.noreply.github.com>
@davidjgoss
Copy link
Contributor Author

@mpkorstanje okay yeah - so we declare the vintage version for now as it's the default. Thanks!

@davidjgoss davidjgoss changed the title include gherkin version in version.properties [Build] Include default gherkin version in version.properties Dec 21, 2019
@davidjgoss davidjgoss changed the title [Build] Include default gherkin version in version.properties [Core] Include default gherkin version in version.properties Dec 21, 2019
@mpkorstanje mpkorstanje merged commit 8d621b0 into master Dec 21, 2019
@mpkorstanje mpkorstanje deleted the gherkin-version-property branch December 21, 2019 16:01
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

Successfully merging this pull request may close these issues.

2 participants