You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by yi...@apache.org on 2021/12/08 12:16:56 UTC
[royale-compiler] branch develop updated: Externc tests were failing on network error even if some of the dependencies were cached
This is an automated email from the ASF dual-hosted git repository.
yishayw pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
The following commit(s) were added to refs/heads/develop by this push:
new 4ce069f Externc tests were failing on network error even if some of the dependencies were cached
new 83cf0b4 Merge branch 'develop' of https://github.com/apache/royale-compiler into develop
4ce069f is described below
commit 4ce069fa6de4ca2a1694d4514ef11c614d78f12b
Author: yweiss <yi...@mcafee.com>
AuthorDate: Wed Dec 8 01:54:09 2021 -0800
Externc tests were failing on network error even if some of the dependencies were cached
---
compiler-externc/src/test/build.xml | 75 ++++++++++++++++++++++++++++++++++++-
1 file changed, 74 insertions(+), 1 deletion(-)
diff --git a/compiler-externc/src/test/build.xml b/compiler-externc/src/test/build.xml
index ec7b37f..968bee7 100644
--- a/compiler-externc/src/test/build.xml
+++ b/compiler-externc/src/test/build.xml
@@ -61,6 +61,56 @@
<get src="https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/gecko_dom.js" dest="${compiler.externc}/target/downloads/browser/gecko_dom.js" ignoreerrors="true" skipexisting="false"/>
<get src="https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/w3c_dom2.js" dest="${compiler.externc}/target/downloads/browser/w3c_dom2.js" ignoreerrors="true" skipexisting="false"/>
<get src="https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/html5.js" dest="${compiler.externc}/target/downloads/browser/html5.js" ignoreerrors="true" skipexisting="false"/>
+
+ <antcall target="get-from-cache-if-needed" >
+ <param name="srcFile" value="svg.js" />
+ <param name="destFile" value="svg.js" />
+ <param name="destDir" value="${basedir}/../../target/downloads/browser" />
+ </antcall>
+ <antcall target="get-from-cache-if-needed" >
+ <param name="srcFile" value="es3.js" />
+ <param name="destFile" value="es3.js" />
+ <param name="destDir" value="${basedir}/../../target/downloads" />
+ </antcall>
+ <antcall target="get-from-cache-if-needed" >
+ <param name="srcFile" value="es6.js" />
+ <param name="destFile" value="es6.js" />
+ <param name="destDir" value="${basedir}/../../target/downloads" />
+ </antcall>
+ <antcall target="get-from-cache-if-needed" >
+ <param name="srcFile" value="w3c_composition_event.js" />
+ <param name="destFile" value="w3c_composition_event.js" />
+ <param name="destDir" value="${basedir}/../../target/downloads/browser" />
+ </antcall>
+ <antcall target="get-from-cache-if-needed" >
+ <param name="srcFile" value="w3c_css.js" />
+ <param name="destFile" value="w3c_css.js" />
+ <param name="destDir" value="${basedir}/../../target/downloads/browser" />
+ </antcall>
+ <antcall target="get-from-cache-if-needed" >
+ <param name="srcFile" value="gecko_dom.js" />
+ <param name="destFile" value="gecko_dom.js" />
+ <param name="destDir" value="${basedir}/../../target/downloads/browser" />
+ </antcall>
+ <antcall target="get-from-cache-if-needed" >
+ <param name="srcFile" value="ie_dom.js" />
+ <param name="destFile" value="ie_dom.js" />
+ <param name="destDir" value="${basedir}/../../target/downloads/browser" />
+ </antcall>
+ <antcall target="get-from-cache-if-needed" >
+ <param name="srcFile" value="w3c_dom2.js" />
+ <param name="destFile" value="w3c_dom2.js" />
+ <param name="destDir" value="${basedir}/../../target/downloads/browser" />
+ </antcall>
+ <antcall target="get-from-cache-if-needed" >
+ <param name="srcFile" value="html5.js" />
+ <param name="destFile" value="html5.js" />
+ <param name="destDir" value="${basedir}/../../target/downloads/browser" />
+ </antcall>
+ <antcall target="fail-if-not-found" >
+ <param name="destFile" value="svg.js" />
+ <param name="destDir" value="${basedir}/../../target/downloads/browser" />
+ </antcall>
</target>
<target name="compile.unit.tests">
@@ -163,5 +213,28 @@
<target name="wipe" depends="clean">
<delete dir="${compiler.externc}/target"/>
</target>
-
+ <target name="fail-if-not-found">
+ <fail message="${destDir}/${destFile} could not be downloaded or found in cache">
+ <condition>
+ <not>
+ <available file="${destDir}/${destFile}" />
+ </not>
+ </condition>
+ </fail>
+ </target>
+ <target name="double-check-file" >
+ <echo>${env.ROYALE_DOWNLOAD_CACHE}</echo>
+ <condition property="still-no-file" value="true">
+ <and>
+ <not>
+ <available file="${destDir}/${destFile}" />
+ </not>
+ <isset property="env.ROYALE_DOWNLOAD_CACHE" />
+ </and>
+ </condition>
+ <echo>Need file: ${still_no_file}</echo>
+ </target>
+ <target name="get-from-cache-if-needed" depends="double-check-file" if="still-no-file">
+ <copy file="${env.ROYALE_DOWNLOAD_CACHE}/${srcFile}" tofile="${destDir}/${destFile}" />
+ </target>
</project>
RE: [royale-compiler] branch develop updated: Externc tests were failing on network error even if some of the dependencies were cached
Posted by Yishay Weiss <yi...@hotmail.com>.
Good catch, fixed.
From: Josh Tynjala<ma...@bowlerhat.dev>
Sent: Wednesday, December 8, 2021 7:03 PM
To: dev@royale.apache.org<ma...@royale.apache.org>
Subject: Re: [royale-compiler] branch develop updated: Externc tests were failing on network error even if some of the dependencies were cached
Hey Yishay,
There doesn't seem to be an existing <get> tag for svg.js, but you
added get-from-cache-if-needed and fail-if-not-found calls for it. I think
that this is causing the build to fail. If I comment out the svg.js
changes, and leave the rest, the build works for me.
--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>
On Wed, Dec 8, 2021 at 4:16 AM <yi...@apache.org> wrote:
> This is an automated email from the ASF dual-hosted git repository.
>
> yishayw pushed a commit to branch develop
> in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
>
>
> The following commit(s) were added to refs/heads/develop by this push:
> new 4ce069f Externc tests were failing on network error even if some
> of the dependencies were cached
> new 83cf0b4 Merge branch 'develop' of
> https://github.com/apache/royale-compiler into develop
> 4ce069f is described below
>
> commit 4ce069fa6de4ca2a1694d4514ef11c614d78f12b
> Author: yweiss <yi...@mcafee.com>
> AuthorDate: Wed Dec 8 01:54:09 2021 -0800
>
> Externc tests were failing on network error even if some of the
> dependencies were cached
> ---
> compiler-externc/src/test/build.xml | 75
> ++++++++++++++++++++++++++++++++++++-
> 1 file changed, 74 insertions(+), 1 deletion(-)
>
> diff --git a/compiler-externc/src/test/build.xml
> b/compiler-externc/src/test/build.xml
> index ec7b37f..968bee7 100644
> --- a/compiler-externc/src/test/build.xml
> +++ b/compiler-externc/src/test/build.xml
> @@ -61,6 +61,56 @@
> <get src="
> https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/gecko_dom.js"<https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/gecko_dom.js%22>
> dest="${compiler.externc}/target/downloads/browser/gecko_dom.js"
> ignoreerrors="true" skipexisting="false"/>
> <get src="
> https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/w3c_dom2.js"<https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/w3c_dom2.js%22>
> dest="${compiler.externc}/target/downloads/browser/w3c_dom2.js"
> ignoreerrors="true" skipexisting="false"/>
> <get src="
> https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/html5.js"<https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/html5.js%22>
> dest="${compiler.externc}/target/downloads/browser/html5.js"
> ignoreerrors="true" skipexisting="false"/>
> +
> + <antcall target="get-from-cache-if-needed" >
> + <param name="srcFile" value="svg.js" />
> + <param name="destFile" value="svg.js" />
> + <param name="destDir"
> value="${basedir}/../../target/downloads/browser" />
> + </antcall>
> + <antcall target="get-from-cache-if-needed" >
> + <param name="srcFile" value="es3.js" />
> + <param name="destFile" value="es3.js" />
> + <param name="destDir"
> value="${basedir}/../../target/downloads" />
> + </antcall>
> + <antcall target="get-from-cache-if-needed" >
> + <param name="srcFile" value="es6.js" />
> + <param name="destFile" value="es6.js" />
> + <param name="destDir"
> value="${basedir}/../../target/downloads" />
> + </antcall>
> + <antcall target="get-from-cache-if-needed" >
> + <param name="srcFile" value="w3c_composition_event.js" />
> + <param name="destFile" value="w3c_composition_event.js" />
> + <param name="destDir"
> value="${basedir}/../../target/downloads/browser" />
> + </antcall>
> + <antcall target="get-from-cache-if-needed" >
> + <param name="srcFile" value="w3c_css.js" />
> + <param name="destFile" value="w3c_css.js" />
> + <param name="destDir"
> value="${basedir}/../../target/downloads/browser" />
> + </antcall>
> + <antcall target="get-from-cache-if-needed" >
> + <param name="srcFile" value="gecko_dom.js" />
> + <param name="destFile" value="gecko_dom.js" />
> + <param name="destDir"
> value="${basedir}/../../target/downloads/browser" />
> + </antcall>
> + <antcall target="get-from-cache-if-needed" >
> + <param name="srcFile" value="ie_dom.js" />
> + <param name="destFile" value="ie_dom.js" />
> + <param name="destDir"
> value="${basedir}/../../target/downloads/browser" />
> + </antcall>
> + <antcall target="get-from-cache-if-needed" >
> + <param name="srcFile" value="w3c_dom2.js" />
> + <param name="destFile" value="w3c_dom2.js" />
> + <param name="destDir"
> value="${basedir}/../../target/downloads/browser" />
> + </antcall>
> + <antcall target="get-from-cache-if-needed" >
> + <param name="srcFile" value="html5.js" />
> + <param name="destFile" value="html5.js" />
> + <param name="destDir"
> value="${basedir}/../../target/downloads/browser" />
> + </antcall>
> + <antcall target="fail-if-not-found" >
> + <param name="destFile" value="svg.js" />
> + <param name="destDir"
> value="${basedir}/../../target/downloads/browser" />
> + </antcall>
> </target>
>
> <target name="compile.unit.tests">
> @@ -163,5 +213,28 @@
> <target name="wipe" depends="clean">
> <delete dir="${compiler.externc}/target"/>
> </target>
> -
> + <target name="fail-if-not-found">
> + <fail message="${destDir}/${destFile} could not be downloaded or
> found in cache">
> + <condition>
> + <not>
> + <available file="${destDir}/${destFile}" />
> + </not>
> + </condition>
> + </fail>
> + </target>
> + <target name="double-check-file" >
> + <echo>${env.ROYALE_DOWNLOAD_CACHE}</echo>
> + <condition property="still-no-file" value="true">
> + <and>
> + <not>
> + <available file="${destDir}/${destFile}" />
> + </not>
> + <isset property="env.ROYALE_DOWNLOAD_CACHE" />
> + </and>
> + </condition>
> + <echo>Need file: ${still_no_file}</echo>
> + </target>
> + <target name="get-from-cache-if-needed" depends="double-check-file"
> if="still-no-file">
> + <copy file="${env.ROYALE_DOWNLOAD_CACHE}/${srcFile}"
> tofile="${destDir}/${destFile}" />
> + </target>
> </project>
>
Re: [royale-compiler] branch develop updated: Externc tests were failing on network error even if some of the dependencies were cached
Posted by Josh Tynjala <jo...@bowlerhat.dev>.
Hey Yishay,
There doesn't seem to be an existing <get> tag for svg.js, but you
added get-from-cache-if-needed and fail-if-not-found calls for it. I think
that this is causing the build to fail. If I comment out the svg.js
changes, and leave the rest, the build works for me.
--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>
On Wed, Dec 8, 2021 at 4:16 AM <yi...@apache.org> wrote:
> This is an automated email from the ASF dual-hosted git repository.
>
> yishayw pushed a commit to branch develop
> in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
>
>
> The following commit(s) were added to refs/heads/develop by this push:
> new 4ce069f Externc tests were failing on network error even if some
> of the dependencies were cached
> new 83cf0b4 Merge branch 'develop' of
> https://github.com/apache/royale-compiler into develop
> 4ce069f is described below
>
> commit 4ce069fa6de4ca2a1694d4514ef11c614d78f12b
> Author: yweiss <yi...@mcafee.com>
> AuthorDate: Wed Dec 8 01:54:09 2021 -0800
>
> Externc tests were failing on network error even if some of the
> dependencies were cached
> ---
> compiler-externc/src/test/build.xml | 75
> ++++++++++++++++++++++++++++++++++++-
> 1 file changed, 74 insertions(+), 1 deletion(-)
>
> diff --git a/compiler-externc/src/test/build.xml
> b/compiler-externc/src/test/build.xml
> index ec7b37f..968bee7 100644
> --- a/compiler-externc/src/test/build.xml
> +++ b/compiler-externc/src/test/build.xml
> @@ -61,6 +61,56 @@
> <get src="
> https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/gecko_dom.js"
> dest="${compiler.externc}/target/downloads/browser/gecko_dom.js"
> ignoreerrors="true" skipexisting="false"/>
> <get src="
> https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/w3c_dom2.js"
> dest="${compiler.externc}/target/downloads/browser/w3c_dom2.js"
> ignoreerrors="true" skipexisting="false"/>
> <get src="
> https://raw.githubusercontent.com/royale-extras/closure-compiler/royale/externs/browser/html5.js"
> dest="${compiler.externc}/target/downloads/browser/html5.js"
> ignoreerrors="true" skipexisting="false"/>
> +
> + <antcall target="get-from-cache-if-needed" >
> + <param name="srcFile" value="svg.js" />
> + <param name="destFile" value="svg.js" />
> + <param name="destDir"
> value="${basedir}/../../target/downloads/browser" />
> + </antcall>
> + <antcall target="get-from-cache-if-needed" >
> + <param name="srcFile" value="es3.js" />
> + <param name="destFile" value="es3.js" />
> + <param name="destDir"
> value="${basedir}/../../target/downloads" />
> + </antcall>
> + <antcall target="get-from-cache-if-needed" >
> + <param name="srcFile" value="es6.js" />
> + <param name="destFile" value="es6.js" />
> + <param name="destDir"
> value="${basedir}/../../target/downloads" />
> + </antcall>
> + <antcall target="get-from-cache-if-needed" >
> + <param name="srcFile" value="w3c_composition_event.js" />
> + <param name="destFile" value="w3c_composition_event.js" />
> + <param name="destDir"
> value="${basedir}/../../target/downloads/browser" />
> + </antcall>
> + <antcall target="get-from-cache-if-needed" >
> + <param name="srcFile" value="w3c_css.js" />
> + <param name="destFile" value="w3c_css.js" />
> + <param name="destDir"
> value="${basedir}/../../target/downloads/browser" />
> + </antcall>
> + <antcall target="get-from-cache-if-needed" >
> + <param name="srcFile" value="gecko_dom.js" />
> + <param name="destFile" value="gecko_dom.js" />
> + <param name="destDir"
> value="${basedir}/../../target/downloads/browser" />
> + </antcall>
> + <antcall target="get-from-cache-if-needed" >
> + <param name="srcFile" value="ie_dom.js" />
> + <param name="destFile" value="ie_dom.js" />
> + <param name="destDir"
> value="${basedir}/../../target/downloads/browser" />
> + </antcall>
> + <antcall target="get-from-cache-if-needed" >
> + <param name="srcFile" value="w3c_dom2.js" />
> + <param name="destFile" value="w3c_dom2.js" />
> + <param name="destDir"
> value="${basedir}/../../target/downloads/browser" />
> + </antcall>
> + <antcall target="get-from-cache-if-needed" >
> + <param name="srcFile" value="html5.js" />
> + <param name="destFile" value="html5.js" />
> + <param name="destDir"
> value="${basedir}/../../target/downloads/browser" />
> + </antcall>
> + <antcall target="fail-if-not-found" >
> + <param name="destFile" value="svg.js" />
> + <param name="destDir"
> value="${basedir}/../../target/downloads/browser" />
> + </antcall>
> </target>
>
> <target name="compile.unit.tests">
> @@ -163,5 +213,28 @@
> <target name="wipe" depends="clean">
> <delete dir="${compiler.externc}/target"/>
> </target>
> -
> + <target name="fail-if-not-found">
> + <fail message="${destDir}/${destFile} could not be downloaded or
> found in cache">
> + <condition>
> + <not>
> + <available file="${destDir}/${destFile}" />
> + </not>
> + </condition>
> + </fail>
> + </target>
> + <target name="double-check-file" >
> + <echo>${env.ROYALE_DOWNLOAD_CACHE}</echo>
> + <condition property="still-no-file" value="true">
> + <and>
> + <not>
> + <available file="${destDir}/${destFile}" />
> + </not>
> + <isset property="env.ROYALE_DOWNLOAD_CACHE" />
> + </and>
> + </condition>
> + <echo>Need file: ${still_no_file}</echo>
> + </target>
> + <target name="get-from-cache-if-needed" depends="double-check-file"
> if="still-no-file">
> + <copy file="${env.ROYALE_DOWNLOAD_CACHE}/${srcFile}"
> tofile="${destDir}/${destFile}" />
> + </target>
> </project>
>