NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #144 most downloaded on pub.dev
Source code generation builders and utilities for the Dart build system
Last release 1 months ago
19 Aug 2026
Release timing varies
gaps range from 2 weeks to 6 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
146 releases · first in 2015
Support Dart 3.13 primary constructors and new constructor syntax in TypeChecker and ConstantReader .
new constructor syntax inTypeChecker and ConstantReader.sdk: ^3.11.0.analyzer: '>=14.0.0 <15.0.0'.new constructor syntax in
TypeChecker and ConstantReader.sdk: ^3.11.0.analyzer: '>=14.0.0 <15.0.0'.Require analyzer: '>=8.1.1 <15.0.0'
analyzer: '>=8.1.1 <15.0.0'One column per quarter.
Require analyzer: '>=8.1.1 <14.0.0'
analyzer: '>=8.1.1 <14.0.0'Require analyzer: '>=8.1.1 <13.0.0'
analyzer: '>=8.1.1 <13.0.0'Fix UnresolvedAnnotationException to include the name of the annotation in the message.
UnresolvedAnnotationException to include the name of the annotation inbuild: '>=3.0.2 <5.0.0'dart_style: ^3.1.2sdk: ^3.9.0UnresolvedAnnotationException to include the name of the annotation in
the message.build: '>=3.0.2 <5.0.0'dart_style: ^3.1.2sdk: ^3.9.0Add header configuration to CombiningBuilder .
header configuration to CombiningBuilder.Allow analyzer: '>=8.1.1 <11.0.0' .
analyzer: '>=8.1.1 <11.0.0'.Allow analyzer: '>=8.1.1 <10.0.0' .
analyzer: '>=8.1.1 <10.0.0'.Add TypeChecker.typeNamedLiterally . It's like TypeChecker.typeNamed , but takes a String instead of a Type .
TypeChecker.typeNamedLiterally. It's like TypeChecker.typeNamed,String instead of a Type.Bug fix: fix possible null pointer exception in TypeChecker.typeNamed on invalid code.
TypeChecker.typeNamed onRequire analyzer: '>=8.1.1 <9.0.0'.
analyzer: '>=8.1.1 <9.0.0'.build: '>=3.0.0 <5.0.0'.Breaking Change: remove TypeChecker.fromRuntime, use TypeChecker.typeNamed instead. This removes all use of dart:mirror, so builders using source_gen…
TypeChecker.fromRuntime, use
TypeChecker.typeNamed instead. This removes all use of dart:mirror, so
builders using source_gen can be AOT compiled for better performance.// GENERATED FILE comments on the first line.Prepare to stop using dart:mirrors: deprecate TypeChecker.fromRuntime. It will be removed in version 4.0.0. Add TypeChecker.typeNamed which is the rec…
dart:mirrors: deprecate TypeChecker.fromRuntime.
It will be removed in version 4.0.0. Add TypeChecker.typeNamed which is
the recommended replacement.dart:mirrors: add inPackage and inSdk parameters
to GenerateForAnnotation. These will start being used in version 4.0.0
when it switches to TypeChecker.typeNamed.InvalidGenerationSource support for Fragment, ElementDirective and
Annotatable.analyzer: '>=7.4.0 <9.0.0'.Breaking Change: use the new element2 APIs in analyzer. Builders that do resolution need to switch to the new API, see https://github.com/dart-lang/sd…
element2 APIs in analyzer. 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.TypeChecker().annotatedWith(), see also
the new TypeChecker().libraryDirectivesAnnotatedWith(). If you use
GeneratorForAnnotation see the new generateForAnnotatedDirective.build: ^3.0.0override, Deprecated, and pragma.Breaking Change: use the new element2 APIs in analyzer. Builders that do resolution need to switch to the new API, see https://github.com/dart-lang/sd…
element2 APIs in analyzer. 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.Breaking Change: Change formatOutput function to accept a language version parameter.
formatOutput function to accept a language
version parameter.GeneratorForAnnotation.generateForAnnotatedElement.analyzer: '>=6.9.0 <8.0.0'package:dart_styleLibraryBuilder, PartBuilder, and SharedPartBuilder now take an optional
writeDescriptions boolean. When set to false, headers and generator
descriptions for the files will not be included in the builder output.//dart format width=80 comments in files generated by a
LibraryBuilder or PartBuilder and formatted with the default callback.Add throwOnUnresolved configuration to the GeneratorForAnnotation constructor.
throwOnUnresolved configuration to the GeneratorForAnnotation
constructor.InvalidGenerationSourceError to InvalidGenerationSource. Change
from a subtype of Error to a subtype of Exception. This may be breaking if
a builder relies on a on Exception catch to ignore this error.Support the latest package:analyzer.
package:analyzer.node argument to InvalidGenerationSourceError to allow finding the
source location from an AstNode over an Element.Make TypeChecker.isAssignableFromType() null safe.
TypeChecker.isAssignableFromType() null safe.Always use a Uri in part of directives (previously a name would be used if the library had a non-empty one).
part of directives (previously a name would be used if
the library had a non-empty one).Add support for build_extensions configuration of builders producing multiple files. For example: build_extensions: { '.dart': ['.stub.dart', '.web.da
build_extensions configuration of builders producing
multiple files. For example:
build_extensions: { '.dart': ['.stub.dart', '.web.dart', '.vm.dart'] }TypeChecker.LibraryReader.allElements.
This allows GeneratorForAnnotation to target annotated directives.Update the value of the pubspec repository field.
repository field.2.18.TypeChecker.Add support for a preamble option to combining_builder.
preamble option to combining_builder.Fix another issue with overly specific types.
* Fix overly-specific cast.
Require analyzer: '>=4.6.0 <6.0.0'
analyzer: '>=4.6.0 <6.0.0'sdk: '>=2.17.0 <3.0.0'Enable the fix for single cascade statements when formatting Dart code.
formatOutput
function to the PartBuilder or LibraryBuilder constructors.Allow reviving constants which are static fields defined on the class which represents their type. Previously we checked this pattern only for enums,
package:analyzer.Include the LibraryElement in LibraryReader.allElements, LibraryReader.annotatedWith, and LibraryReader.annotatedWithExact. Run GeneratorForAnnotation
LibraryElement in LibraryReader.allElements,
LibraryReader.annotatedWith, and LibraryReader.annotatedWithExact. Run
GeneratorForAnnotation generators on library elements when the library
statement has the annotation.build_extensions configuration to the PartBuilder and
LibraryBuilder. You must forward the BuilderOptions object to the super
constructor for this to work.part statements on Windows.Drop dependency on package:pedantic.
package:pedantic.Add the build_extensions option to combining_builder, allowing output files to be generated into a different directory.
build_extensions option to combining_builder, allowing output
files to be generated into a different directory.Fix a bug with reviving constant expressions which are fields defined on a different class than their type (but in the same library).
Fix warnings with latest analyzer, require analyzer 2.x.
Allow the latest version of package:analyzer.
package:analyzer.Fix TypeChecker.fromRuntimeType for types that come from non-package uris.
TypeChecker.fromRuntimeType for types that come from non-package uris.Improve the error message for a missing part directive.
package:analyzer version 1.7.0.* Migrate to null safety. * Drop deprecated APIs: - ConstantReader.isAny. - ConstantReader.anyValue. - LibraryReader.classElements.
ConstantReader.isAny.ConstantReader.anyValue.LibraryReader.classElements.Fix a bug in the early bailout optimization where it wouldn't check for annotations in part files.
Expand allowed versions for the glob package as source_gen is compatible to break circular dependency issues in the ecosystem.
Allow the latest version of package:analyzer.
package:analyzer.Upgrade to package:build version 2.0.0.
package:build version 2.0.0.DartType.aliasElement.Widen dart_style range to include v2.x.
dart_style range to include v2.x.Optimize for the case where we have only GeneratorForAnnotation generators, and we know there are no annotations present in the file at all.
Allow package:analyzer version 0.41.x.
package:analyzer version 0.41.x.Add support for allowSyntaxErrors flag introduced in package:build version 1.4.0.
allowSyntaxErrors flag introduced in package:build version 1.4.0.2.10.0.Allow package:analyzer version 0.40.x.
package:analyzer version 0.40.x.Add support for Set in ConstantReader.
Set in ConstantReader.
isLiteral and literalValue to handle Set.isSet and setValue members.2.7.0.LibraryReader.allElements to include extensions.Add support for an ignore_for_file option to combining_builder.
Add support for an ignore_for_file option to combining_builder.
Expand documentation for GeneratorForAnnotation to make it clear that it
only targets elements at the top level of a library.
Support the latest pkg:analyzer.
pkg:analyzer.Allow pkg:analyzer version 0.36.x.
pkg:analyzer version 0.36.x.Allow pkg:analyzer version 0.37.x.
pkg:analyzer version 0.37.x.Allow pkg:analyzer version 0.38.x.
pkg:analyzer version 0.38.x.Fix a bug for finding the element for a function with recent versions of analyzer.
analyzer.Allow package:analyzer version 0.39.x.
package:analyzer version 0.39.x.Fix an exception during error reporting when the Element reported is in a summary file rather than a source file.
Element reported is in
a summary file rather than a source file.Use ParsedLibraryResult to find source spans for unresolvable annotations.
ParsedLibraryResult to find source spans for unresolvable annotations.Rename LibraryReader.classElements to LibraryReader.classes to better reflect the behavior. Deprecate the old name.
LibraryReader.classElements to LibraryReader.classes to better
reflect the behavior. Deprecate the old name.LibraryReader.enums.Avoid using the AST analyzer model from LibraryReader.
LibraryReader.Allow package:build version 1.0.0.
package:build version 1.0.0.Correctly handle properties in spanForElement.
spanForElement.Your coding agent can read these notes before it upgrades. Set up the MCP server →