Releases: dart-lang/source_gen
Releases · dart-lang/source_gen
package:source_gen v4.1.1
- Allow
analyzer: '>=8.1.1 <10.0.0'.
package:source_gen v4.1.0
- Add
TypeChecker.typeNamedLiterally. It's likeTypeChecker.typeNamed,
but takes aStringinstead of aType.
package:source_gen v4.0.2
- Bug fix: fix possible null pointer exception in
TypeChecker.typeNamedon
invalid code.
package:source_gen v4.0.1
- Require
analyzer: '>=8.1.1 <9.0.0'. - Allow
build: '>=3.0.0 <5.0.0'.
package:source_gen v4.0.0
- Breaking Change: remove
TypeChecker.fromRuntime, use
TypeChecker.typeNamedinstead. This removes all use ofdart:mirror, so
builders usingsource_gencan be AOT compiled for better performance. - Keep
// GENERATED FILEcomments on the first line.
package:source_gen v3.0.0
- Breaking Change: use the new
element2APIs inanalyzer. Builders that
do resolution need to switch to the new API, see
https://github.com/dart-lang/sdk/blob/main/pkg/analyzer/doc/element_model_migration_guide.md.
For questions please use https://github.com/dart-lang/build/discussions. - Require
build: ^3.0.0 - Updated the minimum package versions for a number of dependencies.
- Require Dart 3.7.0
- Update the GeneratorForAnnotation optimization to skip files with well known
annotation names such asoverride,Deprecated, andpragma.
package:source_gen v3.0.0-dev
- Breaking Change: use the new
element2APIs inanalyzer. Builders that
do resolution need to switch to the new API, see
https://github.com/dart-lang/sdk/blob/main/pkg/analyzer/doc/element_model_migration_guide.md.
For questions please use https://github.com/dart-lang/build/discussions. - Require Dart 3.7.0
package:source_gen v2.0.0
- Breaking Change: Change
formatOutputfunction to accept a language
version parameter. - Formatting Change: Generated code will no longer apply any fixes by
default (previously it would apply the single cascades statements fix). The
new formatter does not support applying fixes. - Document deduplication behavior for the output of
GeneratorForAnnotation.generateForAnnotatedElement. - Support all the glob quotes.
- Require
analyzer: '>=6.9.0 <8.0.0' - Support the latest
package:dart_style LibraryBuilder,PartBuilder, andSharedPartBuildernow take an optional
writeDescriptionsboolean. When set tofalse, headers and generator
descriptions for the files will not be included in the builder output.- Include
//dart format width=80comments in files generated by a
LibraryBuilderorPartBuilderand formatted with the default callback. - Require Dart 3.6.0
package:source_gen v1.5.0
- Add
throwOnUnresolvedconfiguration to theGeneratorForAnnotation
constructor. - Rename
InvalidGenerationSourceErrortoInvalidGenerationSource. Change
from a subtype ofErrorto a subtype ofException. This may be breaking if
a builder relies on aon Exception catchto ignore this error.
package:source_gen v1.4.0
- Require Dart 3.0
- Support the latest
package:analyzer. - Add a
nodeargument toInvalidGenerationSourceErrorto allow finding the source location from anAstNodeover anElement.