You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by er...@apache.org on 2013/11/17 11:49:18 UTC
[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!!!
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)
[2/2] git commit: [flex-falcon] [refs/heads/develop] - Removing old
code
Posted by er...@apache.org.
Removing old code
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/753c7853
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/753c7853
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/753c7853
Branch: refs/heads/develop
Commit: 753c7853a58ef337a4f34ebdd30f1accf03d2987
Parents: 828ab76
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Sun Nov 17 11:47:05 2013 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Sun Nov 17 11:47:05 2013 +0100
----------------------------------------------------------------------
.../mxml/flexjs/MXMLFlexJSPublisher.java | 56 +-------------------
1 file changed, 1 insertion(+), 55 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/753c7853/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 7d0e0e9..6cf3f30 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
@@ -117,16 +117,6 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
+ "/closure/goog/";
final String closureGoogTgtLibDirPath = intermediateDirPath
+ "/library/closure/goog";
- /* AJH not needed by GoogDepsWriter
- final String closureGoogTgtLibDirRelPath = "./library/closure/goog";
- final String closureTPSrcLibDirPath = closureLibDirPath
- + "/third_party/closure/goog/";
- final String closureTPTgtLibDirPath = intermediateDirPath
- + "/library/third_party/closure/goog";
- final List<String> sdkJSLibSrcDirPaths = ((JSGoogConfiguration) configuration)
- .getSDKJSLib();
- final String sdkJSLibTgtDirPath = intermediateDirPath;
- */
final String depsSrcFilePath = intermediateDirPath
+ "/library/closure/goog/deps.js";
final String depsTgtFilePath = intermediateDirPath + "/deps.js";
@@ -154,42 +144,6 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
e.printStackTrace();
}
- if (!isMarmotinniRun)
- {
- //for (String sdkJSLibSrcDirPath : sdkJSLibSrcDirPaths)
- // copyFile(sdkJSLibSrcDirPath, sdkJSLibTgtDirPath);
- }
- boolean isWindows = System.getProperty("os.name").indexOf("Mac") == -1;
-
- List<SourceFile> inputs = new ArrayList<SourceFile>();
- Collection<File> files = org.apache.commons.io.FileUtils.listFiles(
- new File(intermediateDirPath),
- new RegexFileFilter("^.*(\\.js)"),
- DirectoryFileFilter.DIRECTORY);
- for (File file : files)
- {
- if (isWindows)
- {
- // TODO (erikdebruin) maybe fix the 'manual' relative path prefix?
- String filePath = "../../../"
- + new File(intermediateDirPath).toURI()
- .relativize(file.toURI()).getPath();
-
- inputs.add(SourceFile.fromCode(filePath, filePath,
- readCode(file)));
- }
- else
- {
- inputs.add(SourceFile.fromFile(file));
- }
- }
-
- if (!isMarmotinniRun)
- {
- //copyFile(closureGoogSrcLibDirPath, closureGoogTgtLibDirPath);
- //copyFile(closureTPSrcLibDirPath, closureTPTgtLibDirPath);
- }
-
IOFileFilter pngSuffixFilter = FileFilterUtils.and(FileFileFilter.FILE,
FileFilterUtils.suffixFileFilter(".png"));
IOFileFilter gifSuffixFilter = FileFilterUtils.and(FileFileFilter.FILE,
@@ -207,14 +161,6 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
final List<SourceFile> deps = new ArrayList<SourceFile>();
deps.add(SourceFile.fromFile(srcDeps));
-// ErrorManager errorManager = new JSGoogErrorManager();
-// DepsGenerator depsGenerator = new DepsGenerator(deps, inputs,
-// InclusionStrategy.ALWAYS,
-// (isWindows) ? closureGoogTgtLibDirRelPath
-// : closureGoogTgtLibDirPath, errorManager);
-// writeFile(depsTgtFilePath, depsGenerator.computeDependencyCalls(),
-// false);
-
writeHTML("intermediate", projectName, intermediateDirPath);
writeHTML("release", projectName, releaseDirPath);
writeCSS(projectName, intermediateDirPath);
@@ -223,7 +169,7 @@ 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(
+ Collection<File> files = org.apache.commons.io.FileUtils.listFiles(new File(
closureGoogTgtLibDirPath), new RegexFileFilter("^.*(\\.js)"),
DirectoryFileFilter.DIRECTORY);
for (File file : files)
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
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 Erik de Bruin <er...@ixsoftware.nl>.
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