Skip to content

Support for the include keyword to include other YAML files #3193

@AlexV525

Description

@AlexV525
  • Dart SDK Version: 2.14.2
  • Packages using: json_serializable: ^5.0.0
  • Builders:
targets:
  $default:
    builders:
      json_serializable:
        options:
          field_rename: snake
          explicit_to_json: true

I'm using a base package to store our base configurations currently, e.g. analysis options. The structure may looks like this:

app_a
  - (dependency) base_package
app_b
  - (dependency) base_package
app_c
  - (dependency) base_package

Now I'm trying to use the include keyword to include the base build.yaml from our base package in projects, instead of writing the same builder everywhere. But I've got this error:

Invalid argument(s): line 1, column 1 of build.yaml: Unrecognized keys: [include]; supported keys: [builders, post_process_builders, targets, global_options, additional_public_assets]
  ╷
1 │ include: ../app_base/build.yaml
  │ ^^^^^^^
  ╵

So I'm assuming the include keyword is not supported. Could we have that supported?

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed-not-plannedClosed as we don't intend to take action on the reported issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions