Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DFB3C200C5B for ; Thu, 27 Apr 2017 23:20:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DE308160B9E; Thu, 27 Apr 2017 21:20:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0BD01160BB2 for ; Thu, 27 Apr 2017 23:20:07 +0200 (CEST) Received: (qmail 21934 invoked by uid 500); 27 Apr 2017 21:20:07 -0000 Mailing-List: contact issues-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list issues@flex.apache.org Received: (qmail 21925 invoked by uid 99); 27 Apr 2017 21:20:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Apr 2017 21:20:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id C7E4DCD754 for ; Thu, 27 Apr 2017 21:20:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.001 X-Spam-Level: X-Spam-Status: No, score=-100.001 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id YQZsyz03mEqi for ; Thu, 27 Apr 2017 21:20:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id AC58C5FC8C for ; Thu, 27 Apr 2017 21:20:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D318DE0D40 for ; Thu, 27 Apr 2017 21:20:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3AEEA21DE3 for ; Thu, 27 Apr 2017 21:20:04 +0000 (UTC) Date: Thu, 27 Apr 2017 21:20:04 +0000 (UTC) From: "Alex Harui (JIRA)" To: issues@flex.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLEX-35300) Could not find file for class: Error MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 27 Apr 2017 21:20:09 -0000 [ https://issues.apache.org/jira/browse/FLEX-35300?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1598= 7698#comment-15987698 ]=20 Alex Harui commented on FLEX-35300: ----------------------------------- What is the output JS for CustomError? There should not be a goog.require = for Error assuming Error is defined in an external-library-path SWC. Could= some other SWC on the regular library-path have baked in an Error class? GoogDepsWriter should not be seeing goog.requires for native classes so it = shouldn't be trying to find files for them. > Could not find file for class: Error > ------------------------------------ > > Key: FLEX-35300 > URL: https://issues.apache.org/jira/browse/FLEX-35300 > Project: Apache Flex > Issue Type: Bug > Components: FalconJX > Affects Versions: Apache FalconJX 0.8.0 > Reporter: Josh Tynjala > > Create the following class and instantiate it with {{new CustomError()}} > {code:title=3DCustomError.as} > package > { > =09public class CustomError extends Error > =09{ > =09} > } > {code} > When you try to compile, the following error will appear in the compiler = output: > {code} > Could not find file for class: Error > File not found: Error > org.apache.flex.compiler.internal.graph.GoogDepsWriter.addDeps(GoogDepsWr= iter.java:366)org.apache.flex.compiler.internal.graph.GoogDepsWriter.addDep= s(GoogDepsWriter.java:382)org.apache.flex.compiler.internal.graph.GoogDepsW= riter.addDeps(GoogDepsWriter.java:391)org.apache.flex.compiler.internal.gra= ph.GoogDepsWriter.addDeps(GoogDepsWriter.java:391)org.apache.flex.compiler.= internal.graph.GoogDepsWriter.buildDB(GoogDepsWriter.java:206)org.apache.fl= ex.compiler.internal.graph.GoogDepsWriter.getListOfFiles(GoogDepsWriter.jav= a:96)org.apache.flex.compiler.internal.codegen.mxml.flexjs.MXMLFlexJSPublis= her.publish(MXMLFlexJSPublisher.java:319)org.apache.flex.compiler.clients.M= XMLJSCNode.compile(MXMLJSCNode.java:380)org.apache.flex.compiler.clients.MX= MLJSCNode._mainNoExit(MXMLJSCNode.java:238)org.apache.flex.compiler.clients= .MXMLJSCNode.mainNoExit(MXMLJSCNode.java:195)org.apache.flex.compiler.clien= ts.MXMLJSC._mainNoExit(MXMLJSC.java:365)org.apache.flex.compiler.clients.MX= MLJSC.mainNoExit(MXMLJSC.java:282)org.apache.flex.compiler.clients.MXMLJSC.= staticMainNoExit(MXMLJSC.java:242)org.apache.flex.compiler.clients.MXMLJSC.= main(MXMLJSC.java:224) > {code} > It appears to be related to the following code in GoogDepsWriter.java (an= d the section above for {{@implements}} is probably also affected): > {code:Java} > c =3D line.indexOf("@extends"); > if (c > -1) > { > =09if (fi.impls =3D=3D null) > =09=09fi.impls =3D new ArrayList(); > =09c2 =3D line.indexOf("}", c); > =09String impl =3D line.substring(c + 10, c2); > =09fi.impls.add(impl); > } > {code} > Using NativeUtils.isJSNative() seems to help for this particular case wit= h the Error class: > {code:Java} > c =3D line.indexOf("@extends"); > if (c > -1) > { > =09if (fi.impls =3D=3D null) > =09=09fi.impls =3D new ArrayList(); > =09c2 =3D line.indexOf("}", c); > =09String impl =3D line.substring(c + 10, c2); > =09if(!NativeUtils.isJSNative(impl)) > =09{ > =09=09fi.impls.add(impl); > =09} > } > {code} > I don't think that this is the correct solution, though. Other classes de= fined in externs can also give us this error and return false for isJSNativ= e(). For instance, I randomly tried extending child_process.ChildProcess fr= om node.swc, and I got the same error. > {code} > Could not find file for class: child_process.ChildProcess > File not found: child_process.ChildProcess > org.apache.flex.compiler.internal.graph.GoogDepsWriter.addDeps(GoogDepsWr= iter.java:367)org.apache.flex.compiler.internal.graph.GoogDepsWriter.addDep= s(GoogDepsWriter.java:383)org.apache.flex.compiler.internal.graph.GoogDepsW= riter.addDeps(GoogDepsWriter.java:392)org.apache.flex.compiler.internal.gra= ph.GoogDepsWriter.buildDB(GoogDepsWriter.java:207)org.apache.flex.compiler.= internal.graph.GoogDepsWriter.getListOfFiles(GoogDepsWriter.java:97)org.apa= che.flex.compiler.internal.codegen.mxml.flexjs.MXMLFlexJSPublisher.publish(= MXMLFlexJSPublisher.java:319)org.apache.flex.compiler.clients.MXMLJSCNode.c= ompile(MXMLJSCNode.java:380)org.apache.flex.compiler.clients.MXMLJSCNode._m= ainNoExit(MXMLJSCNode.java:238)org.apache.flex.compiler.clients.MXMLJSCNode= .mainNoExit(MXMLJSCNode.java:195)org.apache.flex.compiler.clients.MXMLJSC._= mainNoExit(MXMLJSC.java:365)org.apache.flex.compiler.clients.MXMLJSC.mainNo= Exit(MXMLJSC.java:282)org.apache.flex.compiler.clients.MXMLJSC.staticMainNo= Exit(MXMLJSC.java:242)org.apache.flex.compiler.clients.MXMLJSC.main(MXMLJSC= .java:224) > {code} > Something more robust than NativeUtils.isJSNative() that accounts for whe= ther the class is extern seems required here. > This issue was not present in FlexJS 0.7.0. The issue exists in both the = develop and dual branches. -- This message was sent by Atlassian JIRA (v6.3.15#6346)