Skip to content

Conversation

TheMaverickProgrammer
Copy link
Contributor

@TheMaverickProgrammer TheMaverickProgrammer commented Sep 15, 2024

Related: #706.

This PR adds an optional bool? writesDescriptions field to the _Builder base class constructor.
By default, it is true, but if explicitly set to false, the generated description comments will not be included
in the generated output.

See related link for my use-case. This will be useful so that any file can be generated with this tool for Dart.

Checklist

Copy link
Member

@kevmoo kevmoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll want to add a changelog entry for this, please. Since it's adding a feature, it'll be a minor version per https://semver.org/

Co-authored-by: Jacob MacDonald <[email protected]>
…elds. Corrected writeDescriptions=false test to catch specific values, both with and without a header present. Added an additional test to sanity check when writeDescriptions=true.
@jakemac53 jakemac53 merged commit d4a1f27 into dart-lang:master Sep 24, 2024
12 checks passed
@TheMaverickProgrammer TheMaverickProgrammer deleted the feature/no_preamble_no_comment@mav branch September 24, 2024 23:48
mosuem pushed a commit to dart-lang/build that referenced this pull request Dec 10, 2024
…art-lang/source_gen#720)

Related: dart-lang/source_gen#706.

This PR adds an optional `bool? writesDescriptions` field to the `_Builder` base class constructor.
By default, it is `true`, but if explicitly set to `false`, the generated description comments will not be included
in the generated output.

See related link for my use-case. This will be useful so that _any_ file can be generated with this tool for Dart.
mosuem pushed a commit to dart-lang/build that referenced this pull request Dec 10, 2024
…art-lang/source_gen#720)

Related: dart-lang/source_gen#706.

This PR adds an optional `bool? writesDescriptions` field to the `_Builder` base class constructor.
By default, it is `true`, but if explicitly set to `false`, the generated description comments will not be included
in the generated output.

See related link for my use-case. This will be useful so that _any_ file can be generated with this tool for Dart.
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