You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2019/09/10 00:41:59 UTC

[royale-compiler] branch release/0.9.6 updated (bc54aed -> 7fc29ec)

This is an automated email from the ASF dual-hosted git repository.

aharui pushed a change to branch release/0.9.6
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git.


    from bc54aed  .factorypath file should not have been committed
     new 8745d93  handle module output without js-release
     new 7fc29ec  fix handling of altparams

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../codegen/mxml/royale/MXMLRoyalePublisher.java   |  4 +-
 .../compiler/internal/projects/RoyaleProject.java  | 55 +++++++++++++++-------
 2 files changed, 42 insertions(+), 17 deletions(-)


[royale-compiler] 02/02: fix handling of altparams

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch release/0.9.6
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 7fc29ec584abf74c8e58a71047b2b8916963eb0b
Author: Alex Harui <ah...@apache.org>
AuthorDate: Mon Sep 9 17:40:51 2019 -0700

    fix handling of altparams
---
 .../compiler/internal/projects/RoyaleProject.java  | 55 +++++++++++++++-------
 1 file changed, 39 insertions(+), 16 deletions(-)

diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProject.java b/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProject.java
index f4ad3d1..7609413 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProject.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProject.java
@@ -2349,27 +2349,50 @@ public class RoyaleProject extends ASProject implements IRoyaleProject, ICompile
 		{
 			if (meta.getTagName().equals(IMetaAttributeConstants.ATTRIBUTE_SWFOVERRIDE))
 			{
-				IMetaTagAttribute attr = meta.getAttribute(IMetaAttributeConstants.NAME_SWFOVERRIDE_ALTPARAMS);
-				if (attr != null)
+				IMetaTagAttribute altattr = meta.getAttribute(IMetaAttributeConstants.NAME_SWFOVERRIDE_ALTPARAMS);
+				if (altattr != null)
 				{
-					// format is expectedQName:allowedQName,expectedQName:allowedQName.
-					// we don't know which parameter it is so we're assuming for now that any mapping
-					// applies to all occurences of that type in the parameter list
-					String paramList = attr.getValue();
-					String[] paramMap;
-					if (paramList.contains(","))
-						paramMap = paramList.split(",");
+					String altparamList = altattr.getValue();
+					String[] altparamMap;
+					if (altparamList.contains(","))
+						altparamMap = altparamList.split(",");
 					else
 					{
-						paramMap = new String[1];
-						paramMap[0] = paramList;
+						altparamMap = new String[1];
+						altparamMap[0] = altparamList;
 					}
-					for (String item : paramMap)
+					IMetaTagAttribute attr = meta.getAttribute(IMetaAttributeConstants.NAME_SWFOVERRIDE_PARAMS);
+					if (attr != null)
 					{
-						String[] parts = item.split(":");
-						if (expectedDefinition.getQualifiedName().equals(parts[0]))
-							if (((ITypeDefinition)actualDefinition).isInstanceOf(parts[1], this))
-								return true;
+						String paramList = attr.getValue();
+						String[] paramMap;
+						if (paramList.contains(","))
+							paramMap = paramList.split(",");
+						else
+						{
+							paramMap = new String[1];
+							paramMap[0] = paramList;
+						}
+						int n = paramMap.length;
+						for (int i = 0; i < n; i++)
+						{
+							String item = paramMap[i];
+							if (expectedDefinition.getQualifiedName().equals(item))
+							{
+								String alts = altparamMap[i];
+								String[] altList;
+								if (alts.contains(":"))
+									altList = alts.split(":");
+								else
+								{
+									altList = new String[1];
+									altList[0] = alts;
+								}
+								for (String alt : altList)
+									if (((ITypeDefinition)actualDefinition).isInstanceOf(alt, this))
+										return true;
+							}
+						}
 					}
 				}
 			}


[royale-compiler] 01/02: handle module output without js-release

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch release/0.9.6
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 8745d938710401282c474bf3a6529b15b0b6de31
Author: Alex Harui <ah...@apache.org>
AuthorDate: Mon Sep 9 17:40:32 2019 -0700

    handle module output without js-release
---
 .../compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java
index a4a32b9..0407b31 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java
@@ -505,7 +505,9 @@ public class MXMLRoyalePublisher extends JSGoogPublisher implements IJSPublisher
         	depsFileData += "\ngoog.require('" + mainClassQName + "');\n";
             writeFile(new File(intermediateDir, projectName + "__deps.js"), depsFileData + moduleAdditionHTML + "\n", false);
             gdw.needCSS = true;
-            writeFile(new File(releaseDir, projectName + ".js"), moduleAdditionHTML, false);
+            if (configuration.release()) {
+            	writeFile(new File(releaseDir, projectName + ".js"), moduleAdditionHTML, false);
+            }
         }
         else
         {