dart-archive / angular.dart

Legacy source repository. See github.com/dart-lang/angular
https://webdev.dartlang.org/angular/
1.25k stars 248 forks source link

Could angular make use of the smoke pkg #1090

Open vicb opened 10 years ago

vicb commented 10 years ago

There is a smoke package in the bleeding edge version of Dart.

From the readme:

Smoke is a package that exposes a reduced reflective system API. This API
includes accessing objects in a dynamic fashion (read properties, write
properties, and call methods), inspecting types (for example, whether a
method exists), and symbol/string convertion.

The package provides a default implementation of this API that uses the system's
mirrors, but additionally provides mechanisms for statically generating code
that can replace the mirror-based implementation.

The intention of this package is to allow frameworks to use mirrors in a way
that will not impose on their users. The idea is that users will not worry about
how to preserve symbols when compiling with dart2js (for instance, using the
[MirrorsUsed][] annotation). Instead, this package provides the building
blocks to autogenerate whatever is needed for dart2js to be happy and to
generate reasonable code.

Note this package alone doesn't know how to generate everything, but it provides
a simple API that different frameworks can use to define what needs to be
generated.

I think it could be worth looking into the package and check if we can leverage it angular.dart.

bgourlie commented 10 years ago

I can safely say that the most frustrating aspects of deploying my angular app (or any app that relies on mirrors) is

So, +1.

vicb commented 10 years ago

@bgourlie angular now relies on transformers

bgourlie commented 10 years ago

Good to know. Admittedly, it's been some time since I've attempted to deploy.

vicb commented 10 years ago

One problem with the current version of smoke (0.1) is that everything is indexed by Symbol, String would be better for us.

See dartbug.com/17863 for ref.