cobalt_analyzer 1.7.0
cobalt_analyzer: ^1.7.0 copied to clipboard
Internal analysis layer of cobalt_generator and cobalt_lint — parses Cobalt annotations once for both. Not covered by semver; depend on those packages instead.
1.7.0 #
- No code changes in this package. Republished in lockstep with 1.7.0:
a widget-tree hint in
cobalt_flutter, a lint rule for reads that always throw, generated names without$,CobaltStartupObserver, a Mermaid copy in the inspector, and decorators in child scopes.
1.6.0 #
- No code changes in this package. Republished in lockstep with 1.6.0:
child scopes in the lint plugin,
openForTestincobalt_test, a reminder about a forgotten bootstrap incobalt_flutter, and record names without$incobalt_generator.
1.5.0 #
- Reads
@CobaltChildScopeintoCobaltChildScopeClass(values, parent, provides) andscope:intoCobaltInjectableClass.scope;CobaltLibraryDeclarations.childScopescarries the markers. Requirescobaltandcobalt_annotations1.5.0.
1.4.0 #
- Internal: a constructor parameter records whether it has a default
value (
CobaltInjectedProperty.hasDefault), andCobaltInjectableClass.withConstructorParametersreplaces them.exposeAsbesideinstantiationsis read when written without type arguments, and each instantiation is exposed under its own.cobalt_generatorandcobalt_lint1.4.0 require this version.
1.3.0 #
- Internal: an
@injectedfield on a generic class withinstantiationsis no longer a build error. Each instantiation reads the field under its own type arguments, andCobaltInjectableParser.declaredPropertiesOfreturns the fields as the class declares them, for its one mixin.cobalt_generatorandcobalt_lint1.3.0 require this version.
1.2.0 #
- Internal: parses
@CobaltInject(instantiations:)into one declaration per instantiation, soparseClassreturns a list, and reports a raw type, a duplicate entry,exposeAs, an@injectedfield or a module member withinstantiationsas build errors. A type argument keeps its?in a registration's identity. Requirescobalt_annotations1.2.0;cobalt_generatorandcobalt_lint1.2.0 require this version.
1.1.1 #
- No code changes in this package. Republished in lockstep with 1.1.1:
a shorter README with a Quick start,
examples/helloas the smallest app,docs/OVERVIEW.mdfor everything the README no longer holds, anddocs/TROUBLESHOOTING.md, one entry per error.
1.1.0 #
- No code changes in this package. Republished in lockstep with 1.1.0, which adds Korean to the inspector and to the documentation.
1.0.0 #
- Internal to
cobalt_generatorandcobalt_lint, and now says so: its models and parsers follow what those two need, not semantic versioning. Depend on them rather than on this package. The version still moves in lockstep.
0.9.0 #
- An
@cobaltHookAllclass extendsCobaltHook<T>, now a base class; the parser's message says so.
0.8.0 #
- Reads
@CobaltHookAllclasses:CobaltHookClass,CobaltHookParserandCobaltLibraryDeclarations.hooks. The class implementsCobaltHook<T>for oneTand has a constructor without required parameters. CobaltParseErrorisfinal.
0.7.0 #
- No code changes in this package. Republished in lockstep with 0.7.0, which
makes
CobaltResolvera base class (breaking), adds getters toCobaltRegistrationKindand lets the inspector open on a chosen tab — seecobalt's changelog.
0.6.0 #
- No code changes in this package. Republished in lockstep with 0.6.0, which
adds build times to observers and the inspector, a graph snapshot in
cobalt_testand a lint rule — seecobalt's changelog.
0.5.0 #
- A transient lifetime on an
@CobaltInitclass or on a module member returning aFutureis honoured:CobaltInjectableClass.isAsyncTransientandisAwaited. Before, it was silently read as a singleton built byinit().lazy: true/lazyInit,dependsOnanddispose:on one are refused. CobaltDecoratorClass.allNames, refused together withname.@injectedfields on an@CobaltDecoratesclass are read instead of refused —CobaltDecoratorClass.injectedFields— and count among itsdependencies. Field reading is shared with registrations, so the samelate finalandstaticrefusals apply.- IR written before these fields reads as before: not transient, not
allNames, no injected fields.
0.4.0 #
@CobaltInitwith an@CobaltParamis parsed instead of refused, andCobaltInjectableClassgainsisAsyncParamandisBuiltInPhaseOne. Such a class withlazy: trueordependsOnis refused: it is built per call, never byinit().
0.3.0 #
CobaltDecoratorClass, read byCobaltDecoratorParser, andCobaltLibraryDeclarations.decorators, read tolerantly from IR written by an older build. A decorator is kept apart from the injectables: it claims no key, and every check that groups by key would take it for a duplicate.- The parser refuses a decorator that is not a subtype of its target, that
takes other than one parameter of the target type, that is also a
registration, that decorates twice, that is abstract or generic, that has no
public generative constructor, or that asks for
@CobaltParamor@injectedfields.
0.2.1 #
- Accepts
analyzerup to 14.x (>=10.0.1 <15.0.0, was<13.0.0). The cap kept the repository's own workspace from resolving on Flutter 3.49, whosetestneeds analyzer 13, and kept projects on currentbuild,build_runner,freezedorjson_serializablefrom using the generator. Flutter 3.38.9 stays the floor: the same source builds and passes its tests on analyzer 10.0.1, 12.1.0, 13.3.0 and 14.4.0.
0.2.0 #
CobaltInjectableClass.isLazyAsync, read from@CobaltInit(lazy: true)and fromlazyIniton a module member. IR written before it existed reads as not lazy.- Refused while parsing: a lazy class that declares
dependsOn,lazyIniton a class (the class form is@CobaltInit(lazy: true)), andlazyIniton a module member that does not return aFuture.
0.1.2 #
- No code changes in this package. Republished in lockstep with a
packaging fix in
cobalt0.1.2 (a stray file removed from its archive) — see its changelog. A fix in one package still ships as a patch for all fifteen, because publishing a subset is what lets the set drift.
0.1.1 #
- No code changes in this package. Republished in lockstep with the fix
in
cobalt_lint0.1.1 — see its changelog. Lockstep is the whole versioning policy: a fix in one package still ships as a patch for all fifteen, because publishing a subset is what lets the set drift.
0.1.0 #
-
Requires Dart
^3.10.0— Flutter 3.38 — instead of^3.13.0, and movesanalyzerto>=10.0.1 <13.0.0. A Flutter 3.38 application cannot resolve past 10.0.1, because Flutter pinsmeta 1.17.0there; everything else takes 12.1.0. This package reads only the element model, which does not change across that range. -
Initial release.
-
One parsing layer over
analyzer, shared bycobalt_generatorandcobalt_lintso the IDE and the build agree on what a declaration means. -
Typed IR —
CobaltInjectableClass,CobaltBootstrapStepClass,CobaltScopeRootClass,CobaltTypeRef— with JSON round-tripping, which is what makes the generator's two-phase pipeline possible. -
CobaltTypeRef.signatureis the single definition of registration identity: type arguments are part of it, nullability is not. -
Annotations are matched by class name and owning package rather than by exact library path, so moving a declaration inside
cobalt_annotationsdoes not break consumers, and test stubs still resolve. -
CobaltScopeRootClass.providescarries the registrations a package makes by hand, asCobaltProvidedRefpairs of type and optional name. IR written before the field existed still reads. -
CobaltModuleParserreads an@CobaltModuleclass into one registration per member — the only parser that is one-to-many. A member returningFuture<T>registersT.