-
-
Notifications
You must be signed in to change notification settings - Fork 1
Add Dotnet Implementation #81
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need a review of the QueryTest suite to ensure that I have all the tests included.
If you use the data from the testdata folder, that should be guaranteed.
Will be using this to implement/enhance the conformation testing of the Reqnroll implementation of Messages.
I'm not sure if the query library is the right tool for that. It doesn't provide a systematic list of operations on messages yet. Rather it is driven by the needs of the various report generators that we're migrating to messages. So I'm afraid we might end up with rather disjoint libraries if it used by one implementation for conformance testing and for reporting in another.
The implementation looks good over all. A few remarks:
-
The access modifiers seem to be a bit to open. I'd like to keep the public API of these libraries small and well defined. This makes it easier to create new versions without breaking changes and if we do make breaking changes, communicate those through the version number.
-
There is a little bit of technical debt that I think would be good to clean up from Java first before we duplicate it to .Net.
…er than embedded resources).
- Updated `Lineage` class to implement `IEquatable<Lineage>`, adding a specific `Equals` method and `GetHashCode`. - Simplified timestamp conversion in `Query` class using `ToDateTimeOffset()` extension method. - Changed `TimestampComparer` visibility from public to internal. - Added `TimestampExtensions` class for converting `Timestamp` to `DateTimeOffset`. - Minor fix in `QueryAcceptanceTest.cs` to default null names to empty strings.
My intent is to use it within our Messages conformance test suite, but to use it to confirm the integrity (internal consistency) of the generated messages. Things such as a TestStepStarted points to a valid TestCaseStarted, etc. |
|
@mpkorstanje @davidjgoss Let me know if there is anything else you'd like to see changed. |
That sounds reasonable. |
Cheers! Appreciate the patience. This PR made me realize this library needed some cleanup. Otherwise we implemt composite operations multiple times. |
|
@clrudolphi I noticed that the .Net implementation of the Gherkin parser isn't using messages yet. Gaspar said he'd tackle that somewhere in Autumn. While waiting for this PR, perhaps that is something you can work on. |
To clarify the ask, my understanding is that
Please confirm this scope and correct anywhere I'm mistaken. |
|
Yes to those points with the following remarks. Please do also communicate with Gaspar to ensure the timing is convenient.
Not fundamentally. There might be changes related to changing Gherkin.Cucumber.Messages.Types to Cucumber/Messages.
Only the unit test, if any. Unless I'm mistaken the Gherkin .Net implementation is already using the repositories acceptance tests, so the acceptance tests would not have to be changed. And this is all on the assumption that the Cucumber/Messages and Gherkin.Cucumber.Messages.Types both serialize to the same json. But that assumption is of course not validated and may not hold. In that case, there might be a change needed to messages. |
… lineage derived methods).
|
@charlierudolph I think we're at point now where we are relatively stable. More methods might be added, but the tests are setup such that we won't block each other when that happens. |
|
Ok. I'll take another look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation looks good to me.
You can copy the test and release workflows from Gherkin https://github.com/cucumber/query/tree/main/.github/workflows.
Please sanity check them.
Eliminated duplicate 'Query' folder.
Added Cucumber Green check mark logo.
Debugging why testdata can't be found during test execution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'm going to leave this open until Monday as a reminder to release it.
Could you hold off for a few days? I'd like to reconfirm package naming(re comments made by Gaspar wrt Tag-Expressions)? |
|
Not a problem! Please re-request a review when done. |
| @@ -0,0 +1,30 @@ | |||
| using Io.Cucumber.Messages.Types; | |||
|
|
|||
| namespace Io.Cucumber.Query | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Await review from Gaspar on cucumber/tag-expressions#219
…s of Cucumber libraries. Enabled nullable.
🤔 What's changed?
Adding a dotnet implementation. This is more or less a direct port of the Java source.
⚡️ What's your motivation?
Will be using this to implement/enhance the conformation testing of the Reqnroll implementation of Messages.
🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
I need a review of the QueryTest suite to ensure that I have all the tests included.
This needs integration into the CI pipeline.
This will need a nuget push as well.
📋 Checklist:
This text was originally generated from a template, then edited by hand. You can modify the template here.