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

Getting code generation to work with build_runner watch #274

Open
ClemsRocket opened this issue Nov 1, 2022 · 1 comment
Open

Getting code generation to work with build_runner watch #274

ClemsRocket opened this issue Nov 1, 2022 · 1 comment

Comments

@ClemsRocket
Copy link

Hi,
First of all, great work with this package!

I'm using 3.0.0-rc17
For other libraries using code generation (such as json_serializable), I'm used to keep a flutter pub run build_runner watch running somewhere in the background to update detect changes and update files automatically. However, while running watch, the generated code is updated only when I change the .dart file containing the @GherkinTestSuite, and never when I update .feature files. Is there any way to trigger an incremental rebuild when the .feature files are updated?

@ikbendewilliam
Copy link

My guess would be that the build.yaml is not configured correctly.
https://github.com/jonsamwell/flutter_gherkin/blob/integration_test__package_support/build.yaml

# Read about `build.yaml` at https://pub.dev/packages/build_config
builders:

  gherkin_test_suite:
    import: "package:flutter_gherkin/src/flutter/code_generation/builders/gherkin_test_suite_builder.dart"
    builder_factories: ["gherkinTestSuiteBuilder"]
    build_extensions: {".dart": ["gherkin_tests.g.part"]}
    auto_apply: dependents
    build_to: cache
    applies_builders: ["source_gen|combining_builder"]

I'm not entirely familiar with this package, but there should be a reference here to the .feature in the build_extensions AFAIK.

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