Something about "unused getprop" or something like that? Wondering though: Are you sure we need the compiler to do this check? Can't we assume the AS compiler has already done this sort of check? Would we save a few bytes by not actually generating the insides of cross-compiled interfaces?
-Alex On 12/5/13 10:12 AM, "Erik de Bruin" <e...@ixsoftware.nl> wrote: >Which warning did you get from the compiler? > >EdB > > > >On Thu, Dec 5, 2013 at 6:36 PM, Alex Harui <aha...@adobe.com> wrote: >> OK, can you give more details on what it is checking for? >> >> For the AS interface: >> >> public interface IDataProviderItemRendererMapper extends IBead >> { >> function get itemRendererFactory():IItemRendererClassFactory; >> function set >>itemRendererFactory(value:IItemRendererClassFactory):void; >> } >> >> What should the output JS be? What it was doing (from emitInterface in >> JSGoogEmitter.java) was resulting in warnings from the closure compiler. >> The output was the following and the itemRendererFactory line resulting >>in >> a warning. >> >> /** >> * >> >>org.apache.flex.html.customControls.beads.IDataProviderItemRendererMapper >> * >> * @fileoverview >> * >> * @suppress {checkTypes} >> */ >> >> >>goog.provide('org.apache.flex.html.customControls.beads.IDataProviderItem >>Re >> ndererMapper'); >> >> >> >> >> /** >> * @interface >> * @extends {org.apache.flex.core.IBead} >> */ >> >>org.apache.flex.html.customControls.beads.IDataProviderItemRendererMapper >> = function() { >> }; >> org.apache.flex.html.customControls.beads.prototype.itemRendererFactory; >> >> >> /** >> * Metadata >> * >> * @type {Object.<string, Array.<Object>>} >> */ >> >>org.apache.flex.html.customControls.beads.IDataProviderItemRendererMapper >>.p >> rototype.FLEXJS_CLASS_INFO = { names: [{ name: >> 'IDataProviderItemRendererMapper', qName: >> >>'org.apache.flex.html.customControls.beads.IDataProviderItemRendererMappe >>r' >> }], interfaces: [org.apache.flex.core.IBead] }; >> >> >> >> >> >> >> On 12/4/13 11:55 PM, "Erik de Bruin" <e...@ixsoftware.nl> wrote: >> >>>The Closure Compiler uses the members of an interface to check if the >>>interface is properly implemented. So, yes, I'd say we need the >>>members emitted... >>> >>>EdB >>> >>> >>> >>>On Thu, Dec 5, 2013 at 7:12 AM, <aha...@apache.org> wrote: >>>> Don't bother emitting interface members. The way they were being >>>>emitted were causing warnings from the closure compiler >>>> >>>> >>>> Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo >>>> Commit: >>>>http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/70683e5d >>>> Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/70683e5d >>>> Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/70683e5d >>>> >>>> Branch: refs/heads/develop >>>> Commit: 70683e5d223538713c02eb02029f4e67686c0c7a >>>> Parents: 30fd603 >>>> Author: Alex Harui <aha...@apache.org> >>>> Authored: Wed Dec 4 22:11:39 2013 -0800 >>>> Committer: Alex Harui <aha...@apache.org> >>>> Committed: Wed Dec 4 22:11:39 2013 -0800 >>>> >>>> ---------------------------------------------------------------------- >>>> .../codegen/js/flexjs/JSFlexJSEmitter.java | 65 >>>>++++++++++++++++++++ >>>> 1 file changed, 65 insertions(+) >>>> ---------------------------------------------------------------------- >>>> >>>> >>>> >>>>http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/70683e5d/compil >>>>er >>>>.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmi >>>>tt >>>>er.java >>>> ---------------------------------------------------------------------- >>>> diff --git >>>>a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/J >>>>SF >>>>lexJSEmitter.java >>>>b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/J >>>>SF >>>>lexJSEmitter.java >>>> index a65335d..cd67c00 100644 >>>> --- >>>>a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/J >>>>SF >>>>lexJSEmitter.java >>>> +++ >>>>b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/J >>>>SF >>>>lexJSEmitter.java >>>> @@ -197,6 +197,71 @@ public class JSFlexJSEmitter extends >>>>JSGoogEmitter >>>>implements IJSFlexJSEmitter >>>> } >>>> >>>> @Override >>>> + public void emitInterface(IInterfaceNode node) >>>> + { >>>> + ICompilerProject project = getWalker().getProject(); >>>> + >>>> + getDoc().emitInterfaceDoc(node, project); >>>> + >>>> + String qname = node.getQualifiedName(); >>>> + if (qname != null && !qname.equals("")) >>>> + { >>>> + write(qname); >>>> + write(ASEmitterTokens.SPACE); >>>> + writeToken(ASEmitterTokens.EQUAL); >>>> + write(ASEmitterTokens.FUNCTION); >>>> + write(ASEmitterTokens.PAREN_OPEN); >>>> + write(ASEmitterTokens.PAREN_CLOSE); >>>> + write(ASEmitterTokens.SPACE); >>>> + write(ASEmitterTokens.BLOCK_OPEN); >>>> + writeNewline(); >>>> + write(ASEmitterTokens.BLOCK_CLOSE); >>>> + write(ASEmitterTokens.SEMICOLON); >>>> + } >>>> + >>>> + >>>> + /* (aharui): is there any reason to emit members at all? >>>> + final IDefinitionNode[] members = >>>>node.getAllMemberDefinitionNodes(); >>>> + for (IDefinitionNode mnode : members) >>>> + { >>>> + boolean isAccessor = mnode.getNodeID() == >>>>ASTNodeID.GetterID >>>> + || mnode.getNodeID() == ASTNodeID.SetterID; >>>> + >>>> + if (!isAccessor || !propertyNames.contains(qname)) >>>> + { >>>> + writeNewline(); >>>> + >>>> + write(qname); >>>> + write(ASEmitterTokens.MEMBER_ACCESS); >>>> + write(JSEmitterTokens.PROTOTYPE); >>>> + write(ASEmitterTokens.MEMBER_ACCESS); >>>> + write(mnode.getQualifiedName()); >>>> + >>>> + if (isAccessor && !propertyNames.contains(qname)) >>>> + { >>>> + propertyNames.add(qname); >>>> + } >>>> + else >>>> + { >>>> + write(ASEmitterTokens.SPACE); >>>> + writeToken(ASEmitterTokens.EQUAL); >>>> + write(ASEmitterTokens.FUNCTION); >>>> + >>>> + emitParameters(((IFunctionNode) >>>>mnode).getParameterNodes()); >>>> + >>>> + write(ASEmitterTokens.SPACE); >>>> + write(ASEmitterTokens.BLOCK_OPEN); >>>> + writeNewline(); >>>> + write(ASEmitterTokens.BLOCK_CLOSE); >>>> + } >>>> + >>>> + write(ASEmitterTokens.SEMICOLON); >>>> + } >>>> + } >>>> + */ >>>> + } >>>> + >>>> + @Override >>>> public void emitField(IVariableNode node) >>>> { >>>> IDefinition definition = getClassDefinition(node); >>>> >>> >>> >>> >>>-- >>>Ix Multimedia Software >>> >>>Jan Luykenstraat 27 >>>3521 VB Utrecht >>> >>>T. 06-51952295 >>>I. www.ixsoftware.nl >> > > > >-- >Ix Multimedia Software > >Jan Luykenstraat 27 >3521 VB Utrecht > >T. 06-51952295 >I. www.ixsoftware.nl