You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2016/11/08 15:11:03 UTC
git commit: [flex-falcon]
[refs/heads/feature-autobuild/example-maven-dirs] - - Merged stuff that seems
to have been lost in previous merges - Removed the clearing of the debug-js
and release-js directories - Fixed issues with the cordova build
Repository: flex-falcon
Updated Branches:
refs/heads/feature-autobuild/example-maven-dirs 10e23ff62 -> 015dfb0f1
- Merged stuff that seems to have been lost in previous merges
- Removed the clearing of the debug-js and release-js directories
- Fixed issues with the cordova build
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/015dfb0f
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/015dfb0f
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/015dfb0f
Branch: refs/heads/feature-autobuild/example-maven-dirs
Commit: 015dfb0f125ab6e331646695388bbe141f83ae69
Parents: 10e23ff
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Tue Nov 8 16:10:44 2016 +0100
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Tue Nov 8 16:10:44 2016 +0100
----------------------------------------------------------------------
.../apache/flex/compiler/clients/COMPJSC.java | 2 +
.../internal/codegen/js/JSPublisher.java | 4 --
.../codegen/js/goog/JSGoogPublisher.java | 58 ++++++++++----------
.../codegen/mxml/flexjs/MXMLFlexJSEmitter.java | 10 +++-
.../mxml/flexjs/MXMLFlexJSPublisher.java | 4 +-
.../internal/projects/FlexJSProject.java | 2 +-
src/site/site.xml | 1 +
7 files changed, 44 insertions(+), 37 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/015dfb0f/compiler-jx/src/main/java/org/apache/flex/compiler/clients/COMPJSC.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/clients/COMPJSC.java b/compiler-jx/src/main/java/org/apache/flex/compiler/clients/COMPJSC.java
index 594ff45..312f868 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/clients/COMPJSC.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/clients/COMPJSC.java
@@ -273,6 +273,8 @@ public class COMPJSC extends MXMLJSC
String symbol = cu.getQualifiedNames().get(0);
if (externs.contains(symbol)) continue;
+ if (project.isExternalLinkage(cu)) continue;
+
if (!packingSWC)
{
final File outputClassFile = getOutputClassFile(
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/015dfb0f/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/JSPublisher.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/JSPublisher.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/JSPublisher.java
index eaa8fe8..17d0912 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/JSPublisher.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/JSPublisher.java
@@ -58,10 +58,6 @@ public class JSPublisher implements IJSPublisher
protected void setupOutputFolder()
{
- if (outputParentFolder.exists()) {
- FileUtils.deleteQuietly(outputParentFolder);
- }
-
if (!outputFolder.exists()) {
outputFolder.mkdirs();
}
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/015dfb0f/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java
index 00f755e..e2c28d5 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java
@@ -302,41 +302,41 @@ public class JSGoogPublisher extends JSPublisher implements IJSPublisher
protected void dumpJar(File jarFile, File outputDir) throws IOException
{
- try {
- // TODO (mschmalle) for some reason ide thinks this has not been closed
- @SuppressWarnings("resource")
- JarFile jar = new JarFile(jarFile);
+ // TODO (mschmalle) for some reason ide thinks this has not been closed
+ @SuppressWarnings("resource")
+ JarFile jar = new JarFile(jarFile);
- for (Enumeration<JarEntry> jarEntries = jar.entries(); jarEntries.hasMoreElements(); ) {
- JarEntry jarEntry = jarEntries.nextElement();
- if (!jarEntry.getName().endsWith("/")) {
- File file = new File(outputDir, jarEntry.getName());
-
- // Check if the parent directory exists. If not -> create it.
- File dir = file.getParentFile();
- if (!dir.exists()) {
- if (!dir.mkdirs()) {
- throw new IOException("Unable to create directory "
- + dir.getAbsolutePath());
- }
+ for (Enumeration<JarEntry> jarEntries = jar.entries(); jarEntries.hasMoreElements();)
+ {
+ JarEntry jarEntry = jarEntries.nextElement();
+ if (!jarEntry.getName().endsWith("/"))
+ {
+ File file = new File(outputDir, jarEntry.getName());
+
+ // Check if the parent directory exists. If not -> create it.
+ File dir = file.getParentFile();
+ if (!dir.exists())
+ {
+ if (!dir.mkdirs())
+ {
+ throw new IOException("Unable to create directory "
+ + dir.getAbsolutePath());
}
+ }
- // Dump the file.
- InputStream is = jar.getInputStream(jarEntry);
- FileOutputStream fos = new FileOutputStream(file);
- while (is.available() > 0) {
- fos.write(is.read());
- }
- fos.close();
- is.close();
+ // Dump the file.
+ InputStream is = jar.getInputStream(jarEntry);
+ FileOutputStream fos = new FileOutputStream(file);
+ while (is.available() > 0)
+ {
+ fos.write(is.read());
}
+ fos.close();
+ is.close();
}
-
- jar.close();
- }catch(Throwable t) {
- t.printStackTrace();
- throw new RuntimeException(t);
}
+
+ jar.close();
}
public class JSGoogErrorManager implements ErrorManager
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/015dfb0f/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
index 1f30509..3379dec 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
@@ -180,12 +180,20 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
}
else if (sawRequires)
{
+ // append info() structure if main CU
+ ICompilerProject project = getMXMLWalker().getProject();
+ FlexJSProject flexJSProject = null;
+ if (project instanceof FlexJSProject)
+ flexJSProject = (FlexJSProject) project;
+
stillSearching = false;
for (String usedName :usedNames) {
if (!foundRequires.contains(usedName)) {
if (usedName.equals(classDefinition.getQualifiedName())) continue;
if (((JSFlexJSEmitter) asEmitter).getModel().isInternalClass(usedName)) continue;
if (subDocumentNames.contains(usedName)) continue;
+ if (flexJSProject != null && flexJSProject.isExternalLinkage(flexJSProject.resolveQNameToCompilationUnit(usedName)))
+ continue;
namesToAdd.add(usedName);
}
}
@@ -1377,7 +1385,7 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
indentPush();
writeNewline("{");
writeNewline("/** @type {Array} */");
- writeNewline("var arr = org.apache.flex.utils.Language.superGetter(" + formatQualifiedName(cname) + ",this, 'MXMLDescriptor');");
+ writeNewline("var arr = " + formatQualifiedName(cname) + ".superClass_.get__MXMLDescriptor.apply(this);");
writeNewline("/** @type {Array} */");
indentPop();
indentPop();
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/015dfb0f/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
index aecc180..90f9d80 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
@@ -161,9 +161,9 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements IJSPublisher
if (!isMarmotinniRun)
{
// If there is a release dir, we delete it in any case.
- if (releaseDir.exists()) {
+ /*if (releaseDir.exists()) {
FileUtils.deleteQuietly(releaseDir);
- }
+ }*/
// Only create a release directory for release builds.
if (configuration.release()) {
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/015dfb0f/compiler-jx/src/main/java/org/apache/flex/compiler/internal/projects/FlexJSProject.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/projects/FlexJSProject.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/projects/FlexJSProject.java
index 818355c..10f89ea 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/projects/FlexJSProject.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/projects/FlexJSProject.java
@@ -196,7 +196,7 @@ public class FlexJSProject extends FlexProject
return null;
}
- private boolean isExternalLinkage(ICompilationUnit cu)
+ public boolean isExternalLinkage(ICompilationUnit cu)
{
if (linkageChecker == null)
{
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/015dfb0f/src/site/site.xml
----------------------------------------------------------------------
diff --git a/src/site/site.xml b/src/site/site.xml
index 76ca728..894cdfc 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -19,6 +19,7 @@
-->
<project name="Maven" xmlns="https://maven.apache.org/xsd/decoration-1.7.0.xsd">
+ <!-- Use the nicer looking fluido skin instead of the default -->
<skin>
<groupId>lt.velykis.maven.skins</groupId>
<artifactId>reflow-maven-skin</artifactId>