Skip to content
This repository was archived by the owner on Dec 6, 2017. It is now read-only.

feat(dynamic injector): enforce annotations with dynamic injector #104

Closed
wants to merge 1 commit into from

Conversation

vicb
Copy link
Contributor

@vicb vicb commented May 21, 2014

closes #58

Enforcing annotations on types injected via TypeProvider is a good
practice to make sure that the code will not break when switching from a
dynamic to a static injector.

closes dart-archive#58

Enforcing annotations on types injected via TypeProvider is a good
practice to make sure that the code will not break when switching from a
dynamic to a static injector.
DynamicInjector({List<Module> modules,
String name,
bool allowImplicitInjection: false,
Iterable<Type> assertAnnotations: null,
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure I like this... I'm thinking something along the lines of @Injectables...

@InjectableAnnotations(const [
  MyInjectableAnnotation
])
library myapp;

this way we can also make annotations parameter to generator/tramsformer optional.

@antingshen
Copy link
Contributor

We'll have to tackle this some other way in v2. Perhaps we should also reduce the number of ways to mark types as injectable to make this easier.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Some mode to enforce @inject (and other) annotations with dynamic injector
3 participants