flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Tynjala (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-35300) Could not find file for class: Error
Date Fri, 05 May 2017 23:02:04 GMT

    [ https://issues.apache.org/jira/browse/FLEX-35300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15999086#comment-15999086
] 

Josh Tynjala commented on FLEX-35300:
-------------------------------------

{quote}
Downloading Apache FlexJS from:http://apacheflexbuild.cloudapp.net:8080/job/flex-asjs/lastSuccessfulBuild/artifact/out/apache-flex-flexjs-0.8.0-bin.tar.gz
Installing Apache Flex Falcon Compiler from: http://apacheflexbuild.cloudapp.net:8080/job/flex-falcon-dual/lastSuccessfulBuild/artifact/out/apache-flex-falconjx-0.8.0-bin.zip
{quote}

Looks like flex-asjs is coming from the right place, but it's downloading flex-falcon-dual,
which I assume is now behind the develop branch.

> 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
>            Assignee: Alex Harui
>             Fix For: Apache FalconJX 0.8.0
>
>
> Create the following class and instantiate it with {{new CustomError()}}
> {code:title=CustomError.as}
> package
> {
> 	public class CustomError extends Error
> 	{
> 	}
> }
> {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(GoogDepsWriter.java:366)org.apache.flex.compiler.internal.graph.GoogDepsWriter.addDeps(GoogDepsWriter.java:382)org.apache.flex.compiler.internal.graph.GoogDepsWriter.addDeps(GoogDepsWriter.java:391)org.apache.flex.compiler.internal.graph.GoogDepsWriter.addDeps(GoogDepsWriter.java:391)org.apache.flex.compiler.internal.graph.GoogDepsWriter.buildDB(GoogDepsWriter.java:206)org.apache.flex.compiler.internal.graph.GoogDepsWriter.getListOfFiles(GoogDepsWriter.java:96)org.apache.flex.compiler.internal.codegen.mxml.flexjs.MXMLFlexJSPublisher.publish(MXMLFlexJSPublisher.java:319)org.apache.flex.compiler.clients.MXMLJSCNode.compile(MXMLJSCNode.java:380)org.apache.flex.compiler.clients.MXMLJSCNode._mainNoExit(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.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 (and the section
above for {{@implements}} is probably also affected):
> {code:Java}
> c = line.indexOf("@extends");
> if (c > -1)
> {
> 	if (fi.impls == null)
> 		fi.impls = new ArrayList<String>();
> 	c2 = line.indexOf("}", c);
> 	String impl = line.substring(c + 10, c2);
> 	fi.impls.add(impl);
> }
> {code}
> Using NativeUtils.isJSNative() seems to help for this particular case with the Error
class:
> {code:Java}
> c = line.indexOf("@extends");
> if (c > -1)
> {
> 	if (fi.impls == null)
> 		fi.impls = new ArrayList<String>();
> 	c2 = line.indexOf("}", c);
> 	String impl = line.substring(c + 10, c2);
> 	if(!NativeUtils.isJSNative(impl))
> 	{
> 		fi.impls.add(impl);
> 	}
> }
> {code}
> I don't think that this is the correct solution, though. Other classes defined in externs
can also give us this error and return false for isJSNative(). For instance, I randomly tried
extending child_process.ChildProcess from 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(GoogDepsWriter.java:367)org.apache.flex.compiler.internal.graph.GoogDepsWriter.addDeps(GoogDepsWriter.java:383)org.apache.flex.compiler.internal.graph.GoogDepsWriter.addDeps(GoogDepsWriter.java:392)org.apache.flex.compiler.internal.graph.GoogDepsWriter.buildDB(GoogDepsWriter.java:207)org.apache.flex.compiler.internal.graph.GoogDepsWriter.getListOfFiles(GoogDepsWriter.java:97)org.apache.flex.compiler.internal.codegen.mxml.flexjs.MXMLFlexJSPublisher.publish(MXMLFlexJSPublisher.java:319)org.apache.flex.compiler.clients.MXMLJSCNode.compile(MXMLJSCNode.java:380)org.apache.flex.compiler.clients.MXMLJSCNode._mainNoExit(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.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}
> Something more robust than NativeUtils.isJSNative() that accounts for whether 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)

Mime
View raw message