angular_compiler 0.4.1
angular_compiler: ^0.4.1 copied to clipboard
Compiler for AngularDart.
0.4.1 #
-
Catches an (invalid)
nulltoken of a provider and throws a better error. -
Catches an (invalid)
nullvalue of the function forFactoryProvider. -
Emits all strings for
@GeneratedInjectoras raw (r'$5.00'). -
Supports named arguments for
ValueProviderand@GeneratedInjector. -
Prevents
InjectorReader.accept()from crashing when given a dependency with no type or token.
0.4.0 #
New Features #
-
Added
TypedElementto represent a statically parsedTyped. -
TypedReader.parse()now returns aTypedElement. -
Added
$Typed, aTypeCheckerforTyped. -
Added
TypedReaderfor parsing generic directive types. -
Added support for
voidandNulltypes to appear in tokens. -
Added
DirectiveVisitor, and removed$HostBindingand$HostListener. -
Added
ModuleReader.extractProviderObjectsto use in the view compiler. -
Added
logFineas a new top-level API. -
Added an internal
cli.dartlibrary. Seelib/cli.dartfor details. -
Added
SplitDartEmitterfor internal use. -
Added
$QueryListas aTypeChecker. -
Expose the
$ProviderTypeChecker. -
Added
typeArgumentOfhelper method. -
Added support for recognizing the
MultiTokentype. -
CompilerFlagsnow supports as afast_bootargument; default istrue. -
ReflectorEmitternow takes an optionaldeferredModules{Source}. -
Started adding experimental support for a new
Modulesyntax.
Breaking Changes #
-
CompilerFlagsno longer parses and supports the'debug'option andgenDebugInfois alwaysfalse, and is deprecated pending removal in a future version. -
Removes unused APIs of
ComponentReader. -
TokenReaderno longer supports arbitrary const objects or literals. -
Removed
use_new_template_parserflag. The old parser was removed. -
Removed
$QueryList. -
Added
canReadtoNgAssetReader. -
Moved
CompilerFlagsandProfiletocli.dart. -
linkToReferencenow requires a second parameter, aLibraryReader, and treats private types (i.e. prefixed with_) asdynamicas the compiler cannot point to them. -
ReflectableEmitterhas been completely replaced with a new implementation. -
Removed all references and use of determining a "prefix" of a type. This was no longer used once
ReflectableEmitterwas re-written. -
Removed a number of internal flags that were no longer strictly required.
-
ModuleReader.deduplicateProvidersnow returns aListnot aSet, and providers that are multi are not removed, as it is a feature of the DI system to have multiple of them with the same token. -
Add the
TypeLinkclass, and replace uses ofUri. -
@Componentand@Directiveannotated classes are no longer@Injectable. In practice this means they can no loger be provided as an implicitconst Provider(FooComponent)without either manually adding@Injectableor refactoring your code. We found this didn't really affect users, and most uses of components and directives in these lists were accidental.
Bug Fixes #
-
Fixed a bug where the compiler crashed after resolving a bound type failed.
-
Misspelled or otherwise erroneous annotations on classes now produce a more understandable error message, including the element that was annotated and the annotation that was not resolved.
-
Fix a bug where
throwFailurehit an NPE without a stack trace. -
linkTypeOfcorrectly resolves bound types (i.e.<T>) in most cases, and can fallback todynamicotherwise. -
Removed all remaining (invalid) references to
package:barback. -
Prevented a
RangeErrorthat occurred when an invalid import lacked an extension. -
ReflectorEmitternow supportsMultiTokenand generic-typed tokens, with some known limitations. See https://github.com/dart-lang/angular/issues/782. -
Fix a bug in the outliner that did not the correct output extension.
0.3.0 #
- Always link to
export "...template.dart" filesininitReflector(). - Catch missing field-formal (
this.) fields and warn in the compiler. - Does not emit a
registerDependenciesfunction call for empty constructors. initReflector()no longer treats@Pipeas an@Injectableservice.
0.2.2 #
- Fixed the outliner to instruct the analyzer to ignore unused imports.
- Add
NgAssetReader.
0.2.1 #
- Various changes internal to the compiler.
0.2.0 #
- Added various classes and helpers to form the new compile infrastructure:
ComponentReaderDependencyReader,DependencyInvocation,DependencyElementProviderReader,ProviderElementTokenReader,TypeTokenElement,OpaqueTokenElementgetInheritanceHierarchy,urlOfReflectableReader,ReflectableOutput,ReflectableClass
0.1.1 #
- Fixed a bug where flag
entry_pointswas only allowed to be a list.
0.1.0 #
- Initial commit of
angular_compiler.