Skip to content

dart: Add implementation - #444

Open
Fried-man wants to merge 37 commits into
cucumber:mainfrom
Fried-man:feature/dart_implementation
Open

dart: Add implementation#444
Fried-man wants to merge 37 commits into
cucumber:mainfrom
Fried-man:feature/dart_implementation

Conversation

@Fried-man

@Fried-man Fried-man commented Jul 21, 2026

Copy link
Copy Markdown

🤔 What's changed?

Created the dart implementation for Cucumber Expressions.

⚡️ What's your motivation?

Want to use Cucumber Expressions within a Cucumber Dart/Flutter solution.

🏷️ What kind of change is this?

  • ⚡ New feature (non-breaking change which adds new behaviour)

♻️ Anything particular you want feedback on?

General concerns about API surface.

Should I expose CucumberExpression, RegularExpression, and the AST types in the barrel file? Should ParameterTypeRegistry.parameterTypes, lookupByTypeName, and lookupByRegexp be public?

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

This text was originally generated from a template, then edited by hand. You can modify the template here.

Fried-man added 30 commits July 6, 2026 07:04
…r dependency installation, analysis, and testing
…sions, including installation instructions, usage examples, and custom parameter types.
…tion, documentation link, funding sources, and relevant topics for better visibility and clarity.
…checks with a dedicated _isWhitespace method using a regex pattern for improved Unicode support.
…r overview of Cucumber Expressions for Dart, including syntax reference, usage examples, and features related to parameter type matching and expression generation.
…d consistency, removing unnecessary 'show' clauses while maintaining functionality.
…ad of an interface, simplifying the implementation in ParameterTypeRegistry.
…y for creating expressions, enhancing clarity in README, and improving parameter type lookup mechanisms. Update tests to reflect changes in expression generation and matching.
…new js package and version adjustments for existing dependencies
…er expressions and regular expressions, enhancing test coverage and ensuring compliance with expected behavior.
… test files for better readability and consistency.
…art implementation of Cucumber Expressions in the unreleased section
Updated the float regular expression for better accuracy and added tests to ensure that incomplete float representations are correctly rejected.
@mpkorstanje

Copy link
Copy Markdown
Member

@Fried-man are you going to use this anywhere? I was happy to take the PRs for messages and gherkin because we already had a Gherkin implementation that needed them, but I'd rather not add or maintain code that won't be used by any one.

@Fried-man

Copy link
Copy Markdown
Author

are you going to use this anywhere

I'd like to build out a Cucumber Dart/Flutter solution.

I'm curious what your appetite for an official version is.

@aslakhellesoy

Copy link
Copy Markdown
Contributor

I would also like to use this in Varar.

I can see @mpkorstanje's point. The maintenance burden ends up being quite big for the Cucumber team. I think the ideal situation would be that whoever can build and maintain a port of Cucumber Expressions and maintain it outside this repo, while still being able to verify that it passes an official test suite.

Currently the test suite consists of a corpus in ./testdata - plus additional unit tests ported from other languages.

If I were to write another implementation (say, in Zig), I would keep it in a separate repo, and have a script that copied ./testdata from this repo into my repo.

WDYT?

@mpkorstanje

mpkorstanje commented Jul 22, 2026

Copy link
Copy Markdown
Member

Okay. That's two potential users. Good enough for me for now.

@aslakhellesoy it is a shame we never setup Gherkin as an RFC + ENBF + test data. We could have published that as an artifact to derive other implementations from. That pattern would have carried over nicely to cucumber-expressions too.

@Fried-man please request a review when ready.

@Fried-man
Fried-man marked this pull request as ready for review July 23, 2026 12:59
@mpkorstanje
mpkorstanje self-requested a review July 24, 2026 22:13
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.

3 participants