Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

Remove PLATFORM_* (directives|pipes) from AngularDart #363

Closed
matanlurey opened this issue Apr 27, 2017 · 1 comment
Closed

Remove PLATFORM_* (directives|pipes) from AngularDart #363

matanlurey opened this issue Apr 27, 2017 · 1 comment
Assignees
Milestone

Comments

@matanlurey
Copy link
Contributor

matanlurey commented Apr 27, 2017

This is a formal intent to deprecate (3.X) and remove the PLATFORM_* flags from AngularDart.

i.e. the following pattern:

transformers:
    - angular2:
        platform_directives:
            - 'package:angular2/common.dart#COMMON_DIRECTIVES'
        platform_pipes:
            - 'package:angular2/common.dart#COMMON_PIPES'

Would no longer function in AngularDart 4.0.0.

Background

Originally, these flags were used to reduce code duplication across modules, as it implicitly added directives: const [ ... ] and pipes: const [ ... ] into your entire compile process. However, this greatly complicates the compile process, and actually only worked properly with barback.

In AngularDart 4.0.0+, we'll be experimenting with alternative ways to compile AngularDart, including keeping support for barback (pub transformers), but also future Dart build tools, and bazel support. Both of the latter tool sets cannot support this feature - they are modular compilers that can't resolve global application flags well.

New compiler

In 3.1+, we'll have a flag to use a brand new compiler, name pending (but internally we refer to it as the "strong compiler". It uses Dart analysis summaries - metadata produced and used by the analyzer for IntelliJ, DartDevCompiler, and more - and it means we are able to finally solve the following:

And probably more I missed. I think we can all agree it's worth the compromise 😁

@matanlurey
Copy link
Contributor Author

Blocked by #404.

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

No branches or pull requests

2 participants