Quoting Erik de Bruin <e...@ixsoftware.nl>:

[#Insert 'goog.requires()'; the equivalent of 'import' in AS]

We should take care to only generate goog.requires() for imports that are
requires is the equivalent of import. We just need import statements to
resolve not-fully-qualified identifiers, the dependencies have to
be tracked seperately.

You are correct that calling it 'equivalent' has implications I didn't
mean it to have. The 'goog.require' statements (the way we use them)
help the Closure Builder figure out dependencies, which allow it to
reach the maximum level of optimisation/minification. Only the fully
qualified namespaces of classes actually referenced in the code should
be 'required'.

I therefor suggest that we shouldn't parse the 'imports' section of
the AS class, but work from type information available during
compilation, if there is such a thing...

EdB


Ok, understood but for now, I AM going to add the imports explicitly declared as a writer implemented method. After we get the code "looking" right we can worry about actual "implications" of what is written.

Mike


--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com

Reply via email to