You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Erik de Bruin <er...@ixsoftware.nl> on 2013/11/17 12:33:58 UTC
Re: [1/2] git commit: [flex-falcon] [refs/heads/develop] - Found the
proper order in which to feed the files to the compiler. No more warnings!!!
I now get a 'clean' publish on both the DataBindingTest and
DataGridExample examples. No more warnings!
And both projects now run correctly in 'release' mode as well.
EdB
On Sun, Nov 17, 2013 at 11:49 AM, <er...@apache.org> wrote:
> Updated Branches:
> refs/heads/develop 8482d7219 -> 753c7853a
>
>
> Found the proper order in which to feed the files to the compiler. No more warnings!!!
>
> Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>
>
>
> Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
> Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/828ab764
> Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/828ab764
> Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/828ab764
>
> Branch: refs/heads/develop
> Commit: 828ab76478179b580b97d20ed90415449c871a51
> Parents: 8482d72
> Author: Erik de Bruin <er...@ixsoftware.nl>
> Authored: Sun Nov 17 11:18:51 2013 +0100
> Committer: Erik de Bruin <er...@ixsoftware.nl>
> Committed: Sun Nov 17 11:18:51 2013 +0100
>
> ----------------------------------------------------------------------
> .../codegen/mxml/flexjs/MXMLFlexJSPublisher.java | 9 ++++++++-
> .../compiler/internal/graph/GoogDepsWriter.java | 17 +++++++----------
> 2 files changed, 15 insertions(+), 11 deletions(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/828ab764/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
> ----------------------------------------------------------------------
> diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
> index 7e3e7f9..7d0e0e9 100644
> --- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
> +++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
> @@ -222,14 +222,21 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
>
> ArrayList<String> optionList = new ArrayList<String>();
>
> + // (erikdebruin) add 'goog' files
> files = org.apache.commons.io.FileUtils.listFiles(new File(
> - intermediateDirPath), new RegexFileFilter("^.*(\\.js)"),
> + closureGoogTgtLibDirPath), new RegexFileFilter("^.*(\\.js)"),
> DirectoryFileFilter.DIRECTORY);
> for (File file : files)
> {
> optionList.add("--js=" + file.getCanonicalPath());
> }
>
> + // (erikdebruin) add project files
> + for (String filePath : gdw.filePathsInOrder)
> + {
> + optionList.add("--js=" + new File(filePath).getCanonicalPath());
> + }
> +
> if (useStrictPublishing)
> {
> // (erikdebruin) set compiler flags to 'strictest' to allow maximum
>
> http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/828ab764/compiler.jx/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
> ----------------------------------------------------------------------
> diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java b/compiler.jx/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
> index 4bceed6..5add337 100644
> --- a/compiler.jx/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
> +++ b/compiler.jx/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
> @@ -8,7 +8,6 @@ import java.io.IOException;
> import java.io.PrintWriter;
> import java.nio.charset.Charset;
> import java.util.ArrayList;
> -import java.util.Collections;
> import java.util.HashMap;
> import java.util.List;
> import java.util.Scanner;
> @@ -79,8 +78,10 @@ public class GoogDepsWriter {
> addDeps(mainName);
> }
>
> - private HashMap<String, GoogDep> visited = new HashMap<String, GoogDep>();
> -
> + public ArrayList<String> filePathsInOrder = new ArrayList<String>();
> +
> + private HashMap<String, GoogDep> visited = new HashMap<String, GoogDep>();
> +
> private ArrayList<GoogDep> sort(String rootClassName)
> {
> ArrayList<GoogDep> arr = new ArrayList<GoogDep>();
> @@ -92,6 +93,9 @@ public class GoogDepsWriter {
> private void sortFunction(GoogDep current, ArrayList<GoogDep> arr)
> {
> visited.put(current.className, current);
> +
> + filePathsInOrder.add(current.filePath);
> + System.out.println("Dependencies calculated for '" + current.filePath + "'");
>
> ArrayList<String> deps = current.deps;
> for (String className : deps)
> @@ -117,13 +121,6 @@ public class GoogDepsWriter {
> depMap.put(gd.className, gd);
> ArrayList<String> deps = getDirectDependencies(gd.filePath);
>
> - // (erikdebruin) Here lies the source for the remaining warnings, I
> - // think. A simple sort doesn't do the trick completely,
> - // though it helps, we need something that prioritises
> - // (puts 'm in earlier, somehow) the deps that need to
> - // come first.
> - Collections.sort(deps);
> -
> gd.deps = new ArrayList<String>();
> ArrayList<String> circulars = new ArrayList<String>();
> for (String dep : deps)
>
--
Ix Multimedia Software
Jan Luykenstraat 27
3521 VB Utrecht
T. 06-51952295
I. www.ixsoftware.nl
Re: [1/2] git commit: [flex-falcon] [refs/heads/develop] - Found
the proper order in which to feed the files to the compiler. No more
warnings!!!
Posted by Alex Harui <ah...@adobe.com>.
Excellent! Thanks!
-Alex
On 11/17/13 3:33 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>I now get a 'clean' publish on both the DataBindingTest and
>DataGridExample examples. No more warnings!
>
>And both projects now run correctly in 'release' mode as well.
>
>EdB
>
>
>
>On Sun, Nov 17, 2013 at 11:49 AM, <er...@apache.org> wrote:
>> Updated Branches:
>> refs/heads/develop 8482d7219 -> 753c7853a
>>
>>
>> Found the proper order in which to feed the files to the compiler. No
>>more warnings!!!
>>
>> Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>
>>
>>
>> Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
>> Commit:
>>http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/828ab764
>> Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/828ab764
>> Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/828ab764
>>
>> Branch: refs/heads/develop
>> Commit: 828ab76478179b580b97d20ed90415449c871a51
>> Parents: 8482d72
>> Author: Erik de Bruin <er...@ixsoftware.nl>
>> Authored: Sun Nov 17 11:18:51 2013 +0100
>> Committer: Erik de Bruin <er...@ixsoftware.nl>
>> Committed: Sun Nov 17 11:18:51 2013 +0100
>>
>> ----------------------------------------------------------------------
>> .../codegen/mxml/flexjs/MXMLFlexJSPublisher.java | 9 ++++++++-
>> .../compiler/internal/graph/GoogDepsWriter.java | 17
>>+++++++----------
>> 2 files changed, 15 insertions(+), 11 deletions(-)
>> ----------------------------------------------------------------------
>>
>>
>>
>>http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/828ab764/compiler
>>.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSP
>>ublisher.java
>> ----------------------------------------------------------------------
>> diff --git
>>a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/M
>>XMLFlexJSPublisher.java
>>b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/M
>>XMLFlexJSPublisher.java
>> index 7e3e7f9..7d0e0e9 100644
>> ---
>>a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/M
>>XMLFlexJSPublisher.java
>> +++
>>b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/M
>>XMLFlexJSPublisher.java
>> @@ -222,14 +222,21 @@ public class MXMLFlexJSPublisher extends
>>JSGoogPublisher implements
>>
>> ArrayList<String> optionList = new ArrayList<String>();
>>
>> + // (erikdebruin) add 'goog' files
>> files = org.apache.commons.io.FileUtils.listFiles(new File(
>> - intermediateDirPath), new
>>RegexFileFilter("^.*(\\.js)"),
>> + closureGoogTgtLibDirPath), new
>>RegexFileFilter("^.*(\\.js)"),
>> DirectoryFileFilter.DIRECTORY);
>> for (File file : files)
>> {
>> optionList.add("--js=" + file.getCanonicalPath());
>> }
>>
>> + // (erikdebruin) add project files
>> + for (String filePath : gdw.filePathsInOrder)
>> + {
>> + optionList.add("--js=" + new
>>File(filePath).getCanonicalPath());
>> + }
>> +
>> if (useStrictPublishing)
>> {
>> // (erikdebruin) set compiler flags to 'strictest' to
>>allow maximum
>>
>>
>>http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/828ab764/compiler
>>.jx/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
>> ----------------------------------------------------------------------
>> diff --git
>>a/compiler.jx/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.
>>java
>>b/compiler.jx/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.
>>java
>> index 4bceed6..5add337 100644
>> ---
>>a/compiler.jx/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.
>>java
>> +++
>>b/compiler.jx/src/org/apache/flex/compiler/internal/graph/GoogDepsWriter.
>>java
>> @@ -8,7 +8,6 @@ import java.io.IOException;
>> import java.io.PrintWriter;
>> import java.nio.charset.Charset;
>> import java.util.ArrayList;
>> -import java.util.Collections;
>> import java.util.HashMap;
>> import java.util.List;
>> import java.util.Scanner;
>> @@ -79,8 +78,10 @@ public class GoogDepsWriter {
>> addDeps(mainName);
>> }
>>
>> - private HashMap<String, GoogDep> visited = new HashMap<String,
>>GoogDep>();
>> -
>> + public ArrayList<String> filePathsInOrder = new
>>ArrayList<String>();
>> +
>> + private HashMap<String, GoogDep> visited = new HashMap<String,
>>GoogDep>();
>> +
>> private ArrayList<GoogDep> sort(String rootClassName)
>> {
>> ArrayList<GoogDep> arr = new ArrayList<GoogDep>();
>> @@ -92,6 +93,9 @@ public class GoogDepsWriter {
>> private void sortFunction(GoogDep current, ArrayList<GoogDep>
>>arr)
>> {
>> visited.put(current.className, current);
>> +
>> + filePathsInOrder.add(current.filePath);
>> + System.out.println("Dependencies calculated for '" +
>>current.filePath + "'");
>>
>> ArrayList<String> deps = current.deps;
>> for (String className : deps)
>> @@ -117,13 +121,6 @@ public class GoogDepsWriter {
>> depMap.put(gd.className, gd);
>> ArrayList<String> deps =
>>getDirectDependencies(gd.filePath);
>>
>> - // (erikdebruin) Here lies the source for the remaining
>>warnings, I
>> - // think. A simple sort doesn't do the
>>trick completely,
>> - // though it helps, we need something
>>that prioritises
>> - // (puts 'm in earlier, somehow) the deps
>>that need to
>> - // come first.
>> - Collections.sort(deps);
>> -
>> gd.deps = new ArrayList<String>();
>> ArrayList<String> circulars = new ArrayList<String>();
>> for (String dep : deps)
>>
>
>
>
>--
>Ix Multimedia Software
>
>Jan Luykenstraat 27
>3521 VB Utrecht
>
>T. 06-51952295
>I. www.ixsoftware.nl